Skip to content
ToolBoxGeniehome

Chemical Equation Balancer

Calculators · Added

Enter a reaction and get the smallest whole-number coefficients that conserve every element, along with the atom count on each side so you can check the answer rather than take it. It is solved as a system of linear equations in exact fractions, not by trial and error, which is why it can tell you when an equation cannot be balanced at all.

Separate the sides with = or ->. Brackets, hydrate dots and subscripts pasted from a document all work.

Try one

How to use the chemical equation balancer

  1. 1Type the equation with = or -> between the two sides, as in CH4 + O2 = CO2 + H2O.
  2. 2Separate species with +. Any coefficients you have already written are ignored.
  3. 3Press Balance.
  4. 4Read the coefficients, then check the atom table — it recounts the finished answer element by element.

Examples

Methane burning

Input
CH4 + O2 = CO2 + H2O
Result
CH4 + 2 O2 → CO2 + 2 H2O

Carbon 1 to 1, hydrogen 4 to 4, oxygen 4 to 4.

A reaction with six species

Input
KMnO4 + HCl = KCl + MnCl2 + H2O + Cl2
Result
2 KMnO4 + 16 HCl → 2 KCl + 2 MnCl2 + 8 H2O + 5 Cl2

The kind of equation trial and error takes twenty minutes to lose patience with.

One that cannot balance

Input
H2 + O2 = H2O + NaCl
Result
Rejected, naming sodium as an element that appears on one side only

A balancer that returned coefficients here would be inventing atoms.

About the chemical equation balancer

Why the coefficients are unique

Balancing feels like a puzzle with several possible answers, because 2 H2 + O2 → 2 H2O and 4 H2 + 2 O2 → 4 H2O are both true statements. What makes one of them the balanced equation is the convention that the coefficients share no common factor.

The algebra says the same thing more precisely. The set of valid coefficient vectors is a line through the origin — pick any point on it and every other point is a multiple. Choosing the smallest positive integer point on that line is what reducing by the greatest common divisor does, and it is why two people balancing the same equation correctly always arrive at the same numbers.

What balancing does not tell you

A balanced equation is a statement about counting, not about chemistry. It says nothing about whether the reaction happens at room temperature, how fast it goes, what catalyst it needs, or whether the products are the ones that actually form. Plenty of perfectly balanced equations describe reactions that never occur.

It also says nothing about the states of matter or the conditions, which is why the aqueous, solid and gaseous labels are written in by hand rather than derived. Use the coefficients for stoichiometry — how much of one thing reacts with how much of another — and treat everything else on the page as a separate question.

Exact fractions, and why they matter here

Solving a linear system in ordinary floating-point arithmetic leaves values like 0.30000000000000004 where a clean zero belongs. Usually that is harmless. Here it is not, because the entire method turns on deciding whether an entry has been eliminated to exactly zero, and a value that is nearly zero but not quite changes the rank of the matrix and therefore the answer.

So every value in the elimination is a fraction of two integers, kept in lowest terms, with arbitrary-precision arithmetic underneath. Nothing is ever rounded until the coefficients are already whole numbers. The atom table below the result is then an independent recount of that answer, which is the check that would catch a mistake in any of it.

Frequently asked questions

How does it balance an equation?
Every element gives one equation: atoms of that element on the left equal atoms on the right. Treat the coefficients as unknowns and the whole problem is a homogeneous linear system, whose solutions are the null space of the element matrix. Reducing that solution to whole numbers with no common factor gives the balanced equation, and it explains why the answer is unique — there is only one direction in that null space to scale along.
Why does it sometimes say an equation cannot be balanced?
Because it genuinely cannot. If an element appears on one side only, no coefficients can even the count, and the tool names the element rather than reporting a bare failure. The other case is a system whose only solution is all zeros, which usually means a formula has a wrong subscript or a product is missing — water is the one most often left out.
What does “more than one independent balance” mean?
That the null space has more than one dimension, so there is a family of valid coefficient sets rather than a single one. In practice it means what was entered is two reactions written as one equation. No answer would be more correct than any other, so it says so instead of picking one and looking confident.
Can it balance ionic or half-equations?
No. Charge is a conserved quantity as much as atoms are, and the formula parser here reads atoms only, so an equation needing electrons is refused rather than balanced on atoms alone and presented as finished. Enter the full reaction with neutral formulas on both sides.
Why do the two masses differ in the last decimal place?
Mass is conserved exactly; standard atomic weights are not exact. They are averages over natural isotope abundance, published to a limited number of figures, so summing them on each side leaves a difference of a thousandth of a gram per mole or so. That difference is a check on the rounding, not a physical result — the atom table is what says the equation balances.