PublicSoftTools
Tools6 min read

Chemical Equation Balancer — How to Balance Any Reaction

Balancing chemical equations is one of the most practised skills in chemistry — and one of the most error-prone when done manually. The free chemical equation balancer on PublicSoftTools uses linear algebra to find the correct stoichiometric coefficients automatically, with an element-by-element conservation check to verify the result.

Why Equations Must Be Balanced

The law of conservation of mass states that atoms are neither created nor destroyed in a chemical reaction. An unbalanced equation like H₂ + O₂ → H₂O implies that one oxygen atom disappears — which is physically impossible. Balancing gives the minimum integer ratio of molecules that satisfies conservation for every element.

Common Balanced Reactions

UnbalancedBalancedReaction type
H₂ + O₂ → H₂O2H₂ + O₂ → 2H₂OSynthesis
CH₄ + O₂ → CO₂ + H₂OCH₄ + 2O₂ → CO₂ + 2H₂OCombustion
Fe + O₂ → Fe₂O₃4Fe + 3O₂ → 2Fe₂O₃Oxidation
Al + HCl → AlCl₃ + H₂2Al + 6HCl → 2AlCl₃ + 3H₂Single displacement
C₆H₁₂O₆ + O₂ → CO₂ + H₂OC₆H₁₂O₆ + 6O₂ → 6CO₂ + 6H₂OCellular respiration

How to Use the Chemical Equation Balancer

  1. Open the chemical equation balancer.
  2. Type the unbalanced equation using + between compounds and -> or = as the arrow.
  3. Click Balance (or press Enter).
  4. Read the balanced equation and check the element conservation table below it.
  5. Click Copy to copy the balanced equation.

How the Algebraic Method Works

Step 1: Assign unknown coefficients

Label each compound with an unknown coefficient: aH₂ + bO₂ → cH₂O. Conservation of each element gives one equation: for H, 2a = 2c (so a = c); for O, 2b = c. Setting a = 1 gives c = 1 and b = 1/2, which scales to 2H₂ + O₂ → 2H₂O.

Step 2: Build the element matrix

The tool builds a matrix where each row is an element and each column is a compound (reactants positive, products negative). Gaussian elimination finds the null space of this matrix — the coefficient vector that makes every row sum to zero.

Step 3: Scale to integers

The null space solution may contain fractions. The tool finds the least common multiple of all denominators and multiplies through to get the smallest whole-number coefficients.

Handling Complex Formulas

Parenthesised groups

Ca(OH)₂ means one calcium, two oxygen, and two hydrogen atoms. Enter it exactly as Ca(OH)2 — the balancer correctly distributes the multiplier. Fe₂(SO₄)₃ similarly expands to 2Fe, 3S, and 12O atoms.

Combustion reactions

For hydrocarbon combustion, write fuel + O2 -> CO2 + H2O. The coefficients for complex fuels (C₈H₁₈ = octane, for example) are calculated automatically. The result often includes a coefficient of 25/2 for O₂, which the tool scales to whole numbers (multiply all by 2).

Acid-base reactions

Enter reactions like Ca(OH)2 + H3PO4 -> Ca3(PO4)2 + H2O. The tool handles multi-atom ions correctly because each element is tracked independently — phosphorus, calcium, oxygen, and hydrogen each have their own conservation equation.

Common Mistakes

Changing subscripts instead of coefficients

A common error is trying to balance by writing H₃ instead of 3H₂. Subscripts define the molecule — changing them creates a different substance. Only the coefficients (the numbers in front) can be changed.

Forgetting polyatomic ions

In Ca(OH)₂, the OH group contains both oxygen and hydrogen. Both must be counted when checking conservation. The balancer handles this automatically — if you are doing it by hand, count each element in the full expanded formula.

Balance Any Chemical Equation

Enter your unbalanced reaction and get the correct coefficients with element conservation verification.

Open Chemical Equation Balancer