Formulae of Ionic Compounds

Every ionic compound can be represented by a chemical formula.

In the formula of an ionic compound, the cation and the anion are represented by their chemical formulae, but their relative charges are not shown because the overall compound is neutral (due to the charges of the cations and the anions cancelling each other out).

For example, the ionic compound sodium chloride is made up of sodium ions (Na+) and chloride ions (Cl-). Therefore, the chemical formula of sodium chloride is NaCl.

Note that the cation always comes before the anion.

Numbers are used to show the ratio of cations to anions

If the ratio of cations to anions in an ionic compound is not 1:1, then numbers need to be included in its formula to show what the ratio is.

For example, in the ionic compound aluminium oxide, the ratio of aluminium ions (Al3+) to oxide ions (O2-) is 2:3. Therefore, the formula of aluminium oxide is:


Note the these numbers are written after the formula of each ion and they are written in subscript (low down on the line).

If one of the numbers in the ratio is 1 then it is not written. For example, in the ionic compound magnesium fluoride, the ratio of magnesium ions (Mg2+) to fluoride ions (F-) is 1:2. Therefore, the formula of magnesium fluoride is:


By not writing a number after Mg, we imply that its number is 1. We do not write Mg1F2.

Brackets may be needed around polyatomic ions

If the ionic compound contains a polyatomic ion, and you need to put a number after that polyatomic ion (because its number in the ratio is more than 1), then you need to put the formula of the polyatomic ion in brackets.

For example, in the ionic compound magnesium hydroxide, the cations are magnesium ions (Mg2+) and the anions are hydroxide ions (OH-), which are polyatomic. The ratio of magnesium ions to hydroxide ions is 1:2. Therefore, the formula of magnesium hydroxide is written:


If we hadn't included the brackets and had written MgOH2, it would have looked like the number 2 only applied to the H rather than the whole OH.

As another example, the ionic compound calcium nitrate is made up of calcium ions (Ca2+) and nitrate ions (NO3-). The ratio of calcium ions to nitrate ions is 1:2. Therefore, calcium nitrate's formula is:


If the polyatomic ion's number in the ratio is 1 (and therefore not written) then brackets are not needed. For example, in sodium sulphate, the ratio of sodium ions (Na+) to sulphate ions (SO42-) is 2:1. Since sulphate's number is 1, no brackets are needed. Sodium sulphate's formula is simply:



Flashcards help you memorise information quickly. Copy each question onto its own flashcard and then write the answer on the other side. Testing yourself on these regularly will enable you to learn much more quickly than just reading and making notes.


How do you write the formula of an ionic compound?


In an ionic compound's formula, how do you show polyatomic ions?


Please consider donating to support Mooramo. I am one person doing this whole project on my own - including building the site, writing the content, creating illustrations and making revision resources. By making a one-time or repeating donation you will buy me time to work on Mooramo, meaning that I can get new content on here more quickly.