Skip to content
K Knidox Search…
Chemistry · Reactions

Equation Balancer

Automatically balance any chemical equation by mass and charge.

Use = or -> between sides, + between species.
Balanced equation

2H2 + O2 → 2H2O

To balance a chemical equation, add whole-number coefficients so each element has the same atom count on both sides — the law of conservation of mass. For H₂ + O₂ → H₂O, the balanced form is 2 H₂ + O₂ → 2 H₂O, giving 4 H and 2 O on each side.

How balancing works

A balanced equation has the same number of each atom on both sides — the law of conservation of mass. The balancer treats each element as an equation, builds a system of linear equations from the formulas, and solves for the smallest set of whole-number coefficients that satisfies them all at once.

Worked example

Balance H₂ + O₂ → H₂O, the formation of water.

  1. 1
    Count atoms on each side. Left: 2 H, 2 O. Right: 2 H, 1 O. Oxygen doesn’t match yet.
  2. 2
    Adjust coefficients to balance oxygen. Put a 2 in front of H₂O → 2 H₂O. Now the right has 4 H and 2 O.
  3. 3
    Rebalance hydrogen. Put a 2 in front of H₂ → 2 H₂ + O₂ → 2 H₂O. Both sides now have 4 H and 2 O.

Common reaction types

Balanced examples; coefficients of 1 are written implicitly.

TypeBalanced equationPattern
Synthesis2 H₂ + O₂ → 2 H₂OA + B → AB
Decomposition2 H₂O → 2 H₂ + O₂AB → A + B
CombustionCH₄ + 2 O₂ → CO₂ + 2 H₂Ofuel + O₂ → CO₂ + H₂O
Single replacementZn + 2 HCl → ZnCl₂ + H₂A + BC → AC + B
Double replacementAgNO₃ + NaCl → AgCl + NaNO₃AB + CD → AD + CB

Why coefficients, not subscripts

Change how many molecules, never the molecule. You balance by adjusting coefficients in front of formulas. Changing a subscript — turning H₂O into H₂O₂ — would change the substance from water to hydrogen peroxide.

Balance one element at a time. A useful order is metals first, then non-metals, then hydrogen, then oxygen last. Polyatomic ions that stay intact can be balanced as a single unit.

Common mistakes. Editing subscripts, leaving fractional coefficients (multiply the whole equation through to clear them), and forgetting to recount every element after each change.

How do I enter an equation?
Use + between species and = or -> between the two sides, e.g. Fe + O2 = Fe2O3.
What if it can’t be balanced?
The tool flags equations that aren’t balanceable or have multiple independent solutions.
Does it balance charge for ions?
This version balances by atoms. Ionic charge-balancing is on the roadmap.
Why coefficients instead of subscripts?
Coefficients change how many molecules react; subscripts change what the molecule is. Editing a subscript would turn one compound into a different one.
What order should I balance by hand?
Metals first, then other non-metals, then hydrogen, then oxygen last. Treat unchanged polyatomic ions as single units.
Why are the coefficients reduced to smallest whole numbers?
Any multiple of a balanced equation is also balanced (4 H₂ + 2 O₂ → 4 H₂O works too), so the convention is the smallest set of integers. The tool divides through by the greatest common divisor to give that simplest form.