What this calculator does
An ionic compound has to be electrically neutral overall, so the number of cations and anions in its formula is fixed by their charges, not chosen freely. This ionic equation calculator takes a cation and an anion, cross-multiplies their charges to find how many of each are needed, then reduces that ratio to its simplest whole-number form to give the correct formula.
The method, sometimes called the criss-cross method, is standard first-year chemistry: the cation’s charge becomes the anion’s subscript, the anion’s charge becomes the cation’s subscript, and the two are then divided by their greatest common factor. Polyatomic ions such as sulfate or ammonium get wrapped in parentheses when more than one is needed, so the subscript is clearly applied to the whole ion rather than to just its last atom.
The formula
Take the absolute value of each ion’s charge. The cation’s subscript in the formula equals the anion’s charge, and the anion’s subscript equals the cation’s charge; that criss-cross always balances the total positive and negative charge. Both subscripts are then divided by their greatest common divisor so the formula is in lowest terms, and a subscript of 1 is dropped entirely, as is conventional.
| Term | Meaning |
|---|---|
| Cation | The positively charged ion, normally a metal or the ammonium ion. |
| Anion | The negatively charged ion, normally a nonmetal or a polyatomic group. |
| Subscript | The small number after an ion’s symbol showing how many of that ion are in the formula unit. |
| Polyatomic ion | An ion made of more than one atom, such as sulfate (SO4^2-) or ammonium (NH4+), written in parentheses when its subscript is greater than one. |
The inputs explained
| Field | What to enter |
|---|---|
| Cation | The cation (positive ion) in the compound. |
| Anion | The anion (negative ion) in the compound. |
When to use it
Checking homework or a lab write-up
Given a cation and anion pair, confirming the correct formula and subscripts is a quick check before writing it into a report or an equation that needs balancing.
Working from an unfamiliar transition metal
Transition metals such as iron or copper can form more than one charge state (Fe2+ or Fe3+, for instance), and picking the wrong one changes the formula entirely, so selecting the specific charge state removes the guesswork.
Learning the criss-cross method
Working through several cation and anion combinations side by side is one of the more direct ways to see why a 2+ cation paired with a 1- anion needs two of the anion, and why that pattern reverses for a 1+ cation with a 2- anion.
Worked examples
Every figure in the tables below is produced by this page’s own calculator at build time, so the numbers and the tool always agree. Select any row to load that scenario.
What formula does calcium form with different anions?
Calcium held fixed against a range of common anions.
| Anion | Compound formula | Charge balance |
|---|---|---|
| Chloride | CaCl2 | 1 × (2+) + 2 × (1-) = 0 |
| Sulfate | CaSO4 | 1 × (2+) + 1 × (2-) = 0 |
| Phosphate | Ca3(PO4)2 | 3 × (2+) + 2 × (3-) = 0 |
| Hydroxide | Ca(OH)2 | 1 × (2+) + 2 × (1-) = 0 |
| Carbonate | CaCO3 | 1 × (2+) + 1 × (2-) = 0 |
How does the same anion behave with different cations?
Chloride held fixed against a range of common cations.
| Cation | Compound formula | Charge balance |
|---|---|---|
| Sodium | NaCl | 1 × (1+) + 1 × (1-) = 0 |
| Calcium | CaCl2 | 1 × (2+) + 2 × (1-) = 0 |
| Aluminium | AlCl3 | 1 × (3+) + 3 × (1-) = 0 |
| Iron(II) | FeCl2 | 1 × (2+) + 2 × (1-) = 0 |
| Iron(III) | FeCl3 | 1 × (3+) + 3 × (1-) = 0 |
Questions
How do you find the formula of an ionic compound?
Take the charge on the cation and the charge on the anion, use each one as the other ion’s subscript, then reduce that pair of subscripts by their greatest common factor. The result is the smallest whole-number ratio of ions that gives an electrically neutral formula unit.
Why does calcium chloride become CaCl2 and not Ca2Cl?
Calcium carries a 2+ charge and chloride carries a 1-, so it takes two chlorides to cancel out one calcium’s charge, not the other way around. The criss-cross method places the calcium’s charge, 2, as chloride’s subscript, giving CaCl2.
Why do some formulas use parentheses, like Ca(OH)2?
Parentheses show that the subscript applies to an entire polyatomic ion, not just to the last atom written. Ca(OH)2 means two whole hydroxide ions; without the parentheses, CaOH2 would misleadingly suggest two hydrogens attached to one oxygen.
What if the cation and anion have the same charge?
When the charges are equal, such as calcium (2+) and sulfate (2-), the criss-cross gives a subscript of 1 on each side, which is dropped by convention. The formula is simply CaSO4, with one of each ion.
To check whether the resulting compound actually dissolves in water, see the solubility rules calculator. For converting a known mass of a substance into moles, use the mole calculator.