Skip to main content
Mathovia

Science / Chemistry

Chemical Equation Balancer

Enter an unbalanced chemical equation using formulas such as Fe + O2 -> Fe2O3. The calculator parses each compound, conserves every element, and returns the simplest whole-number coefficients.

Balanced equation
4 Fe + 3 O2 -> 2 Fe2O3
Coefficient pattern
4 : 3 -> 2
Atom check
Fe: 4 = 4, O: 6 = 6

The balancer builds an element-by-compound matrix and solves for the coefficient ratio that makes each element count equal on both sides. It then reduces the result to the smallest positive whole numbers.

Source: Based on the law of conservation of mass and exact rational linear algebra.

Written by
MPhil in Mathematics, Founder of Mathovia
Published

Mathematics verification: Mathematical formulas, calculations, worked examples and solutions are reviewed for accuracy before publication. How we check our work

Balancing a chemical equation means putting a coefficient in front of each formula so that every element has the same number of atoms on both sides. It is the working form of the law of conservation of mass: a reaction rearranges atoms into new combinations, but it never creates or destroys them. This calculator takes a typed reaction, reads the atom counts out of each formula, and solves for the coefficients directly, rather than restricting you to one reaction type.

Chemical Equation Balancer formula
The Chemical Equation Balancer formula

How balancing works, as algebra

Assign an unknown coefficient to each compound. For each element, write an equation setting its total on the left equal to its total on the right. For Fe + O₂ → Fe₂O₃ with coefficients , , :

Pick : then and . The balancer does this with exact fractions for any number of compounds and elements, then scales the answer to the smallest positive whole numbers.

How to Balance a Chemical Equation (step by step)

Step One: Write formulas and separate the sides

Enter each substance with its correct chemical formula, put plus signs between substances on the same side, and use one arrow between reactants and products.

unbalanced equation = Fe + O2 -> Fe2O3
input = Fe + O2 -> Fe2O3

Step Two: Count each element in every compound

The parser reads subscripts and parentheses as atom counts. A missing subscript means one atom, while a subscript after parentheses multiplies the entire group.

Fe = 1 Fe
O2 = 2 O
Fe2O3 = 2 Fe + 3 O
element rows = Fe, O
compound columns = Fe, O2, Fe2O3

Step Three: Solve the conservation equations

The calculator finds coefficients that make each element total match on both sides. It uses exact fractions internally, so a temporary fractional ratio does not create rounding errors.

iron balance: Fe coefficient = 2 x Fe2O3 coefficient
oxygen balance: 2 x O2 coefficient = 3 x Fe2O3 coefficient
coefficient ratio = 4 : 3 : 2

Step Four: Reduce the coefficients to whole numbers

Multiply through by the smallest common factor, then divide out any common divisor. Coefficients of one are omitted in the displayed equation.

balanced equation = 4 Fe + 3 O2 -> 2 Fe2O3
coefficient pattern = 4 : 3 -> 2
atom check = Fe: 4 = 4, O: 6 = 6

What your results mean

The balanced equation is the reaction written with the smallest whole-number mole ratio. The default example says that 4 moles of iron react with 3 moles of oxygen to form 2 moles of iron(III) oxide. Those coefficients can be carried into a stoichiometry calculator when you need masses, limiting reactants, or theoretical yield.

The coefficient pattern shows the numbers in input order, first for reactants and then for products. The atom check is a quick audit of the result: every listed element should have the same total on each side. For mass-based work, calculate each compound’s formula weight with a molar mass calculator before converting the mole ratio into grams.

Input limits and common mistakes

Use valid formulas and do not change subscripts to force a balance. The parser supports normal element symbols, nested parentheses or brackets, hydrate notation with a middle dot, and common state labels. It does not interpret reaction conditions, catalysts, electron-transfer notation, or unusual charge notation as separate balancing entities, so verify redox reactions and ionic equations carefully.

More balanced examples

UnbalancedBalanced
H₂ + O₂ → H₂O2 H₂ + O₂ → 2 H₂O
CH₄ + O₂ → CO₂ + H₂OCH₄ + 2 O₂ → CO₂ + 2 H₂O
C₃H₈ + O₂ → CO₂ + H₂OC₃H₈ + 5 O₂ → 3 CO₂ + 4 H₂O
Al + HCl → AlCl₃ + H₂2 Al + 6 HCl → 2 AlCl₃ + 3 H₂
KMnO₄ + HCl → KCl + MnCl₂ + H₂O + Cl₂2 KMnO₄ + 16 HCl → 2 KCl + 2 MnCl₂ + 8 H₂O + 5 Cl₂

Where balancing fits in

  • Before any stoichiometry — the coefficients are the mole ratio every mass calculation depends on.
  • Combustion analysis — balancing a hydrocarbon burn gives the oxygen demand and CO₂/H₂O output.
  • Lab prep — knowing the ratio of reagents to combine.
  • Teaching and homework, where the balancing procedure itself is the exercise.

Common mistakes

  • Changing a subscript to balance. That makes a different substance; only coefficients may change.
  • Leaving a polyatomic ion split up when it stays intact through the reaction — balance it as a unit.
  • Stopping at a fractional coefficient instead of scaling to whole numbers.
  • Forgetting to re-check a hydrate’s water molecules on both sides.

Carry the balanced coefficients into the stoichiometry calculator for masses and yields, and use the molar mass calculator for each compound’s formula weight.

About the formula: The balancer builds an element-by-compound matrix and solves for the coefficient ratio that makes each element count equal on both sides. It then reduces the result to the smallest positive whole numbers.

Frequently Asked Questions

What format should I enter the equation in?+

Formulas separated by plus signs with one arrow, like Fe + O2 -> Fe2O3. Starting coefficients, parentheses, brackets, hydrate dots, and state labels such as (aq) or (s) are all accepted.

How do you balance Fe + O2 -> Fe2O3?+

4 Fe + 3 O₂ -> 2 Fe₂O₃. Iron: 4 = 2 × 2. Oxygen: 3 × 2 = 2 × 3 = 6. Both sides match with the smallest whole numbers.

Does a coefficient change the chemical formula?+

No. A coefficient multiplies the whole formula and changes only the amount. Changing a subscript would create a different compound, which is why you never balance by editing subscripts.

Why does the balancer give the smallest whole-number ratio?+

An equation is a mole ratio, so 4:3:2 and 8:6:4 describe the same reaction. Reducing to the smallest integers is the conventional, unambiguous form.

Can it balance redox and ionic equations?+

It balances atoms by conservation of mass and will handle many ionic equations, but it does not track electron transfer or half-reactions. Check redox results against the oxidation-number changes.

What if my equation can't be balanced?+

If the formulas are correct and there's still no whole-number solution, the reaction as written violates conservation of mass — usually a typo in a formula, a missing product, or an unbalanced charge.

Related calculators