Chemical Equation Balancer
Type an unbalanced equation and get the smallest whole-number coefficients, with the atoms on each side counted for you.
https://flxcode.com/chemical-equation-balancer/
Use -> or = between the sides and + between species. Brackets, hydrates (CuSO4·5H2O) and charges (Fe^3+, Fe+3, e-) work. Any numbers in front are ignored.
Example Balanced equation
Balanced equation
Read as 2 species on the left and 2 on the right.
| Element | Left | Right |
|---|---|---|
| C | 3 | 3 |
| H | 8 | 8 |
| O | 10 | 10 |
| C3H8 | 1 |
|---|---|
| O2 | 5 |
| CO2 | 3 |
| H2O | 4 |
The steps, with your numbers
Species: C3H8, O2, CO2, H2O.
One equation per element: atoms on the left minus atoms on the right equals 0.
C: 3·x1 + 0·x2 − + 1·x3 − + 0·x4 = 0
H: 8·x1 + 0·x2 − + 0·x3 − + 2·x4 = 0
O: 0·x1 + 2·x2 − + 2·x3 − + 1·x4 = 0
Solving the system exactly gives one free variable. Scale it to the smallest whole numbers: 1, 5, 3, 4.
No ads. No account. Nothing you type or record is uploaded. We count page events with a daily code. Check it.
Problem or idea? Email us
Quick start
- Type the reactants, an arrow, then the products. Separate species with a plus sign.
- Read the balanced equation and check the atom table. Left and right must match in every row.
- If you get a message, fix the formula it points at. Typos like Co for CO are the usual cause.
Worked examples
| You type | Balanced | Note |
|---|---|---|
| H2 + O2 -> H2O | 2H2 + O2 → 2H2O | Water, the first one everybody does |
| C3H8 + O2 -> CO2 + H2O | C3H8 + 5O2 → 3CO2 + 4H2O | Propane burning |
| Fe + O2 -> Fe2O3 | 4Fe + 3O2 → 2Fe2O3 | Rust |
| Al + HCl -> AlCl3 + H2 | 2Al + 6HCl → 2AlCl3 + 3H2 | A metal in acid |
| Ca(OH)2 + H3PO4 -> Ca3(PO4)2 + H2O | 3Ca(OH)2 + 2H3PO4 → Ca3(PO4)2 + 6H2O | Brackets in the formulas |
| KMnO4 + HCl -> KCl + MnCl2 + H2O + Cl2 | 2KMnO4 + 16HCl → 2KCl + 2MnCl2 + 8H2O + 5Cl2 | A redox reaction with five species |
| Cu + HNO3 -> Cu(NO3)2 + NO + H2O | 3Cu + 8HNO3 → 3Cu(NO3)2 + 2NO + 4H2O | Copper in dilute nitric acid |
| CuSO4·5H2O -> CuSO4 + H2O | CuSO4·5H2O → CuSO4 + 5H2O | A hydrate losing its water |
Ionic and redox equations
With charges the tool balances two things at once: atoms of every element, and total charge. Ions can be written as Fe^3+, Fe+3 or Fe3+, and a bare electron as e-. Use SO4^2- or SO4 2- for ions made of several atoms, because SO42- would read as 42 oxygen atoms.
| You type | Balanced | Note |
|---|---|---|
| Cr2O7^2- + Fe^2+ + H+ -> Cr^3+ + Fe^3+ + H2O | Cr2O7^2- + 6Fe^2+ + 14H+ → 2Cr^3+ + 6Fe^3+ + 7H2O | Dichromate oxidising iron(II) |
| MnO4- + Fe+2 + H+ -> Mn+2 + Fe+3 + H2O | MnO4- + 5Fe+2 + 8H+ → Mn+2 + 5Fe+3 + 4H2O | The same idea with Fe+3 style charges |
| Cu + Ag+ -> Cu^2+ + Ag | Cu + 2Ag+ → Cu^2+ + 2Ag | Silver ions on copper wire |
| Fe^3+ + e- -> Fe^2+ | Fe^3+ + e- → Fe^2+ | A half-equation with an electron |
In acid solution put H+ and H2O in the equation yourself. The tool does not add them, but it finds the coefficients once they are there. The MnO4- and Cr2O7 rows above were typed that way.
How the tool balances
Each species gets an unknown coefficient. For every element, atoms on the left minus atoms on the right must be zero, which gives one linear equation per element, plus one for the charge. The tool solves that system with exact fractions (no rounding), takes the one free variable, and scales it to the smallest whole numbers.
Take H2 + O2 → H2O with coefficients a, b and c. Hydrogen gives 2a = 2c and oxygen gives 2b = c. So a = c and b = c/2. The smallest whole numbers are c = 2, a = 2, b = 1.
If the system has no solution, or the only solution has a zero or negative coefficient, the equation can't be balanced as written. If it has two or more free variables there is no single answer.
Balancing by hand
- Start with the element that appears in the fewest species, and leave hydrogen and oxygen for last.
- Treat a polyatomic ion such as SO4 as one unit if it stays together on both sides.
- If you end up with a fraction like 1/2, multiply every coefficient by 2.
- Finish by counting atoms on both sides, as the table under the result does.
When it says no
| You type | The tool says |
|---|---|
| H2 -> H2O | Can't be balanced: O appears only on the right side. Check the formulas for a typo. |
| H2 + O2 + N2 -> H2O + NH3 + H2O2 | This has more than one independent way to balance (3 of them), so there is no single answer. It usually means two separate reactions are written as one. Split it, or remove a species that is not needed. |
Related tools: find the molar mass of each species once the equation is balanced, or work out a molarity for a reagent in the reaction.
Numbers this uses
This tool has no measured constants. It counts atoms, so only the limits and the arithmetic are listed.
- Arithmetic is exact fractions on whole numbers (BigInt). No rounding is involved, so the coefficients are never off by a decimal.
- Species limit is 14 per equation. A limit we set to keep the page fast. Larger equations are usually two reactions in one.
- Element symbols is all 118 elements of the periodic table. IUPAC names and symbols, case sensitive: Co is cobalt, CO is carbon monoxide.
- Charge is integers, balanced as an extra row with the atoms. Electrons count as e- with a charge of −1.
Nothing you type is uploaded. We count events without cookies (details).
FAQ
How do you balance a chemical equation?
Make the number of atoms of every element the same on both sides by putting whole-number coefficients in front of the formulas. Never change a subscript, because that changes the substance. For H2 + O2 → H2O, two H2O gives 4 H and 2 O, so you need 2 H2 and 1 O2: 2H2 + O2 → 2H2O. The tool does this for any equation with exact algebra.
Why does the tool say an equation can't be balanced?
Either an element is on one side only (H2 → H2O has no oxygen on the left), or no set of positive whole numbers makes all the counts match. Both usually mean a typo in a formula, a missing product, or a charge that doesn't add up. The message names the element when it can.
What does "more than one independent way" mean?
The atom counts leave two or more free choices, so there are many correct answers and no single smallest one. It usually means two separate reactions are written as one equation, like H2 + O2 + N2 → H2O + NH3. Split it into its reactions and balance each.
Can it balance redox reactions and ionic equations?
Yes. Write the charge as Fe^3+, Fe+3 or Fe3+ and the electron as e-. The tool balances the charge as well as the atoms. For a half-equation in acid, add H+ and H2O yourself as species, then let the tool find the coefficients.
Which coefficients does it give when several answers are equivalent?
The smallest whole numbers with no common factor. 4H2 + 2O2 → 4H2O is also correct but the accepted form is 2H2 + O2 → 2H2O. A coefficient of 1 is left out.
How do I type subscripts, hydrates and arrows?
Plain digits for subscripts (H2O, Ca(OH)2). A dot or · for hydrates (CuSO4·5H2O). Use ->, => , = or → for the arrow. Brackets (), [] and {} all work. State labels like (s), (aq) and (g) are ignored.
Why are coefficients I typed ignored?
Balancing works out the coefficients from scratch, so any number in front of a formula is dropped. Typing 2H2 + O2 → H2O gives the same answer as H2 + O2 → H2O.
Is my equation sent anywhere?
No. The balancing runs in your browser. What you type is not put in the address bar, not stored and not counted. We only count that a balance happened.
More from FLXCode
Molar Mass CalculatorNew
Molar mass of any formula, with brackets and hydrates. Shows each element, its atom count and percent by mass.
Molarity CalculatorNew
Solve for molarity, mass, moles or volume. Type a formula for the molar mass and see every step with your numbers.
Dilution Calculator (C1V1 = C2V2)New
Solve C1V1 = C2V2 for any one value. Units in M, mM, µM, % and mg/mL, L to µL. Shows the solvent to add.
SpectrogramNew
Watch sound as a scrolling picture of frequency over time. Log or linear axis, FFT size, colour map, freeze.