Chemical equation balancer
Type an unbalanced equation such as Fe + O2 -> Fe2O3 and the balancer returns the smallest whole-number coefficients, here 4Fe + 3O₂ → 2Fe₂O₃, with a table showing that every element (and the charge) is the same on both sides. It handles brackets, hydrates (CuSO4·5H2O), ions (Fe3+, SO4^2-) and electrons (e-) for redox half-equations, solves the balance exactly with fractions rather than trial and error, and tells you when an equation cannot be balanced or has no unique balance. The result is typeset with mhchem and can be copied as text or LaTeX \ce{…}, or downloaded as PNG or SVG.
- What it does
- Balances a chemical equation, including ions, electrons and hydrates, with the smallest whole-number coefficients and checks every element and the charge.
- Formula
- Find the nullspace of the element (and charge) matrix A: A·ν = 0, reactant columns +, product columns −, solved exactly with fractions and scaled to coprime integers.
- Example
- KMnO4 + HCl = KCl + MnCl2 + H2O + Cl2 balances to 2KMnO₄ + 16HCl → 2KCl + 2MnCl₂ + 8H₂O + 5Cl₂ (K 2 = 2, Mn 2 = 2, O 8 = 8, H 16 = 16, Cl 16 = 16).
Last updated
Loading Chemical equation balancer…
At a glance
| Input | An equation with formulas, brackets, hydrates, charges and electrons |
|---|---|
| Method | Nullspace of the element/charge matrix, exact fractions (Gauss–Jordan) |
| Output | Smallest whole-number coefficients, atom and charge check, mass balance |
| Reports | No balance, no unique balance, zero or wrong-side species |
| Export | Unicode text, ASCII, LaTeX \ce{}, PNG (600 dpi) and SVG |
| Runs in | Your web browser; nothing is uploaded |
| Price | Free, no account needed |
What it does
How to use the chemical equation balancer
- Type the equationWrite reactants, an arrow (->, → or =) and products, separated by +. Coefficients you type are ignored.
- Check the readingThe typeset equation shows how each formula and charge was read; write charges with ^ (SO4^2-) if a reading is not what you meant.
- Copy or downloadCopy the balanced equation as text or LaTeX, or download it as PNG or SVG; the table below confirms every element and the charge balance.
How it works
Balancing an equation means finding positive whole numbers
The tool reduces
By hand for
Reading formulas. Element symbols are case-sensitive. A charge goes at the end: Fe3+ and Fe^3+ both mean
Sources: Blakley GR. Chemical equation balancing: a general method which is quick, simple, and has unexpected applications. J Chem Educ 1982;59:728–734. Atomic weights: Prohaska T et al. Standard atomic weights of the elements 2021 (IUPAC Technical Report). Pure Appl Chem 2022;94:573–600, doi:10.1515/pac-2019-0603.
Worked example: KMnO₄ + HCl, and more balanced equations
Potassium permanganate and hydrochloric acid. Type KMnO4 + HCl = KCl + MnCl2 + H2O + Cl2. The element matrix has five rows (K, Mn, O, H, Cl) and six columns, so its nullspace has dimension 1, and the balancer returns
| Element | Reactants | Products |
|---|---|---|
| K | 2 | 2 |
| Mn | 2 | 2 |
| O | 8 | 8 |
| H | 16 | 16 |
| Cl | 16 | 16 |
Mass balance per mole of reaction:
Other results from the tool
| You type | Balanced |
|---|---|
Fe + O2 -> Fe2O3 | |
C3H8 + O2 -> CO2 + H2O | |
Cu + HNO3 -> Cu(NO3)2 + NO + H2O | |
MnO4- + Fe2+ + H+ -> Mn2+ + Fe3+ + H2O | |
Cr2O7^2- + H+ + e- -> Cr3+ + H2O | |
CuSO4·5H2O -> CuSO4 + H2O | |
Ca3(PO4)2 + H2SO4 -> CaSO4 + H3PO4 | |
K4[Fe(CN)6] + KMnO4 + H2SO4 = KHSO4 + Fe2(SO4)3 + MnSO4 + HNO3 + CO2 + H2O | |
H2 + O2 -> H2O + H2O2 | No unique balance (two independent reactions) |
The LaTeX for the first example is \ce{2 KMnO4 + 16 HCl -> 2 KCl + 2 MnCl2 + 8 H2O + 5 Cl2}; paste it into the LaTeX tool to change its colour or size.
Frequently asked questions
How do I balance a chemical equation?
Count each element on both sides and choose coefficients so the counts match, starting with the element that appears in the fewest species and leaving H and O (or a free element such as
How do I balance a redox equation with electrons?
Type the ions with their charges and add e- for electrons, for example Cr2O7^2- + H+ + e- -> Cr3+ + H2O. Charge is balanced as an extra row alongside the elements, which gives
How do I type charges such as Fe3+ or SO4 2-?
Put the charge at the end: Fe3+ or Fe^3+, SO4^2-, MnO4-, NH4+. A charge after a space (SO4 2-) also works. The ^ form is never ambiguous; without it, a single trailing digit of a polyatomic ion is read as a subscript.
Why does it say there is no unique balance?
Some equations combine two or more independent reactions, so infinitely many coefficient sets balance them;
Why can my equation not be balanced?
Usually a formula is wrong or an element appears on one side only (a missing product such as
How do I write a hydrate such as copper sulfate pentahydrate?
Use a middle dot, an asterisk or a full stop before the water: CuSO4·5H2O, CuSO4*5H2O or CuSO4.5H2O.
Can I get the balanced equation in LaTeX?
Yes. Copy LaTeX \ce{} gives mhchem code such as \ce{4 Fe + 3 O2 -> 2 Fe2O3}, which works in LaTeX with \usepackage[version=4]{mhchem} and in MathJax. You can also download the typeset equation as SVG or a 600 dpi PNG.
Are the coefficients I type used?
No. Any leading numbers are ignored and the balancer finds the smallest whole-number coefficients itself.
Link to this tool
Using it in a protocol, lab wiki or course page? Copy a link or citation.
<a href="https://www.labcanvas.com/tools/chemical-equation-balancer">Chemical equation balancer</a> (LabCanvas)LabCanvas. Chemical equation balancer [online tool]. https://www.labcanvas.com/tools/chemical-equation-balancerDraw the reaction
Sketch the structures of reactants and products in the LabCanvas chemistry editor and put the balanced equation beside them in a figure.
Open the structure editor