There is no “chemical formula” for beer. Sorry Mrs. Sims. Beer, like most other stuff things, is a mixture of chemicals. The main chemical in beer is H2O (as known as water, if you are really that ignorant not to know that!). Beer also contains CH3CH2OH (it’s ethanol, what i have been talking about before) and many other carbohydrates, plus minor levels of chemicals that give the beer its flavor.
Beer is a produced from malted barley, hops, water and fermented with yeast. Malted barley is simply partially germinated barley. During germination the enzymes start to break down the starch into sugars( mainly maltose) and it is the maltose that is fermented by the yeast to produce the ethanol.