⚗ The Backyard Scientist

Chemical equation balancer with steps

This free chemical equation balancer finds the smallest whole-number coefficients for any reaction — including ions, electrons and hydrates — and shows the algebra, the RREF matrix, an atom-by-atom check, molar masses and the limiting reagent.

Examples:

How to use this chemical equation balancer

Type the reactants on the left and the products on the right, separated by =, -> or →, with a + between species — for example Fe + O2 = Fe2O3. Press Balance (or Ctrl + Enter). The balancer returns the smallest whole-number coefficients, 4Fe + 3O₂ → 2Fe₂O₃, names the reaction type, and shows an atom-count table that proves every element is the same on both sides. You can type any coefficients you already have; they are ignored and recalculated.

Everything runs in your browser with exact fraction arithmetic (JavaScript BigInt), so even monsters such as the potassium ferrocyanide–permanganate reaction come out exactly: 10, 122, 299, 162, 5, 122, 60, 60, 188. Nothing is sent to a server, and after the first visit the tool works offline and can be installed as an app.

What you can type

The method: algebra and matrices, shown step by step

Balancing is conservation of atoms written as algebra. Give every species an unknown coefficient (a, b, c…). For each element, the atoms on the left must equal the atoms on the right; that gives one linear equation per element. For propane combustion, a C₃H₈ + b O₂ → c CO₂ + d H₂O gives C: 3a = c, H: 8a = 2d, O: 2b = 2c + d. Put the counts in a composition matrix (products negative), reduce it to reduced row echelon form, and read off the null space. Setting the free variable to 1 gives a = 1/4, b = 5/4, c = 3/4, d = 1, and multiplying by 4 clears the fractions: C₃H₈ + 5O₂ → 3CO₂ + 4H₂O.

Open Step-by-step solution under any result to see exactly this working for your own equation: the letters, the element equations, the RREF matrix in exact fractions, the fractional solution and the multiplier. It is the same layout a teacher expects in a "balancing using matrices" or "algebraic method" answer.

Balancing by inspection (the classroom shortcut)

  1. Balance metals first, then non-metals other than H and O.
  2. Balance hydrogen, then oxygen last — O often appears in several species.
  3. Treat polyatomic ions that survive unchanged (SO₄, NO₃, PO₄) as a single unit.
  4. If you end with a half (for example 7/2 O₂), multiply everything by 2.
  5. Never change a subscript: that changes the substance. Only change coefficients.

Inspection works for most textbook equations; the matrix method always works, which is why this balancer uses it and then shows the counts so you can check by eye.

Redox and ionic equations

In ionic equations, charge is conserved too. The balancer treats charge as one more row of the matrix. MnO4^- + Fe^2+ + H^+ = Mn^2+ + Fe^3+ + H2O becomes MnO₄⁻ + 5Fe²⁺ + 8H⁺ → Mn²⁺ + 5Fe³⁺ + 4H₂O, with a total charge of +17 on each side. For half-equations add electrons: Cr2O7^2- + H^+ + e- = Cr^3+ + H2O gives Cr₂O₇²⁻ + 14H⁺ + 6e⁻ → 2Cr³⁺ + 7H₂O. The tool never invents species; if water, H⁺ or OH⁻ is missing, add it yourself.

When an equation cannot be balanced

Three honest outcomes are possible. If only the all-zero solution exists, the equation is impossible as written and the tool names any element that appears on one side only (a typo such as NaCl = Na + Cl2 + H2). If coefficients would have to be zero or negative, a species does not take part. If the solution space has more than one dimension — for example H2 + O2 = H2O + H2O2 — the "balance" is not unique because two independent reactions are mixed; the tool says so and shows one all-positive answer with the smallest numbers.

Beyond balancing: molar masses and stoichiometry

Every result also lists the molar mass of each species (IUPAC 2021 standard atomic weights) and the total mass on each side, so you can see the law of conservation of mass at work. Type grams of each reactant in the stoichiometry box and the tool finds the limiting reagent, the excess left over and the theoretical yield of every product in moles and grams — the next question on most worksheets. For a single compound use the molar mass calculator; for gases, the ideal gas law calculator; and to round your final answers correctly, the significant figures calculator.

Reaction types it recognises

Combustion (hydrocarbon + O₂ → CO₂ + H₂O), synthesis (A + B → AB), decomposition (AB → A + B), single replacement (A + BC → AC + B), double replacement (AB + CD → AD + CB) and ionic/redox. The label is a quick guide for students; it describes the pattern of the equation, not whether the reaction actually happens.

Common balanced equations

ReactionBalanced
Photosynthesis6CO₂ + 6H₂O → C₆H₁₂O₆ + 6O₂
RespirationC₆H₁₂O₆ + 6O₂ → 6CO₂ + 6H₂O
Methane combustionCH₄ + 2O₂ → CO₂ + 2H₂O
Rusting of iron4Fe + 3O₂ → 2Fe₂O₃
Haber processN₂ + 3H₂ → 2NH₃
Ostwald process (step 1)4NH₃ + 5O₂ → 4NO + 6H₂O
Copper + dilute nitric acid3Cu + 8HNO₃ → 3Cu(NO₃)₂ + 2NO + 4H₂O
Thermite2Al + Fe₂O₃ → Al₂O₃ + 2Fe

Frequently asked questions

How do you balance a chemical equation?

Change only the coefficients in front of each formula until every element has the same number of atoms on both sides (and, for ions, the same total charge). Type the equation above and the balancer does this exactly, then shows the working.

Can it balance redox and ionic equations?

Yes. Write charges as Fe^3+, SO4^2- or NO3- and electrons as e-. Charge is added as an extra row in the matrix, so both atoms and charge balance.

Does it show the steps?

Yes. Open “Step-by-step solution” to see the unknown coefficients, one equation per element, the reduced row echelon matrix in exact fractions and the multiplier that gives whole numbers.

Why does it say my equation cannot be balanced?

Usually an element appears on one side only (a typo or a missing product), or the products you typed are not what the reaction forms. The tool names the element that is missing.

What does “not unique” mean?

Some equations combine two independent reactions, so infinitely many balances exist. The tool shows one all-positive answer with the smallest numbers and tells you the balance is not unique.

Can I calculate grams of product?

Yes. Type the grams of each reactant in the stoichiometry box to get the limiting reagent, excess and theoretical yield of each product.

Is the chemical equation balancer free and private?

Yes. It is free, needs no sign-up, and runs entirely in your browser; nothing you type is uploaded.

More tools

Keyboard shortcuts

Ctrl + EnterBalance