Chemical Equation Balancer
Balance any chemical equation using linear algebra. Enter the unbalanced reaction, click Balance, and get the correct stoichiometric coefficients with an element-by-element conservation check. No signup, runs entirely in your browser.
How to Use the Chemical Equation Balancer
- 1Type the unbalanced equation using + between compounds and
->or=between reactants and products. - 2Write formulas in standard notation — subscripts as plain numbers (H2O), polyatomic groups in parentheses (Ca(OH)2).
- 3Click Balance. The tool returns whole-number coefficients and an element-by-element conservation table.
- 4Confirm every row of the table reads “Yes” — that means each element is conserved on both sides.
Worked Example: Combustion of Glucose
Enter C6H12O6 + O2 -> CO2 + H2O — cellular respiration and sugar combustion. Balancing carbon first: 6 carbons on the left fix 6 CO₂ on the right. The 12 hydrogens fix 6 H₂O. Now count oxygen on the product side: 6 CO₂ contribute 12 O and 6 H₂O contribute 6 O, for 18 total. Glucose already supplies 6 of those, so O₂ must provide the remaining 12, meaning a coefficient of 6. The balanced result is C₆H₁₂O₆ + 6 O₂ → 6 CO₂ + 6 H₂O.
Doing it by hand shows why the tool uses linear algebra rather than guesswork: each element is one equation and each compound's coefficient is one unknown, so balancing is really solving a small system with the constraint that every atom is conserved. For simple reactions the inspection method above works, but for something like Fe2(SO4)3 + KOH → Fe(OH)3 + K2SO4 the matrix approach finds the answer instantly where trial-and-error stalls. That is exactly what happens under the hood when you click Balance.
Chemistry Tips
Combustion reactions
For hydrocarbon combustion, enter the fuel + O2 on the left and CO2 + H2O on the right. The balancer handles the fractional coefficients and scales to whole numbers automatically.
Parentheses in formulas
Write polyatomic ions with parentheses: Ca(OH)2, (NH4)2SO4, Fe2(SO4)3. The parser correctly distributes the subscript multiplier across all atoms in the group.
Check your work
The element conservation table shows the atom count on each side after balancing. Every row should show "Yes". If any row shows "No", the input equation may have a typo.
Use example reactions
Click any example button below the input field to load a common reaction. Try modifying it to explore how the coefficients change.
Frequently Asked Questions
How does the balancer work?
The tool parses each compound into element counts, builds a matrix where rows represent elements and columns represent compounds, then uses Gaussian elimination to find the null space — the set of coefficients that satisfies conservation of each element. The result is scaled to the smallest whole-number ratio.
What format should I enter equations in?
Use + to separate compounds and -> or = to separate reactants from products. Example: H2 + O2 -> H2O. You can also use the → arrow symbol. Coefficients are not needed — the balancer adds them.
Does it support parentheses in formulas?
Yes. Compounds like Ca(OH)2, Fe2(SO4)3, and C6H12O6 are all parsed correctly. Multi-character element symbols like Ca, Mg, and Fe are also supported.
Why does it say "cannot balance"?
This usually means the equation is not chemically valid — elements appear on one side but not the other, or the equation is physically impossible. Check that the same elements appear on both sides of the reaction.
Can it handle organic chemistry reactions?
Yes. Combustion reactions like C6H12O6 + O2 -> CO2 + H2O balance correctly. Complex organic reactions work as long as the formula can be parsed from standard chemical notation.
Is my data stored?
No. All balancing runs locally in your browser using JavaScript. Nothing is sent to any server.