Chemical equation balancer
Balance stoichiometric reactions in your browser: enter plain molecular formulas, get smallest whole-number coefficients by element conservation (matrix method over rational numbers). Ideal for homework, labs, and teaching combustion, synthesis, and acid–base examples — optimized for clarity and search-friendly documentation.
Balance your equation
Use + between species. Arrow is fixed as →. Subscripts are normal digits (e.g. H2O, Ca(OH)2).
Left side formulas separated by plus signs.
Right side formulas separated by plus signs.
Preset examples (click to load):
How to use this tool (detailed)
- Enter reactants in the first box, each compound separated by
+. Example:CH4 + O2. - Enter products in the second box. Example:
CO2 + H2O. - Click Balance equation. Coefficients are reduced to the smallest positive integers that satisfy atom balance.
- Use preset buttons below the inputs to load classroom-standard reactions (combustion, ammonia synthesis, rust, neutralization).
- If you see an error, check spelling of elements (first letter uppercase), parentheses, and that every element appears on both sides when it must.
Formula rules supported
- Element symbols follow IUPAC-style one- or two-letter forms (
Na,Cl,U). - Optional integer subscripts after each symbol or closing parenthesis:
H2SO4,Ca(OH)2,Al2(SO4)3. - Nested groups in parentheses; a multiplier after
)applies to the whole group.
What this balancer does (technical)
The tool builds a composition vector for each compound (atom counts per formula), then a stoichiometry matrix: for each element, reactant counts minus product counts weighted by unknown coefficients must equal zero. It finds a non-trivial vector in the null space using exact rational (BigInt fraction) Gaussian elimination, then scales to the smallest integer solution. This matches standard linear-algebra treatments of reaction balancing taught in general chemistry.
Limitations
- Ions, charges, and electrons (e.g. net ionic or half-reactions) are not parsed — use textbook redox or acid–base methods for those.
- Hydrates written as
·or.are not supported; expand water of hydration manually if needed.
FAQ
Why is my equation “unbalanceable” here?
The reaction may be incomplete (missing product or intermediate), incorrectly typed, or require ionic/electron bookkeeping this tool does not model.
Does balancing prove a reaction happens?
No — balancing only enforces atom conservation. Thermodynamics, kinetics, and conditions determine whether a reaction is observed in the lab.
Is my data sent to a server?
No. All parsing and math run locally in your browser.
Part of MolDraw Tools · MolDraw molecule editor