UnitConv
Chemistry

Chemical Equation Balancer

Type any chemical reaction and get the balanced equation with the smallest whole-number coefficients — plus a table that proves every element is balanced.

Try an example:

Balanced equation

C6H12O6+6O26CO2+6H2O

Atom count (proof of balance)

ElementReactantsProductsBalanced
O1818
H1212
C66

About the Chemical Equation Balancer

Balancing chemical equations means finding the whole-number coefficients that make the number of atoms of each element the same on both sides — a requirement of the law of conservation of mass. This balancer does it automatically: type a reaction such as C6H12O6 + O2 -> CO2 + H2O and it returns the smallest possible whole-number coefficients (here 1, 6, 6, 6) together with an atom-count table that shows the left and right sides match for every element. It understands parentheses and polyatomic ions like Ca(OH)2 and Ca3(PO4)2, hydrates written with a dot such as CuSO4·5H2O, and reactions with many products like the KMnO4 + HCl redox. Everything is computed with exact fraction arithmetic in your browser, so the coefficients are always correct integers with no rounding error and your input never leaves your device.

How to balance an equation

  1. 1 Type your reaction in the box, using an arrow (-> or =) between the reactants and products, for example Fe + O2 -> Fe2O3.
  2. 2 Separate each substance with a plus sign (+) and write formulas with subscripts as plain numbers, e.g. H2O, CO2, Ca(OH)2.
  3. 3 Read the balanced equation — the smallest whole-number coefficients are added automatically (a coefficient of 1 is left out).
  4. 4 Check the atom-count table below: it lists each element with its total on the left and right side and a check mark confirming they match.

How the balancing works

Each formula is parsed into a count of every element. The balancer then builds a matrix with one row per element and one column per substance, using positive counts for reactants and negative counts for products. The set of valid coefficient vectors is exactly the null space of this matrix, so the tool solves it with exact rational (fraction) arithmetic — no floating point — and scales the result to the smallest positive whole numbers by clearing denominators and dividing by their greatest common divisor. If the null space is empty the reaction is unbalanceable; if it has two or more dimensions the input describes more than one independent reaction and is reported as ambiguous.

Frequently asked questions

What input format does the balancer accept?

Write reactants and products separated by + and joined by an arrow: -> , = , → or ⇌ all work. Use ordinary subscripts as numbers (H2O, CO2), parentheses for groups (Ca(OH)2, Fe2(SO4)3), and a dot for hydrates (CuSO4·5H2O or CuSO4.5H2O). You can leave out coefficients — the tool computes them.

Why does it say my equation is unbalanceable?

An equation is unbalanceable when no set of whole-number coefficients can make every element match — usually because an element appears on only one side, or a formula has a typo. Double-check that each element occurs on both the reactant and product side and that all formulas are spelled correctly.

What does the 'ambiguous' message mean?

Some inputs can be balanced in more than one independent way (the math has multiple free solutions), which usually means you've combined two separate reactions. Balance each reaction on its own and the tool will give a single, unique answer.

How is this different from the Equation Solver?

The Equation Solver handles mathematical equations — linear and quadratic equations where you solve for x. This Chemical Equation Balancer works on chemistry reactions, finding the coefficients that conserve atoms. They solve completely different problems.

Related tools

Continue exploring chemistry on UnitConv: compute the molar mass of any compound, or visualize the periodic table, pH scale and molarity. For math equations like 2x + 3 = 7, use the Equation Solver instead.