Skip to main content
ilovecalcs logoilovecalcs.

Chemistry · Live

Chemical Equation Balancer, stoichiometry solved instantly.

Type any unbalanced chemical equation and get the correct stoichiometric coefficients instantly, with an atom count table to verify the result. Supports parenthetical groups like Ca(OH)₂ and complex multi-compound reactions.

Input

Chemical equation

Use = or -> to separate reactants and products. Separate compounds with +.

Type a chemical equation above to balance it instantly.

Examples

Try a sample equation

Input guide

How to type formulas

Elements:H, O, Fe, Na, Ca
Subscripts:H2O, CO2, Fe2O3
Parentheses:Ca(OH)2, Al(NO3)3
Separator:= or -> between sides
Plus sign:+ between compounds

Element symbols are case-sensitive: use Fe, not FE or fe.

Common elements

HCNONaMgAlSClKCaFeCuZnAgBaPb

Field guide

How to balance chemical equations.

A balanced chemical equation obeys the Law of Conservation of Mass: the total number of atoms of each element is the same on the reactant side and the product side. Balancing is the process of finding the smallest whole-number coefficients (stoichiometric coefficients) that achieve this equality.

Why equations must be balanced

In any chemical reaction, atoms are neither created nor destroyed, only rearranged. An unbalanced equation suggests that atoms appear or disappear, which violates fundamental chemistry. Stoichiometry, the branch of chemistry dealing with the quantitative relationships between reactants and products, is entirely built on balanced equations. Without balancing, you cannot calculate how much product a reaction will yield, how much of each reactant you need, or the theoretical yield of a synthesis.

The inspection (trial and error) method

For simple equations, balancing by inspection works well. The steps are:

  1. Write the unbalanced equation with formulas for all reactants and products.
  2. Count the atoms of each element on both sides.
  3. Add coefficients to compounds (never change the subscripts inside a formula) so that the atom counts match on both sides.
  4. Start with elements that appear in only one compound on each side, then balance hydrogen and oxygen last (they usually appear in multiple compounds).
  5. Reduce the coefficients to the smallest whole numbers by dividing by their greatest common divisor.

Worked example: combustion of hydrogen

Unbalanced: H₂ + O₂ = H₂O

Atom count (unbalanced)
H: 2 on left, 2 on right (H₂ has 2, H₂O has 2) ✓
O: 2 on left (O₂), 1 on right (H₂O) ✗

Oxygen is unbalanced. Place a coefficient of 2 in front of H₂O: H₂ + O₂ = 2H₂O. Now oxygen balances (2 on each side), but hydrogen has 2 on the left and 4 on the right. Place a coefficient of 2 in front of H₂: 2H₂ + O₂ = 2H₂O.

Final check: 2H₂ + O₂ → 2H₂O
H: 4 on left (2 x 2), 4 on right (2 x 2) ✓
O: 2 on left, 2 on right (2 x 1) ✓

Worked example: combustion of methane

Methane (CH₄) is the primary component of natural gas. Its combustion with oxygen produces carbon dioxide and water:

Unbalanced: CH₄ + O₂ = CO₂ + H₂O
C: 1 left, 1 right ✓
H: 4 left, 2 right ✗ (need 2H₂O)
CH₄ + O₂ = CO₂ + 2H₂O
O: 2 left, 4 right ✗ (2 from CO₂ + 2 from 2H₂O = 4)
CH₄ + 2O₂ = CO₂ + 2H₂O ✓

The algebraic method (how this calculator works)

For complex equations, a systematic algebraic approach is used. Assign a variable (a, b, c, d...) to the unknown coefficient of each compound, then write one linear equation per element expressing that the total atom count on the left equals the total on the right. This produces a homogeneous system of linear equations. The solution is the null space of the coefficient matrix, which this calculator finds using Gaussian elimination with exact rational arithmetic.

For photosynthesis: CO₂ + H₂O = C₆H₁₂O₆ + O₂

Let coefficients be a, b, c, d:
C: a = 6c → a = 6c
H: 2b = 12c → b = 6c
O: 2a + b = 6c + 2d → 12c + 6c = 6c + 2d → d = 6c
Setting c = 1: a = 6, b = 6, c = 1, d = 6
6CO₂ + 6H₂O → C₆H₁₂O₆ + 6O₂

Understanding stoichiometric ratios

The coefficients in a balanced equation are not just for balancing atoms, they represent molar ratios. In 2H₂ + O₂ → 2H₂O, two moles of hydrogen react with one mole of oxygen to produce two moles of water. If you have 4 grams of hydrogen (approximately 2 moles), you need 32 grams of oxygen (1 mole) to react completely. This is the foundation of quantitative chemistry.

Common types of chemical reactions

  • Combustion: A substance reacts with oxygen to produce carbon dioxide and water (for hydrocarbons) or oxides for other elements. CH₄ + 2O₂ → CO₂ + 2H₂O.
  • Synthesis: Two or more substances combine to form one product. 2Na + Cl₂ → 2NaCl.
  • Decomposition: One compound breaks down into two or more simpler substances. 2H₂O → 2H₂ + O₂.
  • Single displacement: One element replaces another in a compound. Zn + CuSO₄ → ZnSO₄ + Cu.
  • Double displacement: Two compounds exchange ions. BaCl₂ + Na₂SO₄ → BaSO₄ + 2NaCl.
  • Neutralisation: An acid reacts with a base to form a salt and water. HCl + NaOH → NaCl + H₂O.

Disclaimer

This calculator handles the most common types of chemical equations encountered in introductory and intermediate chemistry. It may not correctly balance ionic equations, equations with radical species, or highly complex multi-step reactions. Always verify the result against the element count table shown below the balanced equation.