Chemical Equation Balancer
Balance any chemical equation in seconds. Type the unbalanced reaction and get the smallest whole-number coefficients, a full atom-by-atom check, and the exact matrix (Gauss–Jordan) steps behind the answer. Handles parentheses, hydrates, ionic charges, redox half-reactions, and combustion — 100% in your browser, nothing uploaded.
⚠ This tool finds the missing coefficients. If your equation is already balanced and you need mole ratios, the limiting reactant, or theoretical yield, use the molar-ratio calculator instead.
Tip: press Ctrl+Enter to balance. Syntax: parentheses (),
brackets [], hydrates CuSO4·5H2O, ions Fe2+ SO4(2-),
arrows -> = → ⇔.
Disproportionations like Cl2 + OH- -> Cl- + ClO- + H2O
are balanced directly with charge conservation.
Write charges as Fe2+, SO4(2-),
Cr2O7(2-). The solver adds a charge-conservation row to the matrix.
What “balanced” actually means
A chemical equation is a bookkeeping statement: atoms are neither created nor destroyed in a chemical reaction (the law of conservation of mass, established by Lavoisier in 1789), so every atom you write on the left must be accounted for on the right. “Balancing” means choosing the coefficients — the big numbers in front of each formula — that make the atom counts match. The subscripts inside a formula are off-limits: H2O is water, while H2O2 is hydrogen peroxide, a completely different substance. Change a subscript and you have rewritten the reaction itself.
How this balancer works: your equation is a linear algebra problem
Trial and error works for easy equations and gets miserable for hard ones. This tool instead turns balancing into algebra. Take the classic a H2 + b O2 → c H2O. Conservation of each element gives one linear equation:
- Hydrogen: 2a = 2c
- Oxygen: 2b = c
That is a homogeneous system A·x = 0. Written as a matrix — one row per element, one column per compound, reactants positive and products negative — it looks like this:
| H₂ | O₂ | H₂O | |
|---|---|---|---|
| H | 2 | 0 | -2 |
| O | 0 | 2 | -1 |
Row-reducing (Gauss–Jordan elimination) gives:
| H₂ | O₂ | H₂O | |
|---|---|---|---|
| H | 1 | 0 | -1 |
| O | 0 | 1 | -1/2 |
The free variable is c (the H₂O column). Setting c = 1 reads off a = 1 and b = 1/2; multiplying through by 2 clears the fraction and yields the smallest whole-number solution 2, 1, 2.
Because the arithmetic uses exact fractions (never floating point), even equations whose coefficients run into the hundreds come out precisely. The same method powers the combustion, redox, and ionic modes below.
Worked example 1 — burning methane
Balance CH4 + O2 → CO2 + H2O. Counting atoms in the unbalanced equation: left has C=1, H=4, O=2; right has C=1, H=2, O=3.
- Balance carbon: 1 C on the left → 1 CO2 on the right.
- Balance hydrogen: 4 H on the left → 2 H2O on the right.
- Balance oxygen last: the right side now needs 2 + 2 = 4 O atoms, so 2 O2.
Result: CH4 + 2 O2 → CO2 + 2 H2O, verified atom by atom:
| Element | Left | Right | |
|---|---|---|---|
| C | 1 | 1 | ✓ |
| H | 4 | 4 | ✓ |
| O | 4 | 4 | ✓ |
Worked example 2 — a redox half-reaction in acid
Balance Cr2O72− → Cr3+ in acidic solution
(type Cr2O7(2-) -> Cr3+ in the Redox tab). The half-reaction method runs four passes:
- 1. Balance the redox element: Cr2O7(2-) → 2 Cr3+ (Cr balanced)
- 2. Balance oxygen with H2O: Add 7 H2O to the right
- 3. Balance hydrogen with H⁺: Add 14 H⁺ to the left (acidic medium)
- 4. Balance charge with electrons: Charge: left +12, right +6 → add 6 e⁻ to the left
Final answer: Cr2O72− + 14 H+ + 6 e− → 2 Cr3+ + 7 H2O — the 6 electrons bring the left side from +12 down to +6, matching the right side, and every atom is conserved. Switch the medium to “basic” and the tool converts the 14 H+ into water plus hydroxide automatically.
Reference: 12 balanced equations from general chemistry
Every row below was produced by the solver on this page — use them to check homework or as starting examples in the balancer above.
| Unbalanced | Balanced |
|---|---|
| H₂ + O₂ → H₂O | 2 H₂ + O₂ → 2 H₂O |
| CH₄ + O₂ → CO₂ + H₂O | CH₄ + 2 O₂ → CO₂ + 2 H₂O |
| C₃H₈ + O₂ → CO₂ + H₂O | C₃H₈ + 5 O₂ → 3 CO₂ + 4 H₂O |
| Fe + O₂ → Fe₂O₃ | 4 Fe + 3 O₂ → 2 Fe₂O₃ |
| Al + HCl → AlCl₃ + H₂ | 2 Al + 6 HCl → 2 AlCl₃ + 3 H₂ |
| Ca(OH)₂ + H₃PO₄ → Ca₃(PO₄)₂ + H₂O | 3 Ca(OH)₂ + 2 H₃PO₄ → Ca₃(PO₄)₂ + 6 H₂O |
| Fe₂O₃ + CO → Fe + CO₂ | Fe₂O₃ + 3 CO → 2 Fe + 3 CO₂ |
| Na + Cl₂ → NaCl | 2 Na + Cl₂ → 2 NaCl |
| N₂ + H₂ → NH₃ | N₂ + 3 H₂ → 2 NH₃ |
| KClO₃ → KCl + O₂ | 2 KClO₃ → 2 KCl + 3 O₂ |
| C₆H₁₂O₆ + O₂ → CO₂ + H₂O | C₆H₁₂O₆ + 6 O₂ → 6 CO₂ + 6 H₂O |
| AgNO₃ + NaCl → AgCl + NaNO₃ | AgNO₃ + NaCl → AgCl + NaNO₃ |
Formula syntax the parser understands
| Feature | Example input | Meaning |
|---|---|---|
| Parentheses & brackets | Ca(OH)2, K4[Fe(CN)6] | Groups with multipliers |
| Hydrates | CuSO4·5H2O / CuSO4.5H2O | Water of crystallisation |
| Simple ions | Ag+, Cl-, H+ | Charge ±1 |
| Metal ions | Fe2+, Cu2+, Al3+ | Charge with magnitude |
| Parenthesised charge | SO4(2-), Cr2O7(2-) | Any charge, unambiguous |
| Electrons | e- | Redox mode adds these itself |
| State labels | NaCl(s), H2(g), Na+(aq) | Shown, ignored in the math |
| Arrows | -> = → ⇔ | Last one marks reversible |
| Leading coefficients | 2 H2 + O2 | Accepted; recomputed anyway |
7 practical tips
- Balance metals first, oxygen and hydrogen last. Elements that appear in only one compound per side are the easiest anchors; H and O usually fall into place at the end.
- Treat polyatomic ions as units when they survive the reaction intact (SO4 in BaCl2 + H2SO4 → BaSO4 + 2 HCl) — fewer things to track.
- For combustion, let oxygen go fractional, then clear it. C → CO2, H → H2O, O2 = whatever remains (often x/2), then double everything.
- Charges need the charge row. The Ionic tab adds a conservation-of-charge equation to the matrix, so Ag+ + Cl− → AgCl is verified electrically as well as atomically.
- States like (aq) and (s) are documentation, not math — the solver strips them before balancing.
- Read the error messages literally. “Unknown element” almost always means a capitalisation slip (Cl vs CI, or Co vs CO); “only on one side” means a typo or an impossible reaction.
- Balance first, stoichiometry second. Mole ratios, limiting reactant, and theoretical yield all require a balanced equation — get the coefficients here, then continue in the molar-ratio calculator.
Frequently asked questions
1. What does it mean for a chemical equation to be balanced?
A chemical equation is balanced when every element appears in the same total amount on both sides, as the law of conservation of mass requires. Only the coefficients in front of formulas may change — never the subscripts inside them. In 2H₂ + O₂ → 2H₂O there are 4 hydrogen and 2 oxygen atoms on each side.
2. How do you balance H₂ + O₂ → H₂O step by step?
Write a·H₂ + b·O₂ → c·H₂O. Hydrogen gives 2a = 2c and oxygen gives 2b = c. Setting the free variable c = 1 gives a = 1 and b = 1/2; scaling to whole numbers yields 2, 1, 2 — so 2H₂ + O₂ → 2H₂O. The balancer above runs this exact algebra automatically and shows the matrix steps.
3. How does the Gauss–Jordan matrix method work?
Each element becomes one row and each compound one column of a matrix (reactants positive, products negative). Row-reducing to echelon form exposes one free variable; setting it to 1 and clearing denominators gives the smallest whole-number coefficients. Because the arithmetic is exact rational math, even equations with huge coefficients come out precisely — no floating-point drift.
4. Can this balancer handle redox half-reactions?
Yes. Enter a half-reaction like MnO₄⁻ → Mn²⁺ and pick acidic or basic medium. The tool balances the redox element first, then adds H₂O for oxygen, H⁺ for hydrogen, and electrons for charge — giving MnO₄⁻ + 8H⁺ + 5e⁻ → Mn²⁺ + 4H₂O in acid (or MnO₄⁻ + 4H₂O + 5e⁻ → Mn²⁺ + 8OH⁻ in base), with every step shown.
5. How do I type ions and charges?
Append the charge to the formula: Ag+, Cl-, H+, MnO₄⁻ (charge ±1), Fe2+, Cu2+, Al3+ for metal ions, or use parentheses for any magnitude: SO₄(2-), Cr₂O₇(2-), Fe(CN)₆(3-). Electrons are written e- and are added automatically by the redox mode — do not type them yourself there.
6. Does it support parentheses, brackets, and hydrates?
Yes. Parentheses, square brackets, and braces all work with multipliers — Ca(OH)₂, K₄[Fe(CN)₆], Al₂(SO₄)₃. Hydrates use a middle dot, asterisk, or period: CuSO₄·5H₂O, CuSO4*5H2O, or CuSO4.5H2O. For example, CuSO₄·5H₂O + 2NaOH → Cu(OH)₂ + Na₂SO₄ + 5H₂O balances correctly.
7. Why can't I just change the subscripts to balance an equation?
Subscripts define the substance itself: H₂O is water, but H₂O₂ is hydrogen peroxide — a different chemical. Changing a subscript rewrites the reaction into a different one. Coefficients only say how many molecules react, which is why balancing adjusts coefficients alone.
8. What is the fastest way to balance a combustion reaction?
Balance C first (→ CO₂), then H (→ H₂O), and save oxygen for last — it usually lands on a fraction like 7/2 O₂, which you then clear by doubling everything. Propane works out to C₃H₈ + 5O₂ → 3CO₂ + 4H₂O. The Combustion tab above automates this fractional-oxygen tactic for any C/H/O fuel.
9. Why do I get an “element appears only on one side” error?
That element has no source or no destination — usually a mistyped formula (Cl vs CI, missing parentheses) or a reaction as written that cannot conserve mass. Check that every element you typed exists on both sides of the arrow, then try again.
10. Does the answer use fractions or whole numbers?
Always the smallest whole numbers. The solver works with fractions internally (for example 1/2 O₂) and then scales everything up and divides by the greatest common divisor, so 2H₂ + O₂ → 2H₂O never comes out as H₂ + 1/2O₂ → H₂O.
11. What does the ⇌ arrow mean in the output?
It marks a reversible reaction and is preserved from your input — type ⇌ or <=> and the balanced equation keeps it. The balancing math is identical either way; the arrow is notation, not a different calculation.
12. How is this different from the molar-ratio calculator?
This tool finds the missing coefficients of an unbalanced equation. The molar-ratio calculator starts from an equation that is already balanced and computes mole ratios, the limiting reactant, and theoretical yield. Balance here first, then take the result there for stoichiometry.
Educational tool. Always double-check critical lab or exam work by hand.
Free tool by NRTechStudio