A chemical formula of a compound contains symbols o the atoms of the elements present in the compound as well as the number of atoms of each element in the form of subscripts.
Therefore it helps us to know the elements in a compound and the number of atoms in the compounds.