The chemical formula of a compound shows how many of each type of atom join together to make the units which make up the compound.

For example, in iron sulfide every iron atom is joined to one sulfur atom, so its formula is shown as FeS. In sodium oxide, there are two sodium atoms for every oxygen atom, so its formula is shown as Na2O. Notice that the ‘2’ is written as a subscript, so writing Na2O would be wrong.

This diagram shows that one carbon atom and two oxygen atoms combine to make up the units of carbon dioxide. Its chemical formula is written as CO2.

A carbon atom joined to two oxygen atoms.

You may be required to use a key to draw your own diagram of a molecule, eg:

A diagram of six atoms, labelled: C, H, N, O, Cl, S.

Using this key, the molecules SH2 and NH3 would be represented like this.

Diagram of the molecules SH2 and NH3.
When a formula contains one atom of one element and more than one atom of another element, the element with only one atom is in the centre of the molecule and the atoms of the other element surround the central atom.

Sometimes you see more compound formulae such as Na2SO4 and Fe(OH)3:

  • a unit of Na2SO4 contains 2 sodium atoms, 1 sulfur atom and 4 oxygen atoms joined together – this results in a total of 7 atoms
  • a unit of Fe(OH)3 contains 1 iron atom, 3 oxygen atoms and 3 hydrogen atoms – the brackets show that the 3 applies to O and H – this results in a total of 7 atoms