Balancing Equations Calculator – Every Atom Counted, Both Sides Equal
Type a chemical equation and get the smallest whole-number coefficients that balance it — then check the proof yourself in the atom ledger underneath, where every element is counted on both sides. Parentheses, polyatomic groups and the genuinely hard ones are all fair game.
Your equation
Write it the way your textbook does: formulas joined by +, an arrow → between the sides, numbers after elements as subscripts — H2O, Ca(OH)2. Any coefficients you type are ignored; the balancer works them out from scratch.
Try one of these
🔒 Everything is calculated in your browser — your equations never leave your device.
The balanced equation
| Element | Left side | Right side | Match |
|---|
The atom ledger — how a balanced equation proves itself
A balanced equation is a promise: exactly the same atoms walk in as walk out, only rearranged into new molecules. The ledger is where the promise gets checked. Here is the propane equation from the top of the page, audited line by line.
| Element | Left side | Right side | Match |
|---|---|---|---|
| C — carbon | 1 × 3 = 3 | 3 × 1 = 3 | ✓ |
| H — hydrogen | 1 × 8 = 8 | 4 × 2 = 8 | ✓ |
| O — oxygen | 5 × 2 = 10 | 3 × 2 + 4 × 1 = 10 | ✓ |
| Total atoms | 21 | 21 | ✓ |
Read one row slowly and the whole method shows itself. Oxygen arrives as 5 pairs — 10 atoms. It leaves split across two different products: 6 of them ride inside the three CO2 molecules and the other 4 inside the four H2O molecules. 6 + 4 = 10, so the row balances — and an equation is only finished when every row does.
Keep exploring
Balanced your equation — these pick up where the balancing leaves off.
Molecular Weight Calculator
Weigh any formula from the same periodic table — see what your balanced molecules actually mass.
🧪Molarity Calculator
Concentration, moles and volume — the arithmetic that follows a balanced equation into the lab.
💧Dilution Calculator
Work out how much stock solution and water a target concentration really needs.
- The parser counts atoms the way a chemist does: subscripts multiply the element before them, and a bracket multiplies everything inside it — the 2 in Ca(OH)2 doubles the O and the H alike.
- Each element becomes one equation — its atoms on the left must equal its atoms on the right — and the whole set is solved together, exactly, for the smallest whole-number coefficients.
- The atom ledger underneath is the proof: every element counted on both sides, so you can check a balanced equation yourself without trusting the machine.
- How it works in three steps
- How the balancing is worked out
- Going deeper
- Four equations, worked by hand and by calculator
- Brackets, big molecules, and the equations the calculator refuses
- Checking a balanced equation without the calculator
- Counting atoms inside formulas, brackets included
- Frequently asked questions
How it works in three steps
Count every atom
The parser reads each formula the way a chemist does: subscripts multiply the element before them, and a bracket multiplies everything inside it — the 2 in Ca(OH)2 doubles the O and the H alike. Every species becomes a column of atom counts.
Turn counts into algebra
Each element gets one equation: its atoms on the left must equal its atoms on the right. Unknown coefficients stand in front of every species, and the whole set is solved together, exactly — fractions and all — the way a system of equations deserves.
Shrink to the smallest whole numbers
The exact solution is scaled up until every coefficient is a whole number, then divided down by the greatest common divisor. What remains is the smallest honest set — the one in your textbook — and the ledger underneath proves it.
How the balancing is worked out
A small one, solved in the open: Al + HCl → AlCl3 + H2. Give the four species unknown coefficients a, b, c and d. Aluminium says a = c. Chlorine says b = 3c. Hydrogen says b = 2d. Three small equations, four unknowns — one degree of freedom left, so pick the free one: let c = 1, then a = 1, b = 3 and d = 1.5. A half molecule is not allowed to exist, so double everything: 2, 6, 2, 3 — the finished answer, with no guessing anywhere in it.
Why this beats inspection: Trial and error works while one element at a time misbehaves. It collapses on the likes of KMnO4 + HCl, where chlorine ends up in three different products at once and every fix breaks a row you already fixed. Algebra does not care — six species, five elements, one exact system, one exact answer: 2, 16, 2, 2, 8, 5. Try it in the box at the top.
The one rule nobody may break: only the coefficients — the big numbers in front — are yours to change. The subscripts inside a formula belong to the substance itself. H2O is water; H2O2 is hydrogen peroxide. Editing a subscript to make a row balance is not balancing the reaction, it is inventing a different one.
Going deeper
A chemical formula is an identity card. The subscripts record how the atoms are actually joined in one particle of the substance: two hydrogens riding on one oxygen is water, full stop. Change a subscript and you have not adjusted the equation, you have swapped in a different chemical — different properties, different reaction, different exam mark.
A coefficient does something entirely different: it counts how many of those particles take part. Writing 2 in front of H2O says two water molecules, each still honestly H2O. Balancing is the art of choosing those counts so that every element’s ledger matches. It says nothing about the particles themselves, which is exactly why it is the only legal move.
Sometimes the algebra comes back with more than one independent solution, and this calculator will tell you so instead of picking one quietly. It usually means two separate reactions have been written as a single equation. A classic: carbon burning in limited oxygen produces both CO and CO2 at once, and any mixture of the two “balances” the combined equation — there is no single right answer, because there is no single reaction.
The honest fix is to split it. Write the reaction for each product on its own, balance each separately, and the ambiguity disappears. The other refusal you may meet is simpler: an element that appears on one side only. That one is never a puzzle — atoms cannot be created or destroyed, so a stranded element always means a missing term, most often a forgotten O2, H2O or CO2.
Four equations, worked by hand and by calculator
The calculator’s proof for every equation is its atom ledger: the same count of each element on both sides, with nothing created and nothing destroyed. The four examples below were all run through this page’s own calculator, so you can reproduce every coefficient by typing the same unbalanced equation in and pressing Balance it. Work each one by hand first if you like, then check it against the ledger, because the habit the calculator rewards is counting, not guessing.
| Unbalanced equation | Balanced equation | Atoms each side | Ledger |
|---|---|---|---|
| C3H8 + O2 → CO2 + H2O | 1C3H8 + 5O2 → 3CO2 + 4H2O | 21 | C 3 = 3, H 8 = 8, O 10 = 10 |
| H2 + O2 → H2O | 2H2 + 1O2 → 2H2O | 6 | H 4 = 4, O 2 = 2 |
| Fe + O2 → Fe2O3 | 4Fe + 3O2 → 2Fe2O3 | 10 | Fe 4 = 4, O 6 = 6 |
| CH4 + O2 → CO2 + H2O | 1CH4 + 2O2 → 1CO2 + 2H2O | 9 | C 1 = 1, H 4 = 4, O 4 = 4 |
Propane, the default, is the classic teaching example because it forces the right order of work. Carbon first: three carbons on the left, in one C3H8, need three CO2 on the right. Hydrogen next: eight hydrogens on the left need four H2O on the right. Oxygen last, because oxygen appears in two products and its count depends on both: three CO2 contribute six oxygens and four H2O contribute four more, ten in total, which needs five O2 on the left. The ledger confirms it, 3 = 3 for carbon, 8 = 8 for hydrogen and 10 = 10 for oxygen, 21 atoms on each side. Notice the coefficient 1 written explicitly on C3H8: the calculator writes 1 where a textbook would leave the space blank, so that every term’s coefficient is visible and countable, and a missing coefficient can never hide as an empty space.
Water formation is the shortest version of the same lesson, and it is where the “never change a subscript” rule earns its keep. H2 + O2 → H2O, unbalanced, has two hydrogens on the left and two oxygens, against two hydrogens and one oxygen on the right. The temptation is to write H2O2, or to change O2 to O, and both are wrong for the same reason: they change what the substances are. The calculator’s answer, 2H2 + 1O2 → 2H2O, changes only the coefficients, giving four hydrogens and two oxygens on each side, six atoms in total. Rust formation, Fe + O2 → Fe2O3, shows the other common difficulty, an odd-even clash: the product has two irons and three oxygens, so the smallest whole-number solution needs four irons and three O2 molecules to make two Fe2O3, with four irons and six oxygens on each side, ten atoms in total. Methane, 1CH4 + 2O2 → 1CO2 + 2H2O, is propane with smaller numbers, one carbon, four hydrogens and four oxygens on each side, nine atoms in total, and it is the fastest check that you have understood the method: carbon, then hydrogen, then oxygen last, because oxygen is the element that appears in both products.
The general method behind all four is algebra in disguise, and the page’s own guide says so: turn the unknown coefficients into letters, write one equation per element, and solve. For propane, with coefficients a, b, c and d on C3H8, O2, CO2 and H2O, carbon gives 3a = c, hydrogen gives 8a = 2d, and oxygen gives 2b = 2c + d. Setting a = 1, the smallest whole-number choice, gives c = 3, d = 4 and b = 5, exactly the calculator’s answer. The calculator then shrinks the solution to the smallest whole numbers, which is why you never see 2C3H8 + 10O2 → 6CO2 + 8H2O from it, even though that equation is also balanced: it is the same solution multiplied by two, and the smallest form is the convention. When a solution needs fractions at an intermediate step, as rust formation does before clearing denominators, the calculator clears them at the end, so the displayed coefficients are always whole numbers, and the ledger always counts whole atoms.
Brackets, big molecules, and the equations the calculator refuses
Brackets are where hand balancing most often goes wrong, and the calculator’s handling of them is worth understanding precisely, because it follows one rule without exception: a number after a closing bracket multiplies everything inside it. In Ca(OH)2, the 2 doubles both the oxygen and the hydrogen, giving one calcium, two oxygens and two hydrogens per formula unit. In Ca3(PO4)2, the outer 2 doubles the whole PO4 group, giving three calciums, two phosphorus and eight oxygens per formula unit. Nested brackets work the same way, from the inside out: (NH4)2SO4 is read as two ammonium groups, each with its own four hydrogens, giving eight hydrogens in total, as the page’s own frequently asked question explains. The preset that tests this, the parentheses test, balances as 3Ca(OH)2 + 2H3PO4 → 1Ca3(PO4)2 + 6H2O, with 31 atoms on each side, four elements in play, calcium, oxygen, hydrogen and phosphorus, and the ledger is the fastest way to confirm that the bracket arithmetic came out right: if a bracket has been misread, exactly one element’s count will be off, and the ledger names it.
The monster preset shows what the same method does at scale. The reaction of potassium permanganate with hydrochloric acid balances as 2KMnO4 + 16HCl → 2KCl + 2MnCl2 + 8H2O + 5Cl2, with 44 atoms on each side and five elements in play, potassium, manganese, oxygen, hydrogen and chlorine. Nobody balances that by inspection in one pass; the algebraic method does it by solving five simultaneous element equations, and the calculator’s value here is not that it knows chemistry, but that it never loses count across five elements and six terms. The photosynthesis preset, run in reverse as the page loads it, balances as 1C6H12O6 + 6O2 → 6CO2 + 6H2O, with 36 atoms on each side, and it is a good reminder that the direction of an equation is a choice about what you are describing, not a property of the balancing: the same coefficients balance the reaction in either direction, and the arrow tells the reader which direction you mean.
Two refusals deserve a plain statement, because a calculator that refuses honestly is more useful than one that guesses quietly. First, this version balances atoms only, not charges: an equation carrying charges, such as Fe2+ or SO4 with a 2− charge, will be stopped and told so, rather than balanced as if the charges were not there, because balancing charge as well as atoms needs a second set of equations, and that is on the page’s own list of future work. For now, balance the neutral skeleton of such a reaction here and account for the charges separately. Second, an equation that cannot be balanced at all is refused with the stranded element named, and that refusal is almost always a missing term rather than a failure of the method: atoms cannot be created or destroyed, so an element that appears on one side only can never be fixed by any coefficients, and the missing term is usually a familiar one, an O2, an H2O or a CO2 left out by accident. Check each element against both sides, find the stranded one, and the missing term usually announces itself. If a bracket is left unclosed, the calculator says so instead of guessing, for the same reason: a guess about where a bracket closes is a guess about what the substance is, and the calculator does not make those.
Checking a balanced equation without the calculator
The ledger habit transfers directly to paper, and it is worth practising on the calculator’s own outputs until it is automatic. Pick any balanced equation, propane for preference, and count each element on each side independently, writing the counts down rather than holding them in your head: carbon 3 against 3, hydrogen 8 against 8, oxygen 10 against 10. Then count the totals: 21 against 21. If every element matches and the totals match, the equation is balanced, and the totals matching alone is not enough, because two wrong element counts can cancel in the total while leaving the equation wrong. If exactly one element is off, the error is in the coefficient of a term containing that element, and the size of the gap tells you how far off you are: an oxygen gap of two, for example, is one O2 molecule, not a rounding difference. If two elements are off, check the term they share first, because a single wrong coefficient on a shared term moves both counts at once.
Finally, keep the two rules that the page’s own guide states in this order: coefficients change, subscripts never do, and the smallest whole numbers win. Changing a subscript changes the substance, turning water into hydrogen peroxide or propane into something else entirely, and no coefficient can repair that. Multiplying every coefficient by two leaves the equation balanced but breaks the convention, and in an exam or a laboratory report the convention is part of the answer. The calculator enforces both rules silently, writing 1 coefficients explicitly and reducing to smallest whole numbers, so that what it displays is not merely a balanced equation but a balanced equation in the form a chemist would write it. Learn to check its ledger, and you will find that you need the calculator less and less for ordinary equations, and that when you do need it, for a monster like the permanganate reaction, you will trust its answer because you know exactly how it was proved.
Counting atoms inside formulas, brackets included
Balancing fails most often not at the equation level but at the formula level, when a bracket or a subscript is counted wrongly and the ledger starts from a wrong number. The table below counts the atoms in the formulas this page uses most, including every bracketed formula in its presets and in its own frequently asked questions, so you can check a count before you ever write a coefficient. The rule, repeated because it is the only rule, is that a subscript counts the element or group immediately before it, and a number after a closing bracket multiplies everything inside the bracket.
| Formula | Atom count | How the count is made |
|---|---|---|
| Ca(OH)2 | Ca 1, O 2, H 2 | The 2 after the bracket doubles both O and H inside it |
| Ca3(PO4)2 | Ca 3, P 2, O 8 | The 3 counts calcium; the 2 doubles the whole PO4 group, giving P 2 and O 8 |
| (NH4)2SO4 | N 2, H 8, S 1, O 4 | Two ammonium groups, each N 1 and H 4, plus S 1 and O 4 outside the bracket |
| H3PO4 | H 3, P 1, O 4 | Plain subscripts, no bracket involved |
| KMnO4 | K 1, Mn 1, O 4 | Plain subscripts, no bracket involved |
| C6H12O6 | C 6, H 12, O 6 | Plain subscripts, no bracket involved |
With those counts in hand, the parentheses preset can be checked term by term without the calculator. On the left, 3Ca(OH)2 contributes 3 calciums, 6 oxygens and 6 hydrogens, and 2H3PO4 contributes 6 hydrogens, 2 phosphorus and 8 oxygens, giving totals of calcium 3, hydrogen 12, phosphorus 2 and oxygen 14. On the right, 1Ca3(PO4)2 contributes 3 calciums, 2 phosphorus and 8 oxygens, and 6H2O contributes 12 hydrogens and 6 oxygens, giving the same totals, calcium 3, hydrogen 12, phosphorus 2 and oxygen 14, and the 31 atoms on each side that the calculator displays are those totals added together: 3 + 12 + 2 + 14 is 31. If your hand count gives 30 or 32, the error is in a bracket, and the table above shows where to look: the usual mistake is counting Ca(OH)2 as one oxygen and one hydrogen, forgetting the bracket multiplier, which loses one oxygen and one hydrogen per formula unit, or three of each across the three units, and the ledger will show exactly that gap.
The inspection order that experienced balancers use follows from the same counting discipline, and it is worth learning even though the calculator solves by algebra. Balance elements that appear in only one term on each side first, because their coefficients are then forced by a single comparison, and leave elements that appear in several terms, hydrogen and oxygen above all, until last, because their counts depend on everything else. In propane, that order is carbon, then hydrogen, then oxygen, which is why the guide above works in that sequence and why oxygen, appearing in both CO2 and H2O, is the element whose coefficient is computed last, as 5O2. In the permanganate reaction, the same order still applies in principle, but the simultaneous equations are what make it tractable, and the calculator’s ledger is the check that the inspection order, applied by hand, would eventually reach. Coefficients, once found, are also mole ratios: 1C3H8 + 5O2 → 3CO2 + 4H2O says that one mole of propane reacts with five moles of oxygen to give three moles of carbon dioxide and four moles of water, and that reading is why balanced equations matter beyond the classroom, because every quantitative statement about a reaction, how much reactant is needed and how much product is made, starts from those ratios.
Net ionic equations: spectators out, charge checked
A net ionic equation shows only the species that change. Spectator ions cancel, and the charge balance is the proof that the cancellation was done right.
Many reactions in solution are best written as net ionic equations, showing only the ions that actually react, with spectator ions, the ions present on both sides unchanged, removed. Silver nitrate and sodium chloride give silver chloride precipitate: the full equation is AgNO3 + NaCl gives AgCl + NaNO3, the ionic equation shows Ag+ + NO3- + Na+ + Cl- gives AgCl + Na+ + NO3-, and cancelling the spectators, Na+ and NO3-, leaves the net ionic equation Ag+ + Cl- gives AgCl. Count the net equation: silver 1 each side, chlorine 1 each side, and charge plus 1 plus minus 1 equals 0 on the left, 0 on the right, because the solid carries no charge. The charge check is what proves the cancellation: a net ionic equation whose charges do not match has lost or gained an ion in the cancelling, and the error is in the spectators, not in the chemistry.
Redox reactions need the same treatment with one addition: electrons lost must equal electrons gained. Zinc displacing copper, Zn + Cu2+ gives Zn2+ + Cu, counts zinc 1 each side and copper 1 each side, and charges plus 2 on the left, from Cu2+, and plus 2 on the right, from Zn2+, so atoms and charge both balance, with zinc oxidised and copper reduced. Where the half-reactions do not balance in electrons, multiply the half-reactions to equalise the electrons before adding them, and the full equation that results will balance in atoms and charge together, because both conservations were enforced. The calculator handles ionic equations with charges, as its FAQ states, and names a stranded element where the counting cannot close; the net ionic form is the form to enter when the question is what actually reacts, rather than what was mixed.
Frequently asked questions
What does it mean to balance a chemical equation?
It means choosing the coefficients — the numbers in front of each formula — so that every element has exactly the same number of atoms on both sides of the arrow. Atoms are rearranged in a reaction, never created or destroyed, so an unbalanced equation is not a shorthand, it is simply wrong: it claims atoms appeared from nowhere or vanished. When every element’s count matches, the equation is an honest account of the reaction.
Why can I change the coefficients but never the subscripts?
Because they mean different things. A subscript is part of a substance’s identity: H2O is water and H2O2 is hydrogen peroxide, and no amount of wishing makes them the same chemical. A coefficient only counts how many particles of that substance take part. Balancing is purely a counting exercise, so the coefficients are the only numbers you are allowed to move.
How does this calculator find the coefficients?
By algebra, not by guessing. It reads every formula into atom counts, gives each species an unknown coefficient, and writes one equation per element: atoms in must equal atoms out. That system is solved exactly, fractions included, and the solution is then scaled to the smallest whole numbers. It is the same answer the inspection method crawls towards — reached directly, and provable in the atom ledger under the result.
Can it balance ionic equations with charges?
Not yet — honestly. This version balances atoms only, so if your equation carries charges (a + or – written after a formula, as in Fe2+ or SO4 2-), the calculator will stop and tell you rather than quietly pretending the charges are not there. Balancing charge as well as atoms needs a second set of equations, and it is on the list. For now, balance the neutral skeleton of the reaction here and account for the charges separately.
Why did the calculator say my equation cannot be balanced?
Almost always because one element appears on only one side of the arrow. Atoms cannot be created or destroyed, so no coefficients can fix that — a term is missing, and it is usually a familiar one: an O2, an H2O or a CO2 left out by accident. Check each element in turn against both sides. The calculator names the stranded element, which is the fastest clue to which term was dropped.
Does it handle brackets like Ca(OH)2, and formulas inside formulas?
Yes. A closing bracket multiplies everything inside it, so the 2 in Ca(OH)2 doubles both the oxygen and the hydrogen, and the 2 in Ca3(PO4)2 doubles the whole PO4 group. Nested brackets work the same way, from the inside out — (NH4)2SO4 is read as two ammonium groups, each with its own four hydrogens, giving eight in total. If a bracket is left unclosed the calculator says so instead of guessing.
Why does the calculator write a coefficient of 1?
So that every term’s coefficient is visible and countable. Textbooks leave a coefficient of 1 blank, but a blank space can hide a missing coefficient, and in a ledger every term needs a number to multiply by. The default equation is displayed as 1C3H8 + 5O2 → 3CO2 + 4H2O, and the 1 on C3H8 is what lets the ledger count three carbons on the left against three on the right without guessing.
What should I do when the calculator names a stranded element?
Add the missing term that contains it. A stranded element appears on one side only, and no coefficients can fix that, because atoms cannot be created or destroyed. The missing term is usually a familiar one, an O2, an H2O or a CO2 left out by accident. Check each element against both sides, find the stranded one, and the term you dropped usually announces itself.
Can I balance an equation with charges on it?
Not on this version, honestly. The calculator balances atoms only, so an equation carrying charges, such as Fe2+ or a sulfate ion with a 2− charge, will be stopped and told so rather than balanced as if the charges were not there. Balancing charge as well as atoms needs a second set of equations. For now, balance the neutral skeleton of the reaction here and account for the charges separately.
How do I check a balanced equation on paper?
Count each element on each side independently, in writing. For propane: carbon 3 against 3, hydrogen 8 against 8, oxygen 10 against 10, and 21 atoms in total on each side. If exactly one element is off, the error is in a term containing that element, and the size of the gap tells you how far off you are: an oxygen gap of two is one O2 molecule. Totals matching alone is not enough, because two wrong element counts can cancel in the total while leaving the equation wrong.
What is a net ionic equation?
An equation showing only the species that actually change in a reaction, with spectator ions removed. For silver nitrate and sodium chloride, the net ionic equation is Ag+ + Cl- gives AgCl, with Na+ and NO3- cancelled as spectators. Atoms and total charge must both balance in the net equation, and the charge check proves the cancellation was done right.
How do you balance a redox equation?
Balance atoms as usual, and additionally balance electrons: electrons lost in oxidation must equal electrons gained in reduction. Write the two half-reactions, multiply them to equalise the electrons, add them, and cancel the electrons. The resulting equation balances in both atoms and charge. For Zn + Cu2+ gives Zn2+ + Cu, zinc is oxidised and copper is reduced, and charges are +2 on both sides.
Why must coefficients be the smallest whole numbers?
Because the equation states a ratio, and the smallest ratio is the canonical form: 2H2 + O2 gives 2H2O states the same chemistry as 4H2 + 2O2 gives 4H2O, but the doubled form is not the accepted equation. Dividing by the common factor gives the smallest whole numbers, which is the form examiners and calculators expect, and which makes the mass and mole ratios readable directly.
Related calculators
Molecular Weight
The mass of any formula, element by element.
🧪Molarity
Concentration from moles and volume.
💧Dilution
Stock volumes for a target concentration.
🧱Density
Mass, volume and density in any direction.
🧮Scientific Calculator
Powers, roots, logs and trig for heavier working.
📖How to Balance Chemical Equations
Four steps with worked examples: water, methane, iron, and propane, with atom counts.