This can be done by identifying the presence of carbon, hydrogen and oxygen atoms in the chemical formula, normally hydrogen and oxygen in the ratio of 2:1. The general chemical formula of carbohydrates is (CH2O)n. A carbohydrate is a biomolecule that is composed of carbon, hydrogen, and oxygen atoms. In other words the formula is normally; Cm(H2O)n; where m may be different from n.