The chemical formula of a compound is a symbolic representation of its chemical composition.
Chemical formulae provide insight into the elements that constitute the molecules of a compound and also the ratio in which the atoms of these elements combine to form such molecules.
For example, the chemical formula of water, which is H2O, suggests that two hydrogen atoms combine with one oxygen atom to form one molecule of water.