How to Write Chemical Formula

The formula to writing accurate chemical formulae

1. Chemical formula tells us the what and how much

Cows fart methane, a gaseous compound that traps heat. To the uninitiated, the IUPAC name of methane tells us little about its composition. However, its chemical formula of CH4 is more informative, specifying its:

  • Constituent elements: carbon and hydrogen
  • Fixed ratio of constituent elements: for every carbon atom, there are 4 hydrogen atoms

In other words, if a sample of methane has 2 billion carbon atoms, from the chemical formula of CH4, we can infer that there are 4 × 2 billion = 8 billion hydrogen atoms.

2. They are used for elements, compounds, and even ions!

Take the sodium ion of common salt, Na+, as an example. Its charge of 1+ is represented as the superscript.

3. For simple molecules, they have another name: molecular formulae

Besides telling us the fixed ratio of elements in a large sample of substance, molecular formulae tell us something about the very small. They tell us the exact number of atoms of every element in a single molecule.

In a large sample of methane, each simple molecule of CH4 has exactly 1 carbon atom covalently bonded to 4 hydrogen atoms. Nothing more, nothing less.

4. Two is better than one, say diatomic molecules

Some non-metallic elements exist as pairs of atoms, also called diatomic molecules. This is reflected in their chemical formula, by the subscript “two”.

This means that when we say oxygen gas, we actually refer to the diatomic molecule of O2 instead of the lone atom of O. Besides oxygen, other elements that exist as diatomic molecules include:


5. Elements combine in one way or another to form simple molecular compounds

There are many ways that nitrogen can combine with oxygen to form different compounds. Therefore, no one will ever ask you to predict the chemical formula of an oxide of nitrogen, which is a compound with nitrogen and oxygen. It is simply impossible! Instead, these myriad compounds have unique names: nitric oxide (NO), nitrogen dioxide (NO2), and the laughing gas nitrous oxide (N2O). No laughing matter though, as this means that we have to memorise their unique chemical names and the corresponding chemical formulae.

The same goes for billions of other compounds that exist as simple molecules. Oof. Thankfully, we only need to know a handful common ones for O Level:

Carbon monoxideCO
Carbon dioxideCO2
Nitrogen dioxide­NO2
Sulfur dioxideSO2

6. Ionic compounds are less crazy: their formulae are predicted by the charges of their ions

Ionic compounds are so predictable! Their chemical formula is governed by charge.

Ionic compounds are electrically neutral: their overall charge is 0. The positive charge of cations equals and cancels out the negative charge of anions.

Take the tired example of sodium chloride as an example. The single positive charge of each sodium ion requires just the single negative charge of 1 chloride ion to cancel out. Therefore, sodium and chloride ions exist in a 1:1 ratio, which gives the chemical formula of NaCl.

7. Predict the chemical formula of any ionic compound, if you know the charge of the constituent atoms

Knowledge of the charge of common ions is your crystal ball. With it, you can infer the chemical formula of an ionic compound in three steps.

Let’s do this together using aluminium oxide as an example.

  • STEP 1: Identify the charges

    Recall the charges of the positively charged cation and the negatively charged anion

    Al3+ and O2-

  • STEP 2: Find the simplest ratio

    Find the simplest ratio of cations to anions, such that the overall charge is 0

    Every 2 Al3+ have a total positive charge of 6+, requiring 3 O2- with a total negative charge of 6- to cancel out

  • STEP 3: State the formula

    State the simplest ratio as subscripts of the chemical formula.