Skip to content

Chemical equation balancer

Enter the formulas on both sides of a reaction. The calculator returns the smallest positive whole-number coefficients and shows the atom count for every element.

Current scope: the calculator accepts neutral chemical formulas only. It does not balance ionic charges or electron half-reactions. Do not use it for redox equations written with ions and electrons.

Free chemistry calculator

Balance a chemical equation

Enter the reactants and products. The calculator finds the smallest positive whole-number coefficients and checks each element.

Separate substances with + and the two sides with ->, =, or ⇌. Existing coefficients are optional.

Try an example

This version balances neutral formulas. Ionic charges and electron half-reactions are not supported yet.

Balanced equation

2H2 + O2 → 2H2O

Coefficients calculatedThe entered equation needed new coefficients to conserve every element.

Coefficients by substance

  1. 2H2Reactant
  2. 1O2Reactant
  3. 2H2OProduct

Element conservation check

Atom totals after applying the calculated coefficients
ElementReactant atomsProduct atomsConserved
H44Yes
O22Yes

How the equation was balanced

  1. Counted H, O across 3 substances.
  2. Solved the element-conservation equations with exact rational arithmetic, so no coefficient depends on floating-point rounding.
  3. Reduced the solution to the smallest positive whole-number ratio: 2 : 1 : 2.

Quick input guide

Input partWhat to enterExample
Reactants and productsChemical formulas separated by +H2 + O2
Reaction arrow->, =, =>, <=>, <->, , , or H2 + O2 -> H2O
Existing coefficientsOptional positive integers2H2 + O2 -> 2H2O
Physical statesOptional (s), (l), (g), or (aq)H2(g) + O2(g) -> H2O(l)

The tool accepts grouped formulas such as Ca(OH)2 and Al2(SO4)3. If you need the mass of one formula rather than a reaction ratio, use the molar mass calculator.

What balancing changes

Balancing changes the coefficient in front of a formula. It never changes a subscript inside the formula.

  • A coefficient multiplies the entire formula. 2H2O contains 4 H atoms and 2 O atoms.
  • A subscript belongs to the compound. Changing H2O to H2O2 changes water into hydrogen peroxide.
  • The final coefficients form a ratio. 4 : 2 : 4 is balanced, but 2 : 1 : 2 is the smallest equivalent whole-number ratio.

This distinction matters in stoichiometry. The coefficients give mole ratios between substances, while subscripts describe the composition of each substance.

Worked example 1: forming water

Start with:

H2 + O2 -> H2O

One oxygen molecule has 2 O atoms, so place 2 before water. That produces 4 H atoms on the product side, which requires 2 hydrogen molecules.

2H2 + O2 -> 2H2O

ElementReactant atomsProduct atoms
H2 × 2 = 42 × 2 = 4
O1 × 2 = 22 × 1 = 2

The smallest coefficient ratio is 2 : 1 : 2.

Worked example 2: aluminum and sulfuric acid

Consider a formula with parentheses:

Al + H2SO4 -> Al2(SO4)3 + H2

The product contains three sulfate groups, so use 3 before H2SO4. That gives 6 H atoms and therefore 3 molecules of H2. The product also contains 2 Al atoms.

2Al + 3H2SO4 -> Al2(SO4)3 + 3H2

The totals on each side are Al = 2, H = 6, S = 3, and O = 12. The parentheses do not create a new element. They multiply the atoms inside the group.

How the calculator finds the coefficients

The calculator builds one conservation equation per element. Reactant counts have a positive sign and product counts have a negative sign. It solves the resulting homogeneous system with exact rational arithmetic, then converts the solution to positive integers and divides out their greatest common divisor.

Exact arithmetic avoids a subtle failure mode in equation balancers. A floating-point solver can return values close to a ratio, such as 1.9999999998, and rounding can break conservation. This calculator keeps the ratio exact before it displays the result.

Common balancing mistakes

  • Do not edit subscripts to make atom counts match. Add coefficients in front of formulas.
  • Multiply every atom inside parentheses. In Al2(SO4)3, the formula contains 3 S atoms and 12 O atoms.
  • Reduce all coefficients by their common divisor. 4H2 + 2O2 -> 4H2O should be written as 2H2 + O2 -> 2H2O.
  • Check that every element appears on both sides. A missing element usually means a formula or product is incomplete.
  • Remove duplicate terms and spectator species before solving. The same neutral formula on both sides can make the intended reaction ambiguous.
  • Do not enter ionic charge signs or electrons. This version checks atoms, not net charge.

For concentration work after you have a balanced reaction, open the dilution calculator. The chemistry tools hub lists the current calculators and their limits.

FAQ

How do I balance a chemical equation?

Count each element on both sides, add coefficients before formulas, and adjust the coefficients until every element has the same atom total. Finally, divide all coefficients by their greatest common divisor.

Can this calculator handle parentheses in chemical formulas?

Yes. It parses grouped formulas such as Ca(OH)2 and Al2(SO4)3 and applies the number after a closing parenthesis to every atom in that group.

Can I change a subscript when balancing an equation?

No. Changing a subscript changes the substance. Only change coefficients placed before complete formulas.

Does the calculator balance ionic and redox equations?

No. The current version supports neutral formulas and conserves atoms. It does not parse ionic charges or electrons, so it cannot verify charge balance in ionic or electron half-reactions.

Why does the result use the smallest whole-number coefficients?

Multiplying every coefficient by the same integer produces an equivalent ratio. Chemical equations conventionally use the smallest positive whole-number ratio, so the calculator divides out the common factor.

Related Guides