About the Chemical Equation Balancer
Most balancers guess. They try coefficient after coefficient until the atoms happen to line up, which works for Fe + O2 and quietly fails on a nine-species permanganate reaction. This one does it the way a chemist with a linear-algebra course would: one unknown per species, one conservation equation per element (plus one for charge when ions are present), and the answer read straight off the null space of that matrix.
Every step uses exact fractions on arbitrary-precision integers, never floating point, so a coefficient of 299 comes out as 299 and not 298.9999. The same algebra also tells you the uncomfortable cases honestly: an equation that cannot balance, one that only balances with a species on the other side of the arrow, and one that is secretly two reactions and has infinitely many balances.
Charges (Fe^3+), electrons (e-), nested brackets (K4[Fe(CN)6]) and hydrates (CuSO4·5H2O) all parse. Molar masses use the current IUPAC atomic weights, and the stoichiometry panel turns grams of one species into grams of all the others. Everything runs in your browser; nothing you type is sent anywhere.
-> or = · charges Fe^3+ SO4^2- ·
electrons e- · hydrates CuSO4*5H2O · states like (aq) are kept but not counted
Enter what you actually have of each reactant. Leave one blank to treat it as in excess.
Both species in solution: how many millilitres of the second reacts exactly with a measured volume of the first?
Ten unbalanced equations drawn at random from a bank of 34 textbook reactions (synthesis, combustion, redox, ionic), with a balanced answer key on page two — a fresh sheet every time.
How to Use the Chemical Equation Balancer
Type the reaction with an arrow between reactants and products and press Balance. Formulas are
case-sensitive because chemistry is: Co is cobalt, CO is carbon monoxide. Brackets of
either kind nest (Ca3(PO4)2, K4[Fe(CN)6]), a dot or asterisk joins a hydrate
(CuSO4*5H2O), and ions take a caret charge (Fe^3+, SO4^2-). If you type
coefficients of your own they are ignored and recomputed. Once balanced, the atom ledger shows every
element counted on both sides, and the stoichiometry panel converts a mass of any one species into the masses of all the others.
The Algebra Behind a Balanced Equation
Take Fe + O2 → Fe2O3 and call the coefficients a, b and c. Iron gives
a = 2c; oxygen gives 2b = 3c. Two equations, three unknowns: the
solutions form a line through the origin, and every point on it is the same reaction at a different scale. Setting
c = 1 gives a = 2 and b = 3/2, and clearing the fraction gives
4 Fe + 3 O2 → 2 Fe2O3.
Written as a matrix — one row per element, one column per species, products entered as negatives — the coefficients are that matrix’s null space. Row-reducing it to reduced row-echelon form exposes it directly. The dimension of the null space is the whole story:
- Zero — only the all-zeros answer exists, so the equation cannot balance as written.
- One — a single reaction with one correct set of smallest whole-number coefficients. This is almost every equation in a textbook.
- Two or more — several independent reactions added together. Any positive mixture balances,
which is why “the” answer to
H2 + O2 → H2O + H2O2does not exist.
Why Exact Fractions Matter
Floating-point elimination turns 1/3 into 0.333… and accumulates the error with every row operation. On a large system — the potassium ferrocyanide oxidation needs coefficients of 10, 122, 299, 162, 5, 122, 60, 60 and 188 — that rounding is enough to produce a coefficient like 298.99997 and a wrong answer after rounding. Working with fractions of arbitrary-precision integers keeps every intermediate value exact, so the final scaling by the least common denominator is guaranteed to land on integers.
Redox and Ionic Equations
In an ionic equation charge is conserved as strictly as atoms, so it becomes one more row in the matrix. Permanganate
oxidising iron(II) in acid, MnO4^- + Fe^2+ + H^+ → Mn^2+ + Fe^3+ + H2O, balances to 1, 5, 8, 1, 5, 4:
the net charge is +17 on both sides. That is the same answer the half-reaction method reaches, found in one step rather
than by balancing electrons by hand. Half-reactions work too — write the electrons as e- and they are
balanced like any other charged species.
From Balanced Equation to Grams
Coefficients are mole ratios, not mass ratios. To find how much water 4.00 g of hydrogen makes, convert to moles
(4.00 ÷ 2.016 = 1.984 mol H2), apply the ratio from 2 H2 + O2 → 2 H2O (1:1
here), and convert back (1.984 × 18.015 = 35.7 g). The stoichiometry panel does this for every species at
once. Percent yield is then simply actual ÷ theoretical × 100 — and a figure above
100% usually means a wet or impure product, not a miracle.
Related tools: the Matrix Workbench for the same row reduction on any matrix, the Density Calculator for turning a measured volume of liquid reagent into grams, and the Scientific Calculator for everything else. Browse every Math & Science tool.
Frequently Asked Questions
How do you balance a chemical equation with algebra?
Give every species an unknown coefficient and write one equation per element saying the atoms on the left equal the atoms on the right; charged species add one more equation for total charge. Those equations form a matrix, and the coefficients are its null space. Solving it with exact fractions and then scaling to the smallest whole numbers gives the balanced equation directly, which is why this method never needs trial and error.
Why does my equation say it cannot be balanced?
Either an element appears on only one side, which no coefficient can fix, or the only solution to the conservation equations is all zeros. The classic example is H2O -> H2O2: hydrogen forces equal amounts of both, and oxygen then cannot match. It almost always means a formula is mistyped or a product is missing, so check subscripts and capital letters first.
Can a chemical equation have more than one correct balance?
Yes, when it is really two or more independent reactions written as one. H2 + O2 -> H2O + H2O2 is water formation and peroxide formation added together, so 2:1:2:0 and 1:1:0:1 and every positive mix of them all balance. The tool detects this, lists the independent reactions, and shows the combination with the smallest coefficients rather than pretending there is one answer.
How do I balance a redox equation with charges?
Write each ion with its charge, for example MnO4^- + Fe^2+ + H^+ -> Mn^2+ + Fe^3+ + H2O. Charge becomes one more conservation row alongside the elements, so the solver balances atoms and charge at the same time and returns 1, 5, 8, 1, 5, 4. Half-reactions work the same way with electrons written as e-.
What atomic weights does the molar mass use?
The IUPAC abridged standard atomic weights published by CIAAW in 2024, quoted to five significant figures, for example H 1.0080, C 12.011, O 15.999 and Cl 35.45. Elements with no stable isotopes have no standard atomic weight, so the mass number of their longest-lived isotope is used and flagged. Textbooks that use older tables can differ in the second decimal place.