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.
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.