EN

Chemical Equation Balancer with Steps

A chemical equation is only correct when every element appears in equal numbers on both sides of the arrow. Atoms are neither created nor destroyed — they are rearranged. Balancing means finding the coefficients, the numbers written in front of each formula, that restore that count.

The equation is entered as it would be on scrap paper, with no coefficients at all. The calculator returns the smallest whole-number coefficients, lists the atom count element by element and checks that the total mass is conserved. Ionic equations are supported: the charge is written after a caret, as in Fe^3+, SO4^2-, MnO4^-.

Nothing here is trial and error. The answer comes from the null space of a matrix, computed with exact fractions. If a set of coefficients exists it is found; if none exists, that is stated plainly — no “roughly balanced”.

Your equation

Equation to balance

Separate species with + and the two sides with = or ->. Brackets and hydrates are accepted: Ca(OH)2, CuSO4·5H2O. Do not write any coefficient in front of a formula — that is what the calculation is for.

Examples to copy: C3H8 + O2 = CO2 + H2O (propane combustion) · Fe + O2 = Fe2O3 (rusting of iron) · C6H12O6 + O2 = CO2 + H2O (cellular respiration) · KMnO4 + HCl = KCl + MnCl2 + H2O + Cl2 (permanganate redox reaction) · Ca(OH)2 + H3PO4 = Ca3(PO4)2 + H2O (phosphate precipitation) · MnO4^- + Fe^2+ + H^+ = Mn^2+ + Fe^3+ + H2O (ionic equation (charges))

Balanced equation

C3H8 + 5 O2  →  3 CO2 + 4 H2O

  • C3H8 1
  • O2 5
  • CO2 3
  • H2O 4

Atom count, element by element

ElementReactant sideProduct sideBalance
C 3 3 ✔ conserved
H 8 8 ✔ conserved
O 10 10 ✔ conserved

Conservation of mass

A properly balanced equation conserves not only the atoms but, as a direct consequence, the mass: the sum of the molar masses weighted by the coefficients is the same on both sides.

SpeciesCoefficientMolar massMass involved
C3H8 1 44.097 g/mol 44.097 g
O2 5 31.998 g/mol 159.990 g
→ CO2 3 44.009 g/mol 132.027 g
→ H2O 4 18.015 g/mol 72.060 g
Reactants total 204.087 g
Products total 204.087 g

A residual gap of a few thousandths of a gram comes only from rounding the standard atomic masses, never from the coefficients — those are exact.

For every element e: Σ (coefficient × atoms of e) reactants = Σ (coefficient × atoms of e) products

As entered (every coefficient set to 1)13 atoms6 atomsreactantsproductsC : 3 ≠ 1H : 8 ≠ 2O : 2 ≠ 3Once balanced21 atoms21 atomsreactantsproductsC : 3 = 3H : 8 = 8O : 10 = 10
Balancing means moving from the top pan to the bottom one: the formulas never change, only the coefficients written in front of them.

Terms marked with an asterisk are defined in the glossary at the foot of the article.

The atom inventory has to close before anything else does

A chemical equation is an inventory. As many carbon atoms on the product side as on the reactant side, and the same for every other element. Mass conservation is not a slogan hung above the bench. It is what follows once that inventory closes. Atomic masses are constants: match the atoms and the grams take care of themselves.

The converse is not a method. An equation that happens to “weigh out” while skipping a hydrogen is still wrong. Rounding never stands in for a count.

Without honest coefficients, the rest of stoichiometry* drifts. Mole ratios, which reactant runs out first, how many litres of gas to expect — all of that assumes the line already conserves every element. This page does not tidy handwriting. It closes the count. The limiting reactant and percent yield come after, once that inventory is shut.

Coefficient in front, subscript inside the formula

The subscript is part of the substance. In H2O the 2 says water carries two hydrogens. Change it and the formula is H2O2, hydrogen peroxide, a different compound. The coefficient* sits in front. 2 H2O is two moles of water. That number is the one that moves.

subscript = what the species is  ·  coefficient = how many of them

4 Fe and Fe4 are not interchangeable. Four iron atoms on one side; a hypothetical Fe4 molecule on the other. It is the classic GCSE slip, and it returns in A-level as soon as a polyatomic ion already carries a 4 that must be left alone. SO4 is sulfate. Turning it into SO2 to “make oxygen fit” writes a different reaction.

Brackets multiply the group, not the reaction. Ca(OH)2 already holds two hydroxide units — two O, two H — before any coefficient is written. 3 Ca(OH)2 therefore engages six hydroxides. Mix the two storeys and the calcium count goes with them.

Inspection method: scarce element first, oxygen last

Inspection is not guessing. The usual order starts with the element that appears in only one formula on each side — carbon in a hydrocarbon fire, often a metal in an oxide. That coefficient then constrains the next. Hydrogen follows. Oxygen is left until last: it sits in O2, CO2, H2O, oxides, acids. Moving it early undoes the numbers just set.

  1. Pick the “once-only” element and fix its coefficient.
  2. Carry on with hydrogen, or with whichever element is shared least.
  3. Close on oxygen, then walk the whole inventory again, including the atoms that looked finished.

Iron rusting is short enough to do on a margin. Fe + O2 → Fe2O3. Two Fe on the right demand 2 Fe on the left, until oxygen — three atoms on the right — asks for 3/2 O2. Double through: 4 Fe + 3 O2 → 2 Fe2O3.

A polyatomic ion that survives on both sides (SO4, NO3, PO4) can be treated as a block, so long as the reaction does not break it. Once it splits, drop back to atoms. If the line will not close in three passes, stop patching. Algebra is faster, and it does not leave a “nearly”.

Hydrocarbon combustion, the school workhorse

CxHy + O2 → CO2 + H2O. Methane from the North Sea, propane in a cylinder, octane as a stand-in for petrol: the same three moves.

  1. Coefficient 1 in front of CxHy (or 2 if y is odd, to keep water whole).
  2. x in front of CO2, y/2 in front of H2O.
  3. In front of O2: half of (2x + y/2), which is x + y/4.

Propane, C3H8: 3 CO2, 4 H2O, so 5 O2. Integers at once. Octane, C8H18: 8 CO2, 9 H2O, 12.5 O2. Both C8H18 + 12.5 O2 → 8 CO2 + 9 H2O and 2 C8H18 + 25 O2 → 16 CO2 + 18 H2O are correct. The doubled form suits a molecule count. The half-oxygen form suits a heat of combustion per mole of fuel.

An oxygenated fuel (ethanol, a fatty acid) uses the same order, with x + y/4 reduced by the oxygen already in the molecule. Ethanol is C2H6O, not C2H6. Miss that atom and the oxygen coefficient is a mole too high.

Algebra: one unknown per species

Place an unknown in front of each formula: a, b, c… Each element supplies one equation, left-hand atoms equal right-hand atoms. The system is linear. It is often short by one independent equation. Pin the smallest positive integer and the rest follow.

Blast furnace, on paper: a Fe2O3 + b CO → c Fe + d CO2. Iron: 2a = c. Carbon: b = d. Oxygen: 3a + b = 2d. Set a = 1 and the rest is b = 3, c = 2, d = 3.

Fe2O3 + 3 CO → 2 Fe + 3 CO2

That is what a balancer does off-stage. The conservation matrix* has one row per element (plus a charge row when ions are present) and one column per species. Atoms on the left count positive, atoms on the right negative. A set of coefficients balances the equation if and only if the corresponding vector lies in the null space* of that matrix.

A · x = 0   with x > 0 and integer

The arithmetic is exact fractions, never floating point. A rounded pivot yields coefficients such as 2.9999, which cannot be trusted into integers. The vector is then scaled to the smallest whole numbers: LCM of the denominators, then GCD of the numerators. Three outcomes, all reported: null-space dimension 1, the unique solution (up to a factor) that textbooks want; dimension 0, an impossible equation; dimension 2 or more, more than one independent reaction hiding on the same line.

Fractions appear on the way. Multiply through unless there is a reason to keep ½ O2 — that reason is thermochemistry, below.

Charge belongs in the tally, not as an afterthought

MnO4− on the left, Mn2+ on the right: the manganese and the oxygen can match while the charge does not. An ionic equation that “works” in atoms and manufactures electricity is not an equation. Charge is one more row in the inventory. Sum on the left equals sum on the right.

An electron is not an atom. Its mass is about 1/1836 of a proton’s and is ignored, as in every school table. It still carries charge −1, and that charge enters the tally. Notation on this page: Fe^3+, SO4^2-, e^-. Without the sign, the electron is not recognised.

Leave H+ out of an acidic permanganate reduction and eight hydrogens go missing, together with a charge that will not close. Leave water out and the product side is the one that fails. The table shows it at once, provided the charge row is kept in step with the element rows.

Redox half-reactions in acidic and in basic medium

A redox* process moves electrons. The half-reaction* method writes oxidation and reduction apart, balances each, then adds them once the electron counts match. This page balances atoms and charge on the line as entered. It does not choose the medium, and it does not insert H+ or OH− on its own.

In acidic medium the school order is four steps.

  1. Balance atoms other than O and H.
  2. Balance O by adding H2O to the side that is short of oxygen.
  3. Balance H by adding H+.
  4. Balance charge by adding electrons e−.

Permanganate in acid: MnO4− + 8 H+ + 5 e− → Mn2+ + 4 H2O. Iron(II): Fe2+ → Fe3+ + e−. Five of the second, add:

MnO4− + 8 H+ + 5 Fe2+ → Mn2+ + 4 H2O + 5 Fe3+

In basic medium the least error-prone route is often to balance as if the solution were acidic, then add as many OH− to both sides as there are H+. H+ and OH− on the same side become water; surplus water cancels. Writing H2O and OH− from the start is the same arithmetic, a little more exposed to sign slips.

Oxidation numbers are a check, not a substitute. Mn goes from +7 in MnO4− to +2 in Mn2+: five electrons, recovered in the half-reaction. A mismatch between that count and the e− on the line means the half-reaction is still open, not that the medium is “more or less acidic”.

Fractional coefficients, and why thermochemistry keeps them

½ O2 means half a mole of oxygen gas — 16 g, 11.2 dm3 at STP — not a molecule snipped in two in the flask. A mole is already a packet of 6.022 × 1023 entities. Half that packet is still a whole number of molecules, absurd to count one by one, entirely proper as an amount of substance.

Formation enthalpies ΔfH° are quoted per mole of product. The line is H2 + ½ O2 → H2O, not 2 H2 + O2 → 2 H2O; otherwise the tabulated enthalpy would be doubled. A preparative recipe doubles instead, to count bottles and rounded volumes. Neither reading is more “true”. Smallest integers are convenient for a head-count of species. Fractions are convenient when the table is normalised to one mole of product.

This page returns the smallest integers. The “per mole of product” form is recovered by dividing the whole line by that product’s coefficient.

How a line gets wrecked: wrong subscript, missing water, a reaction that never runs

Three habits break a balancing without looking like much.

  • Changing a subscript. H2O turned into H2O2, Ca(OH)2 into CaOH2: a different compound. The atom inventory may even close — on a reaction that is no longer the one set.
  • Dropping a species. Water, most often, in a redox. Or H+, or OH−, or a counter-ion kept on purpose. A missing species is a missing column, and the null space then reports “impossible”, correctly.
  • Writing a reaction that does not happen, perfectly balanced. The tool counts atoms. It does not know about mechanisms, electrode potentials or rates.

Balanced does not mean it runs. N2 + 3 Mg → Mg3N2 adds up, atom for atom. Doing it cold in a beaker does not. Dinitrogen is inert under those conditions; magnesium nitride forms on heating, not on a bench at 20 °C.

A quieter trap: a species on the wrong side of the arrow. The solver looks for strictly positive coefficients. If none exist, a product has often been typed among the reactants, or the reverse. Flipping the arrow is not balancing. It is a different reaction.

Capitalisation, last. Cl is not CL. Co is not CO. An unknown symbol is rejected; that is the point. A lowercase “co” is not cobalt.

Reading moles, grams and litres of gas off a balanced equation

Coefficients are amounts of substance, in moles, never grams. 2 H2 + O2 → 2 H2O reads: two moles of hydrogen per mole of oxygen, giving two moles of water. In mass, with M(H2) ≈ 2.016 g mol−1 and M(O2) = 32.00 g mol−1, that is 4.03 g of H2 against 32.00 g of O2, and 36.03 g of water. Mass is conserved, as the atom count already guaranteed; the gram table is the mole table multiplied by the M values. Molar mass is computed from the formula, separately.

n = m / M  ·  m = n × M  ·  Vgas ≈ n × 22.4 dm3 (STP) or n × 24 dm3 (RTP)

At STP (0 °C, 1 atm) one mole of ideal gas occupies 22.4 dm3. Two moles of H2 and one of O2 are 44.8 dm3 against 22.4 dm3. UK A-level more often uses RTP, 20 °C and 1 atm, 24 dm3 mol−1. A litre is a mole only under the convention in force. Otherwise n = PV/RT first, coefficients afterwards.

Comparing 4 g of H2 with 32 g of O2 and concluding “eight times less, so limiting” is the twin of taking a coefficient for a gram. The useful ratio is n/ν, and ν comes from the line just balanced.

Under-determined equations: more than one independent reaction

More unknowns than distinct elements, and the system has infinitely many solutions. The mild case is a simple multiple: 2, 2, 2 instead of 1, 1, 1. Same ratio; cancel. The serious case is two independent reactions written as one line.

C + O2 → CO + CO2 is not one reaction. It is the formation of carbon dioxide and the formation of carbon monoxide, superimposed. 3 C + 2 O2 → 2 CO + CO2 “works” just as 3 C + 2.5 O2 → CO + 2 CO2 does. The atoms match. Which mixture actually forms depends on temperature, oxygen excess, the catalyst. A null space of dimension 2 flags that. The coefficients shown are one all-positive solution, not the only one, and not “the true” one.

Incomplete combustion is written as two equations, or a measured CO/CO2 ratio is supplied to close the system. Without that extra datum, balancing cannot choose.

State symbols do not enter the count

State symbols* — (s) solid, (l) liquid, (g) gas, (aq) aqueous — help a reader. They do not belong in the atom inventory. A (g) is not added to “make a hydrogen fit”. H2O(g) and H2O(l) carry the same atoms. What changes is enthalpy, volume, sometimes the position of equilibrium. Not the count.

They earn their keep all the same. A precipitation is written Ag+(aq) + Cl−(aq) → AgCl(s). Methane burnt in air is CH4(g) + 2 O2(g) → CO2(g) + 2 H2O(g) or (l), according to whether the water is taken as steam or condensed — and ΔcH is not the same. This page does not require states. It does not balance them either.

Spectator ions and the net ionic line

In AgNO3 + NaCl → AgCl + NaNO3, sodium and nitrate pass through unchanged. Once the atom and charge inventories have closed, they may be struck out. What remains is Ag+ + Cl− → AgCl(s). That is the net ionic equation.

This page does not drop them of its own accord. If Na+ is entered on both sides, it is balanced on both sides, coefficient for coefficient. For the net form, the net form is what should be typed. Keeping spectators is not an error — it is the molecular equation, the one needed to weigh out the salts. Striking them before the count is closed is the error.

Oxidation numbers as a check, not a method

Assigning oxidation numbers, then shifting electrons until the changes cancel, is a useful audit of a redox line already written. It is a poor way to invent missing species. The +7 to +2 drop on manganese tells how many electrons the half-reaction must carry. It does not conjure the eight H+ or the four H2O. Those come from the medium, and from the oxygen count.

On a molecular equation with no ions shown (KMnO4 + HCl → …), oxidation numbers still flag which element is oxidised and which reduced. The atom inventory, including the spectators K+ and Cl− if they are written, remains the thing that has to close. Numbers of oxidation do not replace it.

Glossary

Stoichiometry
The mole ratios imposed by an already balanced equation. Once the coefficients are in place, they fix how many moles of B react per mole of A, and how much C can be expected.
Coefficient (stoichiometric)
The number written in front of a formula. It states how many entities of that species take part in one “mole of reaction”. It is not part of the formula: 2 H2O is two moles of water, not a new hydrate.
Conservation matrix
A table of numbers: one row per chemical element (plus a charge row if ions are present), one column per species. Each entry is the number of atoms of that element in that species, counted positive on the left of the arrow and negative on the right.
Null space (kernel)
The set of vectors x such that A·x = 0. Here, those vectors are exactly the sets of coefficients that conserve every element. Dimension 1 is the usual unique solution; dimension 0, an impossible equation; dimension 2 or more, more than one independent reaction.
Redox
Oxidation–reduction: a process in which electrons pass from a reducing agent (which is oxidised) to an oxidising agent (which is reduced). The atom count is not enough; charge, and often H+ or OH− from the medium, must close as well.
Half-reaction
Oxidation or reduction written on its own, with electrons on one side only. The electron counts of the two half-reactions are equalised, then the halves are added to recover the overall equation.
State symbol (s, l, g, aq)
A physical label after a formula: solid, liquid, gas, or aqueous solute. It specifies conditions, not the number of atoms. It is not balanced.

Related calculators