Chemical Equation Balancer: Exact Matrix Method with Ions
By FindMySum · Last reviewed
A chemical equation is balanced when every element has the same number of atoms on both sides, and, for ions, the total charge matches too. This chemical equation balancer finds the smallest whole-number coefficients for any equation you type, from iron rusting to permanganate redox reactions, and shows the atom count for each element and the mass of each side, so you can see that matter is conserved.
How to type an equation
- Separate species with + and the two sides with =, -> or →.
- Write formulas with ordinary numbers for subscripts: H2O, Ca3(PO4)2, K4[Fe(CN)6].
- Hydrates take a dot: CuSO4·5H2O (CuSO4*5H2O works too).
- Charges go at the end: Na+, Cl-, MnO4- for ±1;
Fe^3+,SO4^2-orSO4{2-}for larger charges; superscripts such as Fe³⁺ are accepted. Electrons are e-. - State symbols (s), (l), (g) and (aq) are ignored, and so are any coefficients you type.
Spaces around the + between species make ionic equations unambiguous: "Na+ + Cl-".
Worked example: rust
The calculator opens with Fe + O₂ → Fe₂O₃. Give the species unknown coefficients a, b and c:
a Fe + b O₂ → c Fe₂O₃
Each element gives one equation:
- iron: a = 2c
- oxygen: 2b = 3c
With c = 2, a = 4 and b = 3, so the balanced equation is 4Fe + 3O₂ → 2Fe₂O₃. Check: 4 iron and 6 oxygen atoms on each side. Using standard atomic weights, 4 × 55.845 + 3 × 31.998 = 319.374 g of reactants make 2 × 159.687 = 319.374 g of rust.
The matrix method
For a larger equation, the same idea becomes a matrix. Each row is an element (and a row for charge when there are ions), each column a species, with reactant counts positive and product counts negative. The coefficients are the vectors x with A·x = 0, the null space of the matrix.
The calculator reduces the matrix with exact fractions, never rounding, so even an awkward reaction such as 2KMnO₄ + 16HCl → 2KCl + 2MnCl₂ + 8H₂O + 5Cl₂ comes out exactly. It then scales the solution to the smallest whole numbers. Three things can happen:
| Null space | Meaning |
|---|---|
| One solution, all positive | The equation balances in exactly one way |
| No solution | It can't be balanced: a formula is wrong or a species is missing |
| Two or more solutions | Several independent reactions are mixed together |
If the one solution has a zero, that species doesn't take part; if some coefficients come out negative, those species belong on the other side of the arrow. The calculator tells you which.
Ionic and redox equations
When ions or electrons appear, charge must balance too. In acidic solution, permanganate oxidises iron(II):
MnO₄⁻ + 5Fe²⁺ + 8H⁺ → Mn²⁺ + 5Fe³⁺ + 4H₂O
Both sides carry a charge of +17. For a redox reaction in acid, include H⁺ and H₂O among the species; in base, include OH⁻ and H₂O. The matrix method then supplies their coefficients along with the rest. Half-equations work as well: Fe³⁺ + e⁻ → Fe²⁺.
From balanced equation to grams
The coefficients are mole ratios. The species table lists each molar mass and the mass that takes part when the coefficients are read in moles. In the propane example, C₃H₈ + 5O₂ → 3CO₂ + 4H₂O, 44.1 g of propane burns with 160.0 g of oxygen. Scale those amounts for any quantity, or take them to the percent yield calculator to compare a theoretical yield with what an experiment produced.
What it can't tell you
A balanced equation is bookkeeping. It doesn't say whether the reaction happens, which products actually form when several are possible, or how fast. Chemistry decides those; the balancer makes sure the atoms add up once you have chosen the species.
More questions
Is a balanced equation proof that a reaction happens?
No. Balancing only makes the atoms and charge add up. Whether the reaction actually takes place depends on thermodynamics (is it spontaneous?) and kinetics (is it fast enough?). Gold + oxygen → gold oxide balances perfectly, yet gold doesn't tarnish in air. Use the Gibbs free energy and activation energy ideas to judge whether and how fast a reaction goes.
What is the law of conservation of mass?
In a chemical reaction, matter is neither created nor destroyed: the total mass of the products equals the total mass of the reactants. Antoine Lavoisier demonstrated it in the 1770s by weighing reactions in sealed vessels. A balanced equation is that law written in atoms, which is why the calculator's mass check always shows equal totals.
Can coefficients be fractions?
Mathematically yes, and you will see ½O₂ in thermochemistry, where an equation is written per mole of one substance. By convention a balanced equation uses the smallest whole numbers, so the calculator multiplies out any fractions: H₂ + ½O₂ → H₂O becomes 2H₂ + O₂ → 2H₂O.
How are redox equations usually balanced by hand?
The half-reaction method: split the reaction into oxidation and reduction, balance each for atoms (adding H₂O and H⁺ in acid, or OH⁻ in base) and then for charge with electrons, multiply so the electrons cancel, and add. The matrix method reaches the same answer in one step, provided you include H⁺, OH⁻ and H₂O in the equation you enter.
Why can't I change the subscripts to balance an equation?
Subscripts define the substance. Changing H₂O to H₂O₂ to fix the oxygen count turns water into hydrogen peroxide, a different chemical. Only the coefficients in front of each formula, which count how many units take part, may change.
Sources
This article explains how the calculator works and is general information, not financial, tax, legal or medical advice. Rules change; check the sources above or a qualified professional before you act.