An ionic compound is neutral overall, so the total positive charge must equal the total negative charge. To write the formula, choose how many of each ion make those totals match. This skill appears in almost every question that names an ionic compound, and it feeds straight into balancing equations.
This lesson belongs to the formulas and equations module. The examples are original teaching examples, and the charges used are standard values that you should confirm against your syllabus list.
How do charges decide the formula?
Take magnesium chloride. Magnesium forms Mg²⁺ and chlorine forms Cl⁻. One Mg²⁺ has a charge of 2+, so it needs two Cl⁻ (2 × 1− = 2−) to cancel it.
The formula is MgCl₂. The small 2 is a subscript and counts the chloride ions.
How to construct a formula, step by step
- Write each ion with its charge, for example Al³⁺ and O²⁻.
- Find a common total for the charges. The lowest common multiple of 3 and 2 is 6.
- Work out how many of each ion reach that total: 6 ÷ 3 = 2 aluminium ions and 6 ÷ 2 = 3 oxide ions.
- Write the formula with those numbers as subscripts, omitting a subscript of 1. Here that gives Al₂O₃.
- Check: total positive charge and total negative charge must match, and the ratio must be as simple as possible.
Worked example
Write the formula for aluminium sulfate, given Al³⁺ and SO₄²⁻.
Step 1: Al³⁺ and SO₄²⁻. The sulfate ion is a group of atoms that carries a 2− charge as a whole.
Step 2: the lowest common multiple of 3 and 2 is 6.
Step 3: 6 ÷ 3 = 2 aluminium ions. 6 ÷ 2 = 3 sulfate ions.
Step 4: Al₂ and (SO₄)₃. The sulfate group is repeated, so it goes in brackets.
Formula: Al₂(SO₄)₃
Step 5, check: positive = 2 × 3+ = 6+. Negative = 3 × 2− = 6−. They match, and 2 : 3 cannot be simplified.
The mistake to watch for
A common slip is to leave out the brackets around a polyatomic ion.
Mistaken answer: Al₂SO₄₃
The student knew three sulfate ions were needed but wrote the 3 against only the oxygen.
The subscript applies only to the symbol or bracket directly before it. Write Al₂(SO₄)₃, where the 3 multiplies the whole SO₄ group. As a check, count atoms: this formula has 2 Al, 3 S and 12 O.
Check yourself
1. Write the formula for potassium sulfide, given K⁺ and S²⁻.
Show answer
Two K⁺ (2+) are needed to balance one S²⁻ (2−). K₂S. Check: 2 × 1+ = 2+ and 1 × 2− = 2−.
2. Write the formula for iron(III) oxide, given O²⁻.
Show answer
Iron(III) means Fe³⁺. The lowest common multiple of 3 and 2 is 6, so 2 Fe³⁺ (6+) and 3 O²⁻ (6−). Fe₂O₃.
3. Write the formula for ammonium phosphate, given NH₄⁺ and PO₄³⁻.
Show answer
The charges are 1+ and 3−, so 3 NH₄⁺ are needed to balance 1 PO₄³⁻. The ammonium group repeats, so it needs brackets: (NH₄)₃PO₄. Check: 3 × 1+ = 3+ and 3−.
Where this leads next
With correct formulas in hand, move on to balancing atoms without changing subscripts. Use the equation balance reasoning trainer to practise counting atoms.
If you find yourself reaching for the swap method without checking charges, that habit is worth a closer look. It is the kind of pattern a teacher in online one-to-one Chemistry tuition can spot quickly.