Chemical Equation Balancer (Coefficient Calculator)

Enter an unbalanced chemical equation like H2 + O2 -> H2O and instantly get the smallest positive integer coefficients that satisfy conservation of mass.

Examples of commonly balanced equations

Common reactions from middle and high school chemistry, along with their balanced coefficients — useful for checking your work before you solve one yourself.

Reaction Unbalanced equation Balanced equation
Combustion of hydrogen H2 + O2 → H2O 2H2 + O2 → 2H2O
Rusting (oxidation) of iron Fe + O2 → Fe2O3 4Fe + 3O2 → 2Fe2O3
Complete combustion of methane CH4 + O2 → CO2 + H2O CH4 + 2O2 → CO2 + 2H2O
Complete combustion of propane C3H8 + O2 → CO2 + H2O C3H8 + 5O2 → 3CO2 + 4H2O
Redox reaction of potassium permanganate with hydrochloric acid KMnO4 + HCl → KCl + MnCl2 + H2O + Cl2 2KMnO4 + 16HCl → 2KCl + 2MnCl2 + 8H2O + 5Cl2

What balancing a chemical equation means

Balancing a chemical equation means placing coefficients in front of the reactants and products so that each element appears the same number of times on both sides. It is the algebraic way of honouring the law of conservation of mass: matter is neither created nor destroyed in a reaction, so the atom count cannot change across the arrow.

Enter an unbalanced equation such as H2 + O2 -> H2O and this tool solves the resulting system of linear equations to find the smallest set of positive whole-number coefficients that satisfies conservation of mass. Formulas containing brackets and redox reactions are handled as well.

How to use the balancer

  1. Type the equation Separate reactants and products with "+" and join the two sides with an arrow (->, = or → all work).
  2. Leave any existing coefficients alone Numbers already in the equation are ignored and recalculated, so there is no need to strip them out first.
  3. Read the result The balanced coefficients are listed for each reactant and product as the smallest whole numbers that satisfy the equation.
  4. Load a sample to see the format The sample button loads a representative reaction so you can see how results are presented before entering your own.

Tips for getting more out of it

  • You do not need to type coefficients yourself — any numbers already in your equation are ignored and recalculated from scratch.
  • The arrow can be written as "->", "=", or "→", so pasting a Unicode arrow character works fine too.
  • Formulas with parentheses (e.g. Fe2(SO4)3) are supported, so more complex salts can be balanced as well.
  • If an equation "should" balance but does not, double-check that every element listed on the reactant side also appears on the product side.
  • Try loading one of the sample equations first to see how the result table is laid out before typing your own equation.

When the balancer is useful

Chemistry homework at school

Use it to check answers to balancing exercises, or to verify coefficients you worked out by hand.

Coefficients for awkward redox reactions

Reactions such as potassium permanganate with hydrochloric acid are tedious to balance by hand; here the correct coefficients come out mechanically.

The first step in a stoichiometry calculation

Combined with a molar mass calculation, a balanced equation is the starting point for working out how much reactant you need or how much product you get.

Writing up a laboratory report

When you want the reaction in your report written with the correct coefficients, this gives you a quick check.

Terms used in balancing equations

Law of conservation of mass
The principle that the total mass of matter does not change during a chemical reaction. Demonstrated by Antoine Lavoisier in the eighteenth century, it is the theoretical basis for balancing equations.
Coefficient
The number placed before a whole compound to say how many units of it take part. It differs from the subscript inside a formula, which counts atoms; balancing changes only the coefficients.
Reactants and products
The substances on the left of the arrow, before the reaction, are the reactants; those on the right, after it, are the products.
Redox reaction
A reaction involving the transfer of electrons. Some, such as potassium permanganate with hydrochloric acid, need specialised methods like the half-reaction approach when balanced by hand.
Gaussian elimination
An algorithm for solving systems of linear equations mechanically. This tool applies it to the condition that each element must have equal atom counts on both sides.

Frequently asked questions

Changing a subscript turns the substance into a completely different compound (for example, changing the subscript in H2O produces H2O2, hydrogen peroxide — a different substance entirely). Balancing an equation means adjusting only the coefficient, which represents how many units of an unchanged substance participate in the reaction.

This tool always returns the smallest possible set of integers after dividing out the greatest common divisor, so the coefficients shown are already fully reduced. If your own hand calculation produced all-even coefficients, check whether they share a common factor that can be divided out further.

This usually means the elements on the reactant side do not match the elements on the product side (a typo or an actually incorrect equation), or the formula notation itself is invalid (an unknown element symbol or an unclosed parenthesis). Make sure compounds are separated by "+" and written with correct element symbols (uppercase followed by lowercase).

The law of conservation of mass states that the total mass of substances does not change during a chemical reaction. Balancing an equation is the mathematical way of enforcing this law — it ensures the number of atoms of every element is exactly equal on both sides of the arrow.
Tool-kun

Side Note — the algorithm behind balancing and the law of conservation of mass

The idea of balancing a chemical equation with coefficients rests on the law of conservation of mass, proposed in the 18th century by the French chemist Antoine Lavoisier. By precisely measuring combustion reactions inside sealed vessels, he demonstrated that total mass does not change during a reaction, overturning the earlier phlogiston theory, which held that burning caused a loss of mass.

When students first balance equations by hand in school chemistry, the most common stumbling block is confusing coefficients with subscripts. A coefficient scales the whole compound, while a subscript counts atoms within a single molecule — changing the latter creates an entirely different substance. The algorithm behind this tool (finding the null space of a system of linear equations) strictly respects that distinction while mechanically deriving the correct coefficients.

For more complex redox reactions — such as potassium permanganate reacting with hydrochloric acid — working out coefficients by hand can be tedious and often requires specialized techniques like the half-reaction method, which tracks the transfer of electrons. The Gaussian-elimination-based algorithm used here can solve even these equations purely from the requirement that atom counts match on both sides, without needing to track electron transfer at all.