A formula represents the kind of elements present in a compound and the number of atoms and molecules of those elements in the compound.
Example: The formula represents 2 molecules of water, where each molecule of water contains 2 atoms of hydrogen and 1 atom of oxygen.