The chemical formula of a compound is a shorthand way of representing its molecule. The information that can be obtained from the chemical formula of a compound are:
1) Types of elements present in the compound
2) Number of each kind of atoms in a molecule of the compound
3) Ratio of different atoms in a molecule of the compound
4) Mass of a molecule of the compound
For example, the chemical formula of the compound water is H2O. This shows the presence of two constituent elements, hydrogen and oxygen. Two atoms of hydrogen and one atom of oxygen combine to form a molecule of water. The ratio in which the atoms of hydrogen and oxygen combine to form a molecule of water is 2:1. Moreover, the mass of a water molecule can be calculated by adding the mass of two hydrogen atoms and one oxygen atom.