What is a balanced chemical equation?
The phrase chemical equation balancer is searched about 8,100 times a month in the United States by students meeting stoichiometry for the first time, teachers checking problem sets, and anyone who has stared at an equation like the permanganate one below and watched the trial-and-error attempts multiply. Balancing by inspection works well for short equations and badly for long ones, because every coefficient you change disturbs two elements at once. This page balances equations the reliable way: it parses what you type, sets up one atom-conservation equation per element, and solves the whole system algebraically, returning the smallest whole-number coefficients and an atom-count table that proves the answer.
A balanced equation is more than tidiness. The coefficients are the recipe of the reaction: they state the exact proportions in which substances react and are produced, and every quantitative calculation in chemistry — how much product a given mass of reactant makes, how much gas a reaction releases, which reactant runs out first — starts from them. An unbalanced equation gives wrong proportions and therefore wrong answers everywhere downstream, which is why balancing is taught before any other calculation in the subject.
The law behind balancing: conservation of atoms
Read an equation as an atom ledger. On the left, the reactants contribute atoms according to their formulas and coefficients; on the right, the products must account for exactly the same atoms. The subscripts inside a formula are fixed — they define the substance, so H2O is water and changing it to H2O2 would describe a different chemical, hydrogen peroxide. Only the coefficients in front of the formulas may be chosen. Balancing is therefore a puzzle with strict rules: find the smallest positive whole numbers, one per compound, that make every element's ledger agree.
That framing is what makes the algebraic method possible. Each element contributes one linear equation: the sum over compounds of (coefficient times atoms of that element in the compound) must be equal on the two sides. With as many equations as there are elements and one unknown per compound, the system has either no positive solution, exactly one solution up to scaling, or a family of solutions. A well-posed textbook equation is the middle case, and scaling that solution to the smallest whole numbers gives the conventional answer.
| Rule | Meaning | Example |
|---|---|---|
| Subscripts are fixed | They define the compound; never change them | H2O stays H2O, never H2O2 |
| Coefficients are chosen | The number in front multiplies the whole formula | 3 H2O means 6 H and 3 O |
| Parentheses multiply through | The number after a group multiplies everything inside | Ca(OH)2 means 1 Ca, 2 O, 2 H |
| Smallest whole numbers | Divide by the greatest common divisor | 4, 6, 2 becomes 2, 3, 1 |
| Coefficient 1 is hidden | A compound with no number has coefficient 1 | C3H8 means 1 C3H8 |
How to use the chemical equation balancer
How to use a chemical equation balancer is the question behind most visits to this page, so here is the full procedure. Type the equation into the box exactly as it appears in your problem: compounds separated by plus signs, then an arrow, then the products. You may use ->, =, or the arrow character as the separator. Keep element symbols case-correct — Cl, not CL — and write groups in parentheses with their multiplier outside, as in Ca(OH)2 or Ca3(PO4)2. Press Balance. The result shows the balanced equation, and beneath it a table counting every element on both sides so you can check the balance yourself.
Three habits make the input foolproof. First, do not type coefficients you have already worked out unless you want them checked: the balancer solves from the formulas, and coefficients you type are read as part of the problem and re-solved. Second, check two-letter elements carefully, because case changes the chemistry: CO is carbon monoxide (carbon plus oxygen), while Co is the metal cobalt. Third, if the balancer reports an unknown element, it names the symbol — that message is almost always a capitalisation slip.
Worked examples you can check
Four examples anchor this page, each verified by hand before publication, and the balancer reproduces all four exactly. Example 1 — propane combustion. C3H8 + O2 -> CO2 + H2O balances to 1 C3H8 + 5 O2 -> 3 CO2 + 4 H2O. Carbon: 3 and 3. Hydrogen: 8 and 8. Oxygen: 10 on the left, and 6 + 4 = 10 on the right. This is the balancer's starting example: open the page and the result is already shown.
Example 2 — iron oxide. Fe + O2 -> Fe2O3 balances to 4 Fe + 3 O2 -> 2 Fe2O3. Iron: 4 and 4. Oxygen: 6 and 6. The trick by hand is to double Fe2O3 first so the oxygen count is even. Example 3 — permanganate and hydrochloric acid. KMnO4 + HCl -> KCl + MnCl2 + H2O + Cl2 balances to 2 KMnO4 + 16 HCl -> 2 KCl + 2 MnCl2 + 8 H2O + 5 Cl2. Chlorine is the hard element here: it appears in three products, with 2 + 4 + 10 = 16 atoms on the right matching 16 HCl on the left.
Example 4 — parentheses. Ca(OH)2 + H3PO4 -> Ca3(PO4)2 + H2O balances to 3 Ca(OH)2 + 2 H3PO4 -> Ca3(PO4)2 + 6 H2O. Calcium: 3 and 3. Phosphorus: 2 and 2. Hydrogen: 6 + 6 = 12 on the left, 12 on the right. Oxygen: 6 + 8 = 14 on the left, 8 + 6 = 14 on the right. Equations with groups defeat casual counting more than any other kind, which is why the atom table is printed for every result.
| Equation as typed | Balanced result |
|---|---|
| C3H8 + O2 -> CO2 + H2O | C3H8 + 5 O2 -> 3 CO2 + 4 H2O |
| Fe + O2 -> Fe2O3 | 4 Fe + 3 O2 -> 2 Fe2O3 |
| KMnO4 + HCl -> KCl + MnCl2 + H2O + Cl2 | 2 KMnO4 + 16 HCl -> 2 KCl + 2 MnCl2 + 8 H2O + 5 Cl2 |
| Ca(OH)2 + H3PO4 -> Ca3(PO4)2 + H2O | 3 Ca(OH)2 + 2 H3PO4 -> Ca3(PO4)2 + 6 H2O |
| H2 + O2 -> H2O | 2 H2 + O2 -> 2 H2O |
| CH4 + O2 -> CO2 + H2O | CH4 + 2 O2 -> CO2 + 2 H2O |
Parentheses and nested groups
Parentheses group atoms that travel together, most often a polyatomic ion such as hydroxide OH, sulfate SO4, nitrate NO3 or phosphate PO4. The number after the closing parenthesis multiplies every atom inside: Ca(OH)2 contains one calcium, two oxygens and two hydrogens. When the same group appears in a compound's own formula with its own subscript, the counts multiply through: Ca3(PO4)2 contains three calciums, two phosphorus atoms and eight oxygens, because the PO4 group is taken twice.
Groups can also nest — a group inside a group — in coordination compounds and double salts. The parser on this page handles nesting by reading the formula recursively: each opening parenthesis starts a sub-count that is multiplied by the number following its closing parenthesis, at any depth. That is the same rule a chemist applies by hand, applied without fatigue. The practical limit is typing accuracy: one missing closing parenthesis unbalances the count silently, so the balancer reports unbalanced parentheses as an error rather than guessing where the group ends.
The algebraic (matrix) method, in plain words
The method this balancer uses is the one taught as the algebraic or matrix method. Assign an unknown coefficient to each compound: a, b, c, and so on. For each element, write the conservation equation — total atoms on the left equal total atoms on the right. For propane combustion, with a C3H8 + b O2 -> c CO2 + d H2O, carbon gives 3a = c, hydrogen gives 8a = 2d, and oxygen gives 2b = 2c + d. Setting a = 1 gives c = 3 and d = 4, and then 2b = 6 + 4 = 10, so b = 5: the answer 1, 5, 3, 4.
In code, those equations form a matrix, and the balancer finds its null space — the set of coefficient vectors that make every element balance — using exact fraction arithmetic, so no rounding ever creeps in. If the null space is one-dimensional, its vector is scaled by the least common multiple of the denominators and reduced by the greatest common divisor, giving the smallest whole-number coefficients. If there is no positive solution, or the solution is not unique, the balancer says so. That honesty matters: an equation with an element on one side only can never balance, and printing plausible-looking numbers for it would be worse than printing none.
Combustion, displacement and other common equation types
Some families of equations balance in predictable patterns, and recognising the family tells you what to expect from the coefficients. In combustion of a hydrocarbon, the products are always carbon dioxide and water, carbon is balanced first from the fuel's carbon count, hydrogen second, and oxygen last — because oxygen appears as the free element O2, its coefficient absorbs whatever the other two leave over, which is why it is so often the awkward one. For a fuel containing an odd number of hydrogens, the water coefficient comes out whole but the oxygen coefficient lands on a half, and the standard fix is to double everything: propane needs 5 O2 for 4 H2O and 3 CO2, while butane, C4H10, needs 13 O2 for 10 H2O and 8 CO2 once doubled from the half-integer form.
In single displacement reactions, one element swaps into a compound and pushes another out, as in 2 Na + 2 H2O -> 2 NaOH + H2, and the balance usually turns on making the displaced element's count match on both sides. In double displacement reactions, two compounds exchange partners and every polyatomic group that survives intact can be counted as a single unit — the phosphate group in the calcium example is counted twice on each side without ever being opened. In decomposition, one compound splits, and the coefficients are driven by the products; in synthesis, the reverse, they are driven by the compound being built, as with Fe2O3 in the iron example. The balancer treats all of these identically — one conservation equation per element — but knowing the family helps you sanity-check its answer: a combustion equation whose oxygen coefficient is not the largest on its side deserves a second look, and a displacement equation with a coefficient above 4 is worth re-reading for a typing slip.
One more pattern is worth naming because it produces the equations students find hardest: reactions where one element appears in three or more compounds. Chlorine in the permanganate example appears in KCl, MnCl2 and Cl2 on the right, so adjusting any single coefficient disturbs the chlorine count in a way that is invisible until the totals are compared. Inspection methods stall on exactly this pattern, because there is no safe order in which to fix the elements one at a time. The algebraic method has no such weakness: it never fixes one element at a time, so the number of compounds an element appears in makes no difference to it.
Where balanced equations are used
In stoichiometry, the coefficients convert between substances: from the propane equation, 1 mole of propane makes 3 moles of carbon dioxide and needs 5 moles of oxygen, and every mass and gas-volume calculation follows from those ratios. In limiting-reactant problems, the balanced equation decides which reactant runs out first and caps the yield. In titration and analytical work, the mole ratio between analyte and titrant comes straight from the balanced equation.
In industry and environmental work, balanced equations underpin combustion calculations, emissions estimates and process design: how much oxygen a fuel needs, and how much carbon dioxide and water it must produce, are read off the balanced equation. And in everyday checking, a balancer is the fastest way to verify a textbook answer, a problem set, or your own inspection result before the arithmetic that depends on it begins.
Common balancing mistakes
The most common mistake is changing a subscript to make the counts fit: turning H2O into H2O2 balances nothing — it changes the substance. Only coefficients may change. Second is miscounting parentheses, reading Ca(OH)2 as one oxygen and one hydrogen instead of two of each. Third is forgetting that a coefficient multiplies every atom in the formula: 2 H2SO4 contains 4 hydrogens, 2 sulfurs and 8 oxygens.
Fourth is case errors in element symbols: CL, CA and NA are not elements, and CO (carbon and oxygen) is not Co (cobalt). Fifth is stopping at fractions or multiples — a half coefficient or a doubled equation is balanced but not in the conventional smallest whole-number form. Finally, beware balancing an equation that cannot balance: if an element appears on only one side, no coefficients will fix it, and the right response is to check the formulas, not to keep trying numbers.
What this balancer cannot do
Plainly stated: this balancer balances the equation as written, by atom conservation only. It cannot tell you whether the reaction actually happens, how fast it goes, what temperature or catalyst it needs, or whether the products you typed are the products that form. A balanced equation is bookkeeping that any real reaction must satisfy, not a prediction that a reaction will occur.
It also does not handle ionic charges or redox half-reactions. Equations written with ions, charges or electrons — half-equations of the kind used in electrochemistry — are outside its scope, and it will not add H2O, H+ or electrons to make such an equation balance. What it does cover, it covers exactly: neutral molecular equations, with parentheses and nested groups, solved by the algebraic method and checked by a full atom count printed with every answer.
Sources & References
- LibreTexts Chemistry (OpenStax) — 4.1 Writing and Balancing Chemical Equations (the inspection method and balanced equations)
- OpenStax Chemistry 2e — 4.1 Writing and Balancing Chemical Equations (the same chapter at OpenStax)
- Khan Academy — Balancing Chemical Equations (why equations must balance and how to balance them)
- Royal Society of Chemistry — Balancing Equations (teacher resource on balancing chemical equations)
- Wikipedia — Chemical Equation (the notation, coefficients and conventions this page follows)
- Wikipedia — Stoichiometry (the quantitative relationships a balanced equation encodes)
- NIST Chemistry WebBook (standard reference data for the compounds in chemical equations)
The conventions and every worked figure in this guide were checked against the sources above, and the four worked examples were recomputed by hand from atom counts — carbon, hydrogen, oxygen and the rest tallied on both sides — so you can reproduce each one exactly in the balancer. Every source listed above returned HTTP 200 when checked.