What this calculator does
Type in a chemical reaction and get the numbers that make it balance, with every step shown. In a reaction, atoms are never created or destroyed. They are only rearranged. A balanced equation shows this with a number in front of each substance, called a coefficient. With the right numbers, every element has the same number of atoms on both sides of the arrow. Those same numbers also give the mole ratios you'll use in any amount-of-chemical (stoichiometry) problem that follows.
Type an equation such as C3H8 + O2 -> CO2 + H2O, and the balancer finds the smallest whole numbers that work. It doesn't use trial and error. Instead it writes one equation per element and solves them with exact fractions. That way, even long redox equations (reactions where electrons move between atoms) come out right. You'll see those atom equations, the ratio of the numbers and a final count of every element on each side. If no set of positive numbers works, or the equation can be balanced in several unrelated ways, it tells you why instead of guessing.
Where it's used
Why this math matters outside the classroom:
- Combustion. Chemistry students balance propane burning as C₃H₈ + 5O₂ → 3CO₂ + 4H₂O before working out how much oxygen it uses.
- Mole ratios. Lab students read 2H₂ + O₂ → 2H₂O to see that 4 mol of hydrogen needs exactly 2 mol of oxygen.
- Rusting iron. Balancing 4Fe + 3O₂ → 2Fe₂O₃ shows that every 4 iron atoms take up 3 oxygen molecules as iron rusts.
- Cellular respiration. Biology classes balance C₆H₁₂O₆ + 6O₂ → 6CO₂ + 6H₂O to track the oxygen used for each glucose molecule.
- Neutralization. Lab technicians confirm that NaOH + HCl → NaCl + H₂O is already balanced, a 1:1 ratio of base to acid.
How to use it
- Type the starting substances (reactants), an arrow (-> or =) and the substances formed (products). Put a plus sign between substances.
- Write each formula with the right capital letters, such as NaCl, Ca(OH)2 or CuSO4·5H2O. Any numbers you type in front are ignored. State labels such as (aq) or (g) are fine.
- Read the balanced equation and the list of coefficients, in order.
- Open the working to see the unknown numbers, one atom-balance equation per element, the solution and the check.
What the inputs mean
- Unbalanced equation
- Capital letters matter: Co is cobalt, but CO is carbon monoxide. Brackets can go inside other brackets. Write a hydrate (a compound with water attached) with a dot or an asterisk. Ion charges and free electrons aren't supported, so balance net ionic equations or half-reactions by hand.
Formula and method
a·Reactant₁ + b·Reactant₂ → c·Product₁ + d·Product₂ for each element: Σ (coefficient × atoms) on the left = Σ (coefficient × atoms) on the right C₃H₈ + O₂ → CO₂ + H₂O: C: 3a = c, H: 8a = 2d, O: 2b = 2c + d solution scaled to the smallest whole numbers: a : b : c : d = 1 : 5 : 3 : 4
The letters a, b, c and d are the unknown numbers in front, one for each substance. Σ means "add up". Each element gives one equation: its atoms on the reactant side must equal its atoms on the product side. Together these make a set of equations with one row per element and one column per substance. Mathematicians call it a homogeneous linear system, because every equation equals zero once you move everything to one side.
The calculator solves that set by elimination (row reduction), using exact fractions. When one of the unknowns is left free, every answer is a multiple of a single ratio. The calculator clears the fractions by multiplying by their lowest common denominator. Then it divides by any shared factor, which leaves the smallest whole numbers.
If none of them is free, the only answer is all zeros, so the equation can't be balanced. If two or more are free, the equation mixes separate reactions and has no single balanced form. A negative or zero answer means a substance is on the wrong side, or doesn't take part.
Worked example
Balance the burning of propane: C3H8 + O2 -> CO2 + H2O.
- Write a C₃H₈ + b O₂ → c CO₂ + d H₂O.
- Carbon: 3a = c. Hydrogen: 8a = 2d. Oxygen: 2b = 2c + d.
- Setting a = 1 gives c = 3 and d = 4, then 2b = 6 + 4 = 10, so b = 5.
- Check: C 3 = 3, H 8 = 8, O 10 = 10.
Result: C₃H₈ + 5O₂ → 3CO₂ + 4H₂O. One molecule of propane needs five molecules of oxygen. It forms three of carbon dioxide and four of water, with 21 atoms on each side.
Understanding the result
Coefficients count molecules (or formula units), and equally moles. They are not masses. 5O₂ means five oxygen molecules for every propane molecule, not five grams. To get grams, use molar masses.
When you balance, you never change the small numbers inside a formula (the subscripts). That would turn one substance into another. Only the numbers in front change.
Assumptions and limitations
- Every substance is a neutral formula unit, with no electric charge. The equation lists every reactant and product.
- You get the smallest whole-number set. Any multiple of it is also balanced.
- Ion charges, electrons and half-reactions aren't supported. Redox equations written with ions must be balanced by hand.
- Balancing shows that atoms are conserved. It doesn't show whether the reaction really happens, or how far it goes.
- Up to 12 substances per equation.
Frequently asked questions
Why can't I change the subscripts to balance an equation?
The subscripts define the substance. Changing H2O to H2O2 turns water into hydrogen peroxide. Balancing only changes how many units of each substance take part. That's what the numbers in front tell you.
What does it mean if an equation can't be balanced?
No set of positive numbers in front makes every element match. Usually a formula is mistyped, a product is missing, or a substance is on the wrong side. The error message names the problem when it can, for example an element that appears on one side only.
Why does the calculator say there is more than one way to balance it?
Some equations are really two reactions written together, such as H2 + O2 -> H2O + H2O2. Any mix of the two balanced reactions works, so there's no single answer. Split it into separate equations.
How does this relate to stoichiometry?
Stoichiometry is working out the amounts of chemicals in a reaction, and the numbers in front are its mole ratios. In 2H₂ + O₂ → 2H₂O, every 2 mol of hydrogen reacts with 1 mol of oxygen to give 2 mol of water. That's the starting point for limiting-reagent and yield problems.
Are the coefficients always the smallest whole numbers?
Yes. The exact answer is scaled so all the numbers in front are whole numbers with no shared factor. For burning octane, that's 2C₈H₁₈ + 25O₂ → 16CO₂ + 18H₂O, not a version with a fraction such as 12.5.
How this calculator is checked
Method: Conservation of atoms per element, solved as the integer null space of the element-composition matrix by exact rational Gauss–Jordan elimination; formulas parsed by the shared chemical formula parser. The calculation is covered by automated tests with known reference values and edge cases. Last updated 2026-10-18. Found a problem? Tell us.
Embed this calculator
Put this Chemical Equation Balancer Calculator on your own website or blog for free. Paste this code where you want it to appear: