Science & engineering

Chemical equation balancer

Balance a chemical equation with the smallest whole-number coefficients, including ions.

Chemical equation balancer
Esc to restore

Your inputs

Use -> or = between reactants and products. Ions: Fe^3+ and SO4^2-. Electrons: e^-. Write species without coefficients.

Results update as you type. Larger files run when you press Update result.

Your result

Your result will appear here.

More actions

Your inputs stay in this browser. Nothing is uploaded, and nothing is saved unless you choose “Save result”.

A clear answer. Here’s how.

Builds a matrix with one row per element (plus one for charge, when ions appear) and one column per species, reactants positive and products negative. Exact rational Gaussian elimination finds the null space, which must have exactly one dimension; the solution is scaled to the smallest positive whole numbers. If the equation has no solution, several independent solutions, or needs a zero coefficient, the tool says so. It checks conservation only, not whether the reaction occurs.

See a worked example

Worked example

A fixed demonstration, separate from the values you enter above.

Equation (separate species with “ + ”)
C3H8 + O2 -> CO2 + H2O

Example result

Example result
SpeciesSideCoefficient
C3H8Reactant1
O2Reactant5
CO2Product3
H2OProduct4

Solved exactly: atoms of each element (and net charge, if any) are conserved, using rational arithmetic to find the smallest whole-number coefficients. Write ions as Fe^3+ or SO4^2- and electrons as e^-. Hydrates use a dot, as in CuSO4.5H2O. Balancing checks conservation only; it does not say whether the reaction really happens.