Chemical Equation Balancer

Matter Doesn't Appear or Vanish Mid-Reaction

Every atom present in the reactants of a chemical equation has to show up somewhere in the products — that's the law of conservation of mass, and it's why chemical equations need coefficients in front of each formula to balance out. Getting those coefficients right by trial and error works for simple reactions, but larger ones benefit from solving the atom-conservation system directly.

The Method

For each element: sum of atoms on the reactant side = sum of atoms on the product side

This calculator sets up one conservation equation per distinct element across the reaction and solves the resulting linear system with exact fractions, then scales the result to the smallest set of whole-number coefficients — avoiding the floating-point rounding errors a decimal-based solver could introduce.

Where This Calculation Matters

  • Stoichiometry calculations — every mole-ratio calculation depends on starting from a correctly balanced equation.
  • Verifying a proposed reaction — if an equation can't be balanced with sensible coefficients, that's a signal the reaction as written is incomplete or wrong.
  • Combustion and energy calculations — balanced combustion equations are the starting point for calculating fuel efficiency and emissions.
  • Teaching reaction stoichiometry — balancing equations is a foundational skill before any quantitative chemistry can be attempted.

A Worked Example

The unbalanced combustion of methane, CH4 + O2 -> CO2 + H2O, balances to:

CH4 + 2 O2 → CO2 + 2 H2O

Checking each element confirms it: 1 carbon and 4 hydrogens on each side, and 4 oxygens on each side (2 from O2 × 2, matching 2 from CO2 and 2 from the two H2O molecules).

How to Use This Calculator

  1. Enter the Unbalanced Equation, separating reactants and products with an arrow (e.g. CH4 + O2 -> CO2 + H2O).
  2. Separate multiple species on each side with a plus sign.
  3. Select Calculate to get the balanced equation with whole-number coefficients.
Note: This balancer supports up to three reactants, three products, and five distinct elements, and it solves for a single unique set of whole-number coefficients — equations with multiple independent solutions or more elements than that are outside its scope.

Related Calculations

Once an equation is balanced, use the Stoichiometry Calculator to find the mass of product formed from a given amount of reactant. If more than one reactant is limited, check the Limiting Reactant Calculator next.