Chemical Equation Balancer
Type any reaction and get the balanced chemical equation with steps: the atom count before and after, the inspection method a teacher marks, the algebraic matrix method, a conservation of mass check, a particle diagram and four charts. Works for ionic and redox equations too.
⚡ 0. Quick Answer
A chemical equation balancer finds the smallest whole-number coefficients that make every element appear the same number of times on both sides. For propane burning, C3H8 + O2 → CO2 + H2O balances as:
Rule of thumb: change only the coefficients, never the subscripts. Balance the element found in one compound on each side first, hydrogen next, oxygen last. Here 204.087 g of reactants give 204.087 g of products.
🔑 Key Takeaways
- A chemical equation balancer adds coefficients so that every element has the same number of atoms on both sides of the arrow.
- Propane burns as C3H8 + 5 O2 → 3 CO2 + 4 H2O, with 10 oxygen atoms on each side.
- Coefficients are mole ratios: 1 mol of propane needs 5 mol of oxygen, which is why stoichiometry always starts with a balanced equation.
- Balanced equations conserve atoms and mass (204.087 g in, 204.087 g out for propane), but not the number of molecules (6 in, 7 out).
- Ionic equations must also balance charge: MnO4− + 5 Fe2+ + 8 H+ → Mn2+ + 5 Fe3+ + 4 H2O has a total charge of +17 on both sides.
📚 1. What Is a Chemical Equation Balancer?
A chemical equation is a short way to write a reaction with formulas: reactants on the left, products on the right, and an arrow between them. A balanced chemical equation is one where each element has the same number of atoms on both sides, and, for ions, the same total charge. A chemical equation balancer is a tool that finds the numbers in front of the formulas, called coefficients, that make this true.
Balancing follows from the law of conservation of mass, stated by Antoine Lavoisier in 1789: atoms are not created or destroyed in a chemical reaction, they are only rearranged. If 3 carbon atoms go in, 3 carbon atoms must come out. Writing that rule once for each element turns any equation into a small set of simultaneous equations, which is why chemical equations are “actually matrix equations” (Alberty, 1991) and why a chemical equation balancer can solve any of them exactly.
A worked one-liner: hydrogen burns in oxygen to make water. The skeleton H2 + O2 → H2O has 2 oxygen atoms on the left and 1 on the right. Put 2 in front of H2O, then 2 in front of H2: 2 H2 + O2 → 2 H2O. Now there are 4 H and 2 O on each side.
Who uses it: CBSE and ICSE students in Classes 9 to 12 (balancing starts in the NCERT Class 10 chapter on chemical reactions), JEE and NEET aspirants with long redox equations, IGCSE, GCSE and A level students, AP Chemistry and IB students, first-year university students, and teachers who need an answer key for a balancing chemical equations worksheet. Lab staff, pharmacy and water-testing technicians use balanced equations every day to turn masses into moles.
| Form | Example | What it tells you |
|---|---|---|
| Word equation | propane + oxygen → carbon dioxide + water | Which substances react. No numbers. |
| Skeleton (unbalanced) equation | C3H8 + O2 → CO2 + H2O | The correct formulas, but atoms do not match (O: 2 left, 3 right). |
| Balanced chemical equation | C3H8 + 5 O2 → 3 CO2 + 4 H2O | Atoms match. The coefficients give the mole ratio 1 : 5 : 3 : 4. |
| Balanced ionic equation | 2 Ag+ + Cu → 2 Ag + Cu2+ | Atoms and total charge (+2 each side) match. |
| Method | How it works | Best for |
|---|---|---|
| Inspection (trial and error) | Balance one element at a time, O and H last | Short equations in Classes 9 and 10, GCSE |
| Algebraic (matrix) method | One equation per element, solve for the coefficients | Long equations, checking any answer, computers |
| Half-reaction (ion-electron) method | Split into oxidation and reduction, balance electrons | Ionic redox in acidic or basic solution (Class 11 and 12, JEE, AP) |
| Oxidation number method | Match the total increase and decrease in oxidation number | Molecular redox such as KMnO4 + HCl |
This chemical equation balancer uses the exact algebraic method to find the answer, then writes out the inspection method in teacher order so you can follow every step.
How accurate is this chemical equation balancer?
The chemical equation balancer solves the element matrix with exact whole-number (BigInt) arithmetic, so there is no rounding at any stage. It recounts every element and the total charge after solving, and the answer only gets the Verified badge if every row matches. Every equation on this page, 51 in all, was also balanced independently with SymPy in Python and gave identical coefficients.
Two cases trip up most online balancers, and this one reports them instead of guessing. An equation with a missing species has no solution; the tool says Cannot be balanced and shows which element will not match. An equation that hides two reactions has many solutions; the tool says Two independent reactions, because chemistry, not arithmetic, decides the ratio (Herndon, 1997; Olson, 1997). Students who balance by rule without picturing the particles make exactly these mistakes (Yarroch, 1985; Sanger, 2005), which is why the results include a particle diagram.
| What you get | Why it matters |
|---|---|
| Inspection steps in teacher order | Matches the written method marked in CBSE, GCSE and AP exams |
| Algebraic (matrix) method | Shows why the answer is unique, and works for 10+ species |
| Atom count before and after | The check examiners expect you to write |
| Acidic and basic redox balancing | Adds H+, OH− and H2O the way the half-reaction method does |
| Conservation of mass check | Links the balanced equation to grams, using CIAAW standard atomic weights |
| Batch mode and a shareable link | Balance a whole worksheet, or send one equation to a classmate |
🧮 2. Enter Your Equation in the Chemical Equation Balancer
Type it like this: C3H8 + O2 -> CO2 + H2O. Put spaces around each plus sign. Any arrow works: ->, =, →; use <=> or ⇌ for a reversible reaction and the answer keeps ⇌. Gas ↑ and precipitate ↓ marks are allowed. Brackets: Ca(OH)2, K4[Fe(CN)6]. Hydrates: CuSO4.5H2O. Ions: SO4^2-, Fe^3+, Fe3+, NH4+. States (s) (l) (g) (aq) are kept. Capitals matter: Co is cobalt, CO is carbon monoxide. Any coefficients you type are ignored and worked out again.
Press Enter in the equation box to balance. Nothing is calculated until you press Balance.
The medium and atomic-weight settings from the One equation tab are used for every line. Teachers: paste a whole worksheet into the chemical equation balancer and download the answer key.
📊 3. Chemical Equation Balancer Results with Step-by-Step Working
🧠 4. Understanding Your Balanced Equation, In Detail
4.1 What a balanced chemical equation means
A balanced chemical equation is a counting statement. It says that the atoms present before the reaction are exactly the atoms present after it, only joined in new ways. In C3H8 + 5 O2 → 3 CO2 + 4 H2O there are 3 carbon, 8 hydrogen and 10 oxygen atoms on each side. Nothing appears and nothing vanishes.
That is why a chemical equation is balanced when the atom-count table has a tick in every row. If the species carry charges, the total charge must also match. Those two checks are exactly what the green Verified badge means.
4.2 Coefficients are mole ratios, not masses
The coefficients tell you how many particles, or how many moles, react. 1 mol of propane reacts with 5 mol of oxygen. They do not say 1 g reacts with 5 g. To go from moles to grams you multiply by the molar mass: 1 mol C3H8 is 44.097 g and 5 mol O2 is 159.990 g. This is the significance of balancing chemical equations in stoichiometry: every calculation of reacting masses, gas volumes, limiting reagents and yields uses these ratios.
4.3 Atoms and mass are conserved, molecules are not
Students often expect the number of molecules to match too. It does not have to. Propane combustion turns 6 molecules into 7 (1 + 5 on the left, 3 + 4 on the right). Mass, however, is conserved exactly, because mass belongs to the atoms: 204.087 g of reactants give 204.087 g of products for one mole of reaction. The mass table in Section 3 shows this for your equation.
4.4 Why the smallest whole numbers
Any multiple of a balanced equation is also balanced: 2 C3H8 + 10 O2 → 6 CO2 + 8 H2O is still correct. By convention the answer uses the smallest whole numbers with no common factor. Fractions such as ½ O2 are accepted in thermochemistry (they make "per mole of product" equations), but exam markers expect whole numbers in an ordinary balanced equation.
4.5 State symbols do not change the coefficients
The symbols (s), (l), (g) and (aq) tell you the physical state at the reaction conditions, usually 25 °C and 1 atm for school work. They matter for enthalpy changes and for net ionic equations, but they never change how many atoms there are, so they never change the coefficients. This balancer keeps any state you type and can hide them.
4.6 When an equation cannot be balanced
Some equations have no balanced form. CO2 + H2O → C6H12O6 fails because a product, O2, is missing: the carbon and hydrogen equations force 6 CO2 and 6 H2O, which carry 18 oxygen atoms, but glucose holds only 6. The tool reports Cannot be balanced instead of forcing an answer, and shows the unbalanced atom count so you can find the missing or wrong formula.
Other equations have more than one independent answer. H2 + O2 → H2O + H2O2 is really two reactions written as one (making water and making hydrogen peroxide), and any mix of them balances. The tool reports Two independent reactions. Chemistry, not arithmetic, decides how much of each happens, so split it into two equations.
4.7 Ionic and redox equations
In an ionic equation the total charge must balance as well as the atoms. 2 Ag+ + Cu → 2 Ag + Cu2+ has a charge of +2 on each side. Ionic redox equations in water usually need H+ and H2O (acidic solution) or OH− and H2O (basic solution) added before they balance. Choose the medium in Section 2 and the balancer adds them, which reproduces the result of the half-reaction method: MnO4− + 5 Fe2+ + 8 H+ → Mn2+ + 5 Fe3+ + 4 H2O.
4.8 A teacher's shortcut that the matrix explains
The classroom rule "oxygen last" is not superstition. Oxygen usually appears in the most species (O2, CO2 and H2O in a combustion), so it is the element whose equation links all the others. Fixing the elements that sit in only one species on each side first, then hydrogen, leaves oxygen with a single free coefficient: O2. That is the same order the chemical equation balancer uses to write its steps, and it is why a fraction like 13/2 O2 for butane appears at the very end and is cleared by doubling.
4.9 How this links to the next topic
Balancing is step one of every quantitative chemistry problem. Next you convert grams to moles with the molar mass, use the coefficients to find the limiting reagent, and work out the theoretical and percent yield. Skipping the balancing step is the most common reason a stoichiometry answer is wrong by a whole-number factor.
✍ 5. How to Write the Balanced Equation in Your Answer
📌 Conventions examiners look for
- Write the skeleton equation first, then the balanced one.
- Show the atom count for each element; one line per element is enough.
- Coefficients are written in front, at full size. Never write 2H2O as H4O2.
- Add state symbols if the question asks for them.
📌 Conventions
- A coefficient of 1 is not written.
- Use one arrow (→); use ⇌ only for a reversible reaction or an equilibrium.
- Subscripts sit low and small: H2SO4. Charges sit high: SO42−.
📌 Conventions
- Give the equation with state symbols in a lab report.
- Name the atomic-weight set if you quote masses.
- State the conditions (temperature, pressure) when gases or solutions are involved.
📌 Conventions
- Accept any correct whole-number multiple only if the mark scheme allows it; most ask for the lowest ratio.
- Use the Batch tab to make a whole worksheet answer key in one go.
📌 Conventions
- Write subscripts as plain digits: H2SO4.
- Write charges with a caret: SO4^2-, Fe^3+.
- Use -> for the arrow.
∑ 6. Formulas Used by the Chemical Equation Balancer
🔀 7. Balancing Chemical Equations Flowchart, Step by Step
This flowchart shows the steps for balancing chemical equations by inspection, on the same example used in the Excel, R, Python and by-hand sections: propane burning in oxygen, C3H8 + O2 → CO2 + H2O.
Check any box yourself: the Excel sheet in Section 9, the R script in Section 10 and the Python script in Section 11 all return 1, 5, 3, 4 and 204.087 g on each side for this equation.
📝 8. How to Use This Chemical Equation Balancer
- Type the unbalanced equation. Write reactants, an arrow, then products, with spaces around each plus sign, for example C3H8 + O2 -> CO2 + H2O.
- Check the preview. The formulas appear under the box with proper subscripts. If a formula is wrong, a message in purple tells you what to fix.
- Use capitals carefully. Element symbols start with a capital letter: Co is cobalt, CO is carbon monoxide, and NaCl is not NACL.
- Add charges and states if you need them. Write ions as SO4^2- or Fe^3+, electrons as e-, and states as (s), (l), (g) or (aq). The symbol buttons insert them for you.
- Choose the medium for ionic redox. Pick Acidic or Basic solution and the balancer adds H⁺ or OH⁻ and H₂O, as the half-reaction method does.
- Pick the atomic weights. CIAAW 2024 values are the default; choose rounded exam values to match a textbook. This changes the mass check only.
- Press Balance Equation. Nothing is calculated before you press it, and any change to the inputs clears the old result.
- Read the answer box and the atom count. The Verified badge means every element and the charge match on both sides.
- Follow the steps. Read the inspection method for the written answer, and the matrix method to see why the answer is unique.
- Copy, export or batch. Copy the equation, download a report or PDF, or use the Batch tab to balance a whole worksheet at once.
📈 9. How to Balance a Chemical Equation in Excel
Excel cannot read a formula like Ca(OH)2, but it can solve the element equations once you type the atom counts into cells. The trick is to fix one coefficient at 1 (the most complicated formula, here C3H8), move it to the right-hand side, and solve the square system that is left with MINVERSE and MMULT. The same sheet then checks atoms and mass with SUMPRODUCT. Everything below uses the propane example, so the answer must be 1, 5, 3, 4, the same as the chemical equation balancer gives in Section 3.
=MMULT(MINVERSE(B2:D4),E2:E4). In Excel 365 it spills; in Excel 2016 or 2019 press Ctrl+Shift+Enter.9.1 The functions you need
| You want | Excel function | Note |
|---|---|---|
| Solve the element equations | =MMULT(MINVERSE(B2:D4),E2:E4) | Needs a square matrix: as many equations as unknowns |
| Check the matrix can be solved | =MDETERM(B2:D4) | 0 means no single answer: pick different rows or another species to fix |
| Atoms on one side | =SUMPRODUCT(B$8:C$8,B9:C9) | Coefficients times atom counts, added up |
| Balanced? flag | =IF(F9=G9,"OK","NO") | One flag per element |
| Mass of one side | =SUMPRODUCT(B8:C8,B12:C12) | Coefficients times molar masses |
| Clear a fraction | =F2*2 or =ROUND(F2*k,0) | k is the smallest number that makes every result whole |
| Smallest whole numbers | =GCD(B8:E8) | Divide by it if it is more than 1 |
9.2 Step by step
1 Write one row per element, one column per unknown
Call the coefficients a (C3H8), b (O2), c (CO2) and d (H2O), and set a = 1. The element equations become C: c = 3, H: 2d = 8, O: 2b − 2c − d = 0. Type the numbers in front of b, c and d into B2:D4 and the right-hand sides into E2:E4.
Rows are C, H and O; columns are the unknowns b, c, d; column E holds 3, 8, 0 from a = 1.
2 Solve with MMULT and MINVERSE
Select F2:F4 and enter the array formula. Excel inverts the 3 × 3 matrix and multiplies it by the right-hand side.
=MMULT(MINVERSE(B2:D4),E2:E4)
The answer column reads b = 5, c = 3, d = 4, so C3H8 + 5 O2 → 3 CO2 + 4 H2O.
3 Check every element with SUMPRODUCT
Lay out the coefficients in row 8 and the atom counts under them. Left-side atoms use the reactant columns, right-side atoms the product columns.
=SUMPRODUCT(B$8:C$8,B9:C9) =SUMPRODUCT(D$8:E$8,D9:E9)
Carbon 3 = 3, hydrogen 8 = 8, oxygen 10 = 10: every flag reads OK.
4 Check the mass
Put the molar masses (g/mol) in row 12 and multiply by the coefficients.
=SUMPRODUCT(B8:C8,B12:C12) =SUMPRODUCT(D8:E8,D12:E12)
Reactants 204.087 g and products 204.087 g per mole of reaction, using CIAAW 2024 atomic weights.
9.3 Awkward cases
- More elements than unknowns. Combustion of propane has 3 unknowns after fixing a, and 3 elements, so it is square. KMnO4 + HCl has 6 species, so 5 unknowns after fixing one, and 5 elements (K, Mn, O, H, Cl): square again. If you ever have more element rows than unknowns, leave one row out of the solve and use it afterwards as a check.
- Fractions in the answer. Butane gives b = 6.5. Multiply the whole column by 2.
- Ionic equations. Add a "charge" row with the ion charges (reactants positive, products negative), exactly like an element row.
- Brackets and hydrates. Count atoms by hand before typing: Ca3(PO4)2 has 8 oxygen atoms, CuSO4·5H2O has 9.
9.4 Why your Excel answer might differ from R, Python or this page
| Situation | What happens | Fix |
|---|---|---|
| Answer shows 4.999999999 | MINVERSE works in floating point | Wrap it: =ROUND(MMULT(MINVERSE(B2:D4),E2:E4),6) |
| Different but proportional numbers | You fixed a different species at 1 | Scale to the smallest whole numbers; the ratio is what matters |
| Mass total differs in the last digit | Different atomic-weight set (rounded vs CIAAW) | Coefficients never change; only masses do |
#NUM! from MINVERSE | The matrix is singular | The equation cannot be balanced, or it is two reactions, or you dropped the wrong row |
| Tool | Solve the coefficients | Check the atoms |
|---|---|---|
| Excel / Google Sheets | =MMULT(MINVERSE(B2:D4),E2:E4) | =SUMPRODUCT(...) |
| R | MASS::Null(t(A)) | A %*% coef |
| Python | sympy.Matrix(A).nullspace() | A * Matrix(coef) |
| Casio fx-991EX | Equation mode, simultaneous equations, 3 unknowns | By hand |
9.5 Charting the atom count in Excel
- Put the elements in one column and the left and right atom totals (F9:G11) next to them.
- Insert → Charts → Clustered Column.
- Equal pairs of bars mean the equation is balanced; this is Chart 2 in Section 3.
- For the mass check, use a Stacked Column with one series per species.
9.6 Excel errors you will probably hit
| Excel shows | Why | Fix |
|---|---|---|
#NUM! | MINVERSE of a singular matrix (determinant 0) | Check MDETERM; choose a different fixed species or rows |
#VALUE! | Matrix not square, or text in a cell | Same number of rows and columns; numbers only |
| Only one cell filled | Old Excel needs an array entry | Select all answer cells, type the formula, press Ctrl+Shift+Enter |
| Negative coefficient | A product is on the wrong side, or a sign is wrong in the matrix | Reactants positive, products negative, then recheck |
📈 10. How to Balance a Chemical Equation in R
R solves the element matrix exactly with the null space. MASS::Null() returns a basis for the null space, the script scales it to the smallest whole numbers, prints the balanced equation, verifies every element, checks the mass and saves one 300 dpi figure. It prints 1, 5, 3, 4 and 204.087 g for propane, matching the chemical equation balancer on this page.
Rscript balance.R. Change only the matrix A, the species names, n_left and the molar masses.10.1 The complete script
R with MASS, saves balanced_atoms.png
# ============================================================
# Chemical equation balancer in R: exact null space method
# StatsUnlock - https://statsunlock.com/chemical-equation-balancer/
# Needs only MASS (ships with every R install).
# ============================================================
library(MASS)
# ---- 1. Your equation ---------------------------------------
# One column per species, one row per element (atoms in ONE formula unit).
# Reactants positive, products negative.
# C3H8 O2 CO2 H2O
A <- rbind(C = c(3, 0, -1, 0),
H = c(8, 0, 0, -2),
O = c(0, 2, -2, -1))
species <- c("C3H8", "O2", "CO2", "H2O")
n_left <- 2 # how many species are reactants
colnames(A) <- species
# Molar masses in g/mol from CIAAW 2024 atomic weights (C 12.011, H 1.008, O 15.999)
M <- c(C3H8 = 3*12.011 + 8*1.008, O2 = 2*15.999,
CO2 = 12.011 + 2*15.999, H2O = 2*1.008 + 15.999)
# ---- 2. Solve A %*% x = 0 ----------------------------------
N <- Null(t(A)) # basis of the null space of A
if (ncol(N) != 1) stop(if (ncol(N) == 0) "Cannot be balanced: check the formulas."
else "More than one solution: this is two reactions added together.")
v <- N[, 1] / min(abs(N[, 1])) # scale so the smallest entry is 1
# smallest whole numbers: try multipliers 1, 2, 3, ... until every entry is an integer
for (k in 1:1000) if (all(abs(k * v - round(k * v)) < 1e-6)) break
coef <- round(k * v)
if (coef[1] < 0) coef <- -coef
if (any(coef <= 0)) stop("No balance with every species on the side given.")
names(coef) <- species
# ---- 3. Print the answer ------------------------------------
term <- function(i) paste0(ifelse(coef[i] == 1, "", paste0(coef[i], " ")), species[i])
eq <- paste(paste(sapply(1:n_left, term), collapse = " + "), "->",
paste(sapply((n_left + 1):length(species), term), collapse = " + "))
cat("Balanced equation:", eq, "\n")
cat("Coefficients :", paste(coef, collapse = " : "), "\n")
# ---- 4. Verify ----------------------------------------------
resid <- A %*% coef
cat("Atom check (all zero means balanced):", resid, "\n")
cat("Verdict:", ifelse(all(resid == 0), "Verified, every element balances", "NOT balanced"), "\n")
mass_left <- sum(coef[1:n_left] * M[1:n_left])
mass_right <- sum(coef[-(1:n_left)] * M[-(1:n_left)])
cat(sprintf("Mass check: reactants %.3f g, products %.3f g per mole of reaction\n",
mass_left, mass_right))
# ---- 5. One 300 dpi figure: atoms per element, left vs right ---------
left_atoms <- A[, 1:n_left, drop = FALSE] %*% coef[1:n_left]
right_atoms <- -A[, -(1:n_left), drop = FALSE] %*% coef[-(1:n_left)]
png("balanced_atoms.png", width = 2400, height = 1500, res = 300)
par(mar = c(4.5, 4.5, 3, 1))
barplot(rbind(left_atoms[, 1], right_atoms[, 1]), beside = TRUE,
col = c("#2563eb", "#16a34a"), border = NA, las = 1,
names.arg = rownames(A), xlab = "Element", ylab = "Number of atoms",
main = eq, cex.main = 0.95, legend.text = c("Reactants", "Products"),
args.legend = list(x = "topright", bty = "n"))
invisible(dev.off())
cat("Saved balanced_atoms.png\n")
Output: Balanced equation: C3H8 + 5 O2 -> 3 CO2 + 4 H2O, Atom check: 0 0 0, Mass check: reactants 204.087 g, products 204.087 g.
10.2 R traps
Null(A)gives the null space oft(A), so passt(A)to solve A x = 0.- The basis vector is in floating point (for example 0.18, 0.90, 0.54, 0.72). Scale it before rounding, never round first.
round()rounds half to even; that never matters here because the scaled values are whole numbers to within 10−6.- Vectors recycle silently: the molar mass vector must be the same length as the species vector.
10.3 What each part does
| Line | What it does |
|---|---|
A <- rbind(...) | The element matrix: reactants positive, products negative |
Null(t(A)) | All coefficient vectors that make every row add to zero |
ncol(N) != 1 | 0 columns: cannot be balanced; 2 or more: two reactions |
for (k in 1:1000) | Finds the multiplier that makes every coefficient whole |
A %*% coef | The verification: all zeros means balanced |
10.4 Using a package for the formulas
Building the matrix by hand is fine for school equations. For many equations, the CHNOSZ package can parse formulas (makeup("C3H8")) and fill the matrix for you.
10.5 The figure
The script saves balanced_atoms.png at 2400 × 1500 pixels and 300 dpi: one blue and one green bar per element. Equal pairs of bars are the visual proof of a balanced chemical equation.
🐍 11. How to Balance a Chemical Equation in Python
This script reads an equation as text, counts the atoms in each formula (brackets and hydrates included), builds the element matrix, and finds the exact null space with SymPy, so there is no rounding at all. It prints the balanced equation, verifies the atoms and the mass, and saves a 300 dpi chart. It is the same method this chemical equation balancer runs in your browser.
Install once: pip install sympy matplotlib
11.1 The complete script
Python with SymPy, saves balanced_atoms.png
# ============================================================
# Chemical equation balancer in Python: exact null space with SymPy
# StatsUnlock - https://statsunlock.com/chemical-equation-balancer/
# pip install sympy matplotlib
# ============================================================
import re
from math import lcm
from sympy import Matrix
import matplotlib
matplotlib.use("Agg")
import matplotlib.pyplot as plt
# ---- 1. Your equation (spaces around + and an arrow) ----------
equation = "C3H8 + O2 -> CO2 + H2O"
# CIAAW 2024 standard atomic weights (g/mol) for the elements you need
WEIGHTS = {"H": 1.008, "Li": 6.94, "C": 12.011, "N": 14.007, "O": 15.999,
"F": 18.998, "Na": 22.990, "Mg": 24.305, "Al": 26.982, "Si": 28.085,
"P": 30.974, "S": 32.06, "Cl": 35.45, "K": 39.098, "Ca": 40.078,
"Cr": 51.996, "Mn": 54.938, "Fe": 55.845, "Co": 58.933, "Ni": 58.693,
"Cu": 63.546, "Zn": 65.38, "Br": 79.904, "Ag": 107.87, "I": 126.90,
"Ba": 137.33, "Pb": 207.2} # add any element you need
def parse_formula(f):
"""Count atoms in a formula such as Ca(OH)2, Al2(SO4)3 or CuSO4.5H2O."""
total = {}
for i, part in enumerate(re.split(r"[.*·]", f)):
mult = 1
m = re.match(r"^(\d+)(.*)$", part)
if m and i > 0: # the 5 in CuSO4.5H2O
mult, part = int(m.group(1)), m.group(2)
tokens = re.findall(r"[A-Z][a-z]?|\d+|[()\[\]]", part)
stack, j = [{}], 0
while j < len(tokens):
t = tokens[j]; j += 1
if t in "([":
stack.append({}); continue
n = 1
if j < len(tokens) and tokens[j].isdigit():
n = int(tokens[j]); j += 1
if t in ")]": # close a bracket, multiply what is inside
for k, v in stack.pop().items():
stack[-1][k] = stack[-1].get(k, 0) + v * n
else: # an element symbol
stack[-1][t] = stack[-1].get(t, 0) + n
for k, v in stack[0].items():
total[k] = total.get(k, 0) + v * mult
return total
left_txt, right_txt = re.split(r"\s*(?:->|=|→)\s*", equation)
left = [s.strip() for s in left_txt.split(" + ")]
right = [s.strip() for s in right_txt.split(" + ")]
species = left + right
counts = [parse_formula(s) for s in species]
elements = sorted({e for c in counts for e in c})
# ---- 2. Element matrix: reactants +, products - --------------
A = Matrix([[c.get(e, 0) * (1 if i < len(left) else -1) for i, c in enumerate(counts)]
for e in elements])
basis = A.nullspace()
if len(basis) != 1:
raise SystemExit("Cannot be balanced" if not basis else "Two reactions added together: split them")
v = basis[0]
k = lcm(*[int(x.q) for x in v]) # clear every fraction
coef = [int(x * k) for x in v]
if coef[0] < 0:
coef = [-c for c in coef]
assert all(c > 0 for c in coef), "No balance with every species on the side given"
# ---- 3. Print the answer -------------------------------------
term = lambda c, s: (f"{c} " if c != 1 else "") + s
eq = " + ".join(term(c, s) for c, s in zip(coef[:len(left)], left)) + " -> " + \
" + ".join(term(c, s) for c, s in zip(coef[len(left):], right))
print("Balanced equation:", eq)
print("Coefficients :", " : ".join(map(str, coef)))
# ---- 4. Verify: atoms and mass --------------------------------
resid = A * Matrix(coef)
print("Atom check (all zero means balanced):", list(resid))
print("Verdict:", "Verified, every element balances" if all(r == 0 for r in resid) else "NOT balanced")
missing = sorted({e for c in counts for e in c} - WEIGHTS.keys())
if missing:
raise SystemExit(f"Add the atomic weight of {missing} to WEIGHTS for the mass check")
M = [sum(WEIGHTS[e] * n for e, n in c.items()) for c in counts]
m_left = sum(c * m for c, m in zip(coef[:len(left)], M[:len(left)]))
m_right = sum(c * m for c, m in zip(coef[len(left):], M[len(left):]))
print(f"Mass check: reactants {m_left:.3f} g, products {m_right:.3f} g per mole of reaction")
# ---- 5. One 300 dpi figure -------------------------------------
L = [sum(coef[i] * counts[i].get(e, 0) for i in range(len(left))) for e in elements]
R = [sum(coef[i] * counts[i].get(e, 0) for i in range(len(left), len(species))) for e in elements]
x = range(len(elements))
fig, ax = plt.subplots(figsize=(8, 5))
ax.bar([i - 0.2 for i in x], L, width=0.4, color="#2563eb", label="Reactants")
ax.bar([i + 0.2 for i in x], R, width=0.4, color="#16a34a", label="Products")
ax.set_xticks(list(x), elements)
ax.set_xlabel("Element"); ax.set_ylabel("Number of atoms"); ax.set_title(eq)
ax.legend(frameon=False)
fig.tight_layout(); fig.savefig("balanced_atoms.png", dpi=300)
print("Saved balanced_atoms.png")
Output: Balanced equation: C3H8 + 5 O2 -> 3 CO2 + 4 H2O, Atom check: [0, 0, 0], Mass check: reactants 204.087 g, products 204.087 g. Change the equation line to balance anything else; KMnO4 + HCl -> KCl + MnCl2 + H2O + Cl2 gives 2 : 16 : 2 : 2 : 8 : 5.
11.2 Python traps
- NumPy's
linalg.svdgives a floating-point null space; SymPy'snullspace()gives exact fractions such as 13/2, which is why this script uses SymPy. ^is bitwise XOR in Python; write powers with**.math.lcmneeds Python 3.9 or newer.- The formula parser here does not read charges; for ions add a "charge" row to
Ayourself, or use ChemPy.
11.3 The one-line alternative with ChemPy
ChemPy balances directly from formulas: from chempy import balance_stoichiometry, then balance_stoichiometry({'C3H8', 'O2'}, {'CO2', 'H2O'}) returns O2: 5, CO2: 3, H2O: 4. Install it with pip install chempy.
11.4 What each part does
| Part | What it does |
|---|---|
parse_formula() | Counts atoms, multiplying through brackets and the hydrate dot |
A.nullspace() | Exact rational solutions of A x = 0 |
lcm(...) | Clears the fractions to give whole numbers |
A * Matrix(coef) | Verification: a zero for every element |
11.5 The figure
The script saves balanced_atoms.png at 300 dpi with reactant atoms in blue and product atoms in green for each element.
📋 12. Reference Tables for Balancing Chemical Equations
12.1 Atomic weights used by this balancer (common elements)
| Element | Symbol | Standard atomic weight (CIAAW 2024) | Rounded exam value |
|---|---|---|---|
| Hydrogen | H | 1.0080 | 1 |
| Carbon | C | 12.011 | 12 |
| Nitrogen | N | 14.007 | 14 |
| Oxygen | O | 15.999 | 16 |
| Sodium | Na | 22.990 | 23 |
| Magnesium | Mg | 24.305 | 24 |
| Aluminum | Al | 26.982 | 27 |
| Phosphorus | P | 30.974 | 31 |
| Sulfur | S | 32.06 | 32 |
| Chlorine | Cl | 35.45 | 35.5 |
| Potassium | K | 39.098 | 39 |
| Calcium | Ca | 40.078 | 40 |
| Manganese | Mn | 54.938 | 55 |
| Iron | Fe | 55.845 | 56 |
| Copper | Cu | 63.546 | 63.5 |
| Zinc | Zn | 65.38 | 65 |
| Silver | Ag | 107.87 | 108 |
| Iodine | I | 126.90 | 127 |
| Barium | Ba | 137.33 | 137 |
| Lead | Pb | 207.2 | 207 |
Source: CIAAW (IUPAC Commission on Isotopic Abundances and Atomic Weights), abridged standard atomic weights, 2024 edition, dimensionless; multiply by g/mol for molar mass. Rounded values are the ones used in most CBSE, GCSE and IGCSE papers. Atomic weights affect only the mass check, never the coefficients.
12.2 Common polyatomic ions
| Ion | Formula | Charge | Type it as |
|---|---|---|---|
| Ammonium | NH4+ | +1 | NH4+ |
| Hydroxide | OH− | −1 | OH- |
| Nitrate | NO3− | −1 | NO3- |
| Hydrogen carbonate | HCO3− | −1 | HCO3- |
| Permanganate | MnO4− | −1 | MnO4- |
| Acetate (ethanoate) | CH3COO− | −1 | CH3COO- |
| Carbonate | CO32− | −2 | CO3^2- |
| Sulfate | SO42− | −2 | SO4^2- |
| Sulfite | SO32− | −2 | SO3^2- |
| Dichromate | Cr2O72− | −2 | Cr2O7^2- |
| Phosphate | PO43− | −3 | PO4^3- |
A polyatomic ion that appears unchanged on both sides (SO42− in Al + CuSO4) can be balanced as one unit by hand. The balancer counts its atoms one by one and reaches the same answer.
12.3 The seven diatomic elements
| Element | Formula as a free element | State at 25 °C, 1 atm |
|---|---|---|
| Hydrogen | H2 | gas |
| Nitrogen | N2 | gas |
| Oxygen | O2 | gas |
| Fluorine | F2 | gas |
| Chlorine | Cl2 | gas |
| Bromine | Br2 | liquid |
| Iodine | I2 | solid |
Writing O instead of O2 for oxygen gas is the most common skeleton-equation error. Sulfur (S8) and phosphorus (P4) are usually written S and P at school level.
12.4 State symbols
| Symbol | Meaning | Example |
|---|---|---|
| (s) | solid | CaCO3(s) |
| (l) | liquid | H2O(l) |
| (g) | gas | CO2(g) |
| (aq) | dissolved in water (aqueous) | NaCl(aq) |
12.5 Types of reaction and their general form
| Type | General form | Balanced example |
|---|---|---|
| Synthesis (combination) | A + B → AB | 2 Mg + O2 → 2 MgO |
| Decomposition | AB → A + B | CaCO3 → CaO + CO2 |
| Single displacement | A + BC → AC + B | Zn + 2 HCl → ZnCl2 + H2 |
| Double displacement | AB + CD → AD + CB | AgNO3 + NaCl → AgCl + NaNO3 |
| Neutralisation | acid + base → salt + water | H2SO4 + 2 NaOH → Na2SO4 + 2 H2O |
| Combustion | fuel + O2 → CO2 + H2O | CH4 + 2 O2 → CO2 + 2 H2O |
| Redox | electrons move between species | Fe2O3 + 3 CO → 2 Fe + 3 CO2 |
The reaction type shown in Section 3 comes from these simple rules and is a guide. Many reactions belong to more than one type (combustion is also redox).
12.6 Thirty balanced chemical equations with answers
Every equation in this answer key was balanced and checked by the same engine as the chemical equation balancer above. Use it as a balancing chemical equations worksheet answer key: cover the right-hand column and try each one first.
Free printable PDF worksheet with answers.
| # | Reaction | Skeleton equation | Balanced chemical equation | Type |
|---|---|---|---|---|
| 1 | Hydrogen burning | H2 + O2 → H2O | 2 H2 + O2 → 2 H2O | Synthesis (combination), Redox |
| 2 | Haber process | N2 + H2 → NH3 | N2 + 3 H2 → 2 NH3 | Synthesis (combination), Redox |
| 3 | Magnesium burning | Mg + O2 → MgO | 2 Mg + O2 → 2 MgO | Synthesis (combination), Redox |
| 4 | Sodium with chlorine | Na + Cl2 → NaCl | 2 Na + Cl2 → 2 NaCl | Synthesis (combination), Redox |
| 5 | Sodium with water | Na + H2O → NaOH + H2 | 2 Na + 2 H2O → 2 NaOH + H2 | Single displacement, Redox |
| 6 | Calcium with water | Ca + H2O → Ca(OH)2 + H2 | Ca + 2 H2O → Ca(OH)2 + H2 | Single displacement, Redox |
| 7 | Zinc with hydrochloric acid | Zn + HCl → ZnCl2 + H2 | Zn + 2 HCl → ZnCl2 + H2 | Single displacement, Redox |
| 8 | Iron with copper sulfate | Fe + CuSO4 → FeSO4 + Cu | Fe + CuSO4 → FeSO4 + Cu | Single displacement, Redox |
| 9 | Aluminium oxide formation | Al + O2 → Al2O3 | 4 Al + 3 O2 → 2 Al2O3 | Synthesis (combination), Redox |
| 10 | Iron with chlorine | Fe + Cl2 → FeCl3 | 2 Fe + 3 Cl2 → 2 FeCl3 | Synthesis (combination), Redox |
| 11 | Limestone decomposition | CaCO3 → CaO + CO2 | CaCO3 → CaO + CO2 | Decomposition |
| 12 | Potassium chlorate decomposition | KClO3 → KCl + O2 | 2 KClO3 → 2 KCl + 3 O2 | Decomposition, Redox |
| 13 | Hydrogen peroxide decomposition | H2O2 → H2O + O2 | 2 H2O2 → 2 H2O + O2 | Decomposition, Redox |
| 14 | Baking soda on heating | NaHCO3 → Na2CO3 + CO2 + H2O | 2 NaHCO3 → Na2CO3 + CO2 + H2O | Decomposition |
| 15 | Lead nitrate on heating | Pb(NO3)2 → PbO + NO2 + O2 | 2 Pb(NO3)2 → 2 PbO + 4 NO2 + O2 | Decomposition, Redox |
| 16 | Methane combustion | CH4 + O2 → CO2 + H2O | CH4 + 2 O2 → CO2 + 2 H2O | Combustion, Redox |
| 17 | Ethane combustion | C2H6 + O2 → CO2 + H2O | 2 C2H6 + 7 O2 → 4 CO2 + 6 H2O | Combustion, Redox |
| 18 | Butane combustion | C4H10 + O2 → CO2 + H2O | 2 C4H10 + 13 O2 → 8 CO2 + 10 H2O | Combustion, Redox |
| 19 | Ethanol combustion | C2H5OH + O2 → CO2 + H2O | C2H5OH + 3 O2 → 2 CO2 + 3 H2O | Combustion, Redox |
| 20 | Respiration (glucose) | C6H12O6 + O2 → CO2 + H2O | C6H12O6 + 6 O2 → 6 CO2 + 6 H2O | Aerobic respiration (combustion of glucose), Redox |
| 21 | Photosynthesis | CO2 + H2O → C6H12O6 + O2 | 6 CO2 + 6 H2O → C6H12O6 + 6 O2 | Photosynthesis, Redox |
| 22 | Neutralisation, HCl | NaOH + HCl → NaCl + H2O | NaOH + HCl → NaCl + H2O | Neutralisation (double displacement) |
| 23 | Neutralisation, H2SO4 | NaOH + H2SO4 → Na2SO4 + H2O | 2 NaOH + H2SO4 → Na2SO4 + 2 H2O | Neutralisation (double displacement) |
| 24 | Barium sulfate precipitate | BaCl2 + Na2SO4 → BaSO4 + NaCl | BaCl2 + Na2SO4 → BaSO4 + 2 NaCl | Double displacement |
| 25 | Silver chloride precipitate | AgNO3 + NaCl → AgCl + NaNO3 | AgNO3 + NaCl → AgCl + NaNO3 | Double displacement |
| 26 | Lead iodide precipitate | Pb(NO3)2 + KI → PbI2 + KNO3 | Pb(NO3)2 + 2 KI → PbI2 + 2 KNO3 | Double displacement |
| 27 | Marble chips in acid | CaCO3 + HCl → CaCl2 + H2O + CO2 | CaCO3 + 2 HCl → CaCl2 + H2O + CO2 | General reaction |
| 28 | Ammonia oxidation (Ostwald) | NH3 + O2 → NO + H2O | 4 NH3 + 5 O2 → 4 NO + 6 H2O | Redox |
| 29 | Blast furnace | Fe2O3 + CO → Fe + CO2 | Fe2O3 + 3 CO → 2 Fe + 3 CO2 | Redox |
| 30 | Thermite reaction | Al + Fe2O3 → Al2O3 + Fe | 2 Al + Fe2O3 → Al2O3 + 2 Fe | Single displacement, Redox |
📈 13. Chemical Equation Balancer Example Results
Eight examples run through the chemical equation balancer, from a textbook combustion to an equation that cannot be balanced. Each figure is drawn from the computed atom counts: blue bars are reactant atoms, green bars product atoms (orange where they do not match).
Methane burning in a gas stove
The simplest combustion: carbon, then hydrogen, then oxygen.
Natural gas is mostly methane. Balance its complete combustion in air. Skeleton: CH4(g) + O2(g) -> CO2(g) + H2O(l)
| Element | Left | Right | Balanced? |
|---|---|---|---|
| C | 1 × 1 = 1 | 1 × 1 = 1 | ✓ Yes |
| H | 1 × 4 = 4 | 2 × 2 = 4 | ✓ Yes |
| O | 2 × 2 = 4 | 1 × 2 + 2 × 1 = 4 | ✓ Yes |
What it means: One methane molecule needs two oxygen molecules. Carbon (1 = 1) and hydrogen (4 = 4) are fixed first; oxygen ends at 4 = 4. This is the reaction in every gas stove and the reason a blocked flue is dangerous: with too little O2 the products change to CO.
How to write it: CH4(g) + 2 O2(g) → CO2(g) + 2 H2O(l)
Steam over hot iron
The NCERT favourite with Fe3O4.
Balance the reaction of iron with steam, a standard CBSE Class 10 question. Skeleton: Fe(s) + H2O(g) -> Fe3O4(s) + H2(g)
| Element | Left | Right | Balanced? |
|---|---|---|---|
| Fe | 3 × 1 = 3 | 1 × 3 = 3 | ✓ Yes |
| H | 4 × 2 = 8 | 4 × 2 = 8 | ✓ Yes |
| O | 4 × 1 = 4 | 1 × 4 = 4 | ✓ Yes |
What it means: Start from Fe3O4, the most complicated formula: 3 Fe on the right means 3 Fe on the left, 4 O means 4 H2O, and 8 H means 4 H2. Every element balances with no fractions.
How to write it: 3 Fe(s) + 4 H2O(g) → Fe3O4(s) + 4 H2(g)
Heating blue copper sulfate
Water of crystallisation counts as atoms too.
Blue hydrated copper(II) sulfate turns white when heated. Balance the dehydration. Skeleton: CuSO4.5H2O(s) -> CuSO4(s) + H2O(g)
| Element | Left | Right | Balanced? |
|---|---|---|---|
| Cu | 1 × 1 = 1 | 1 × 1 = 1 | ✓ Yes |
| S | 1 × 1 = 1 | 1 × 1 = 1 | ✓ Yes |
| H | 1 × 10 = 10 | 5 × 2 = 10 | ✓ Yes |
| O | 1 × 9 = 9 | 1 × 4 + 5 × 1 = 9 | ✓ Yes |
What it means: The dot means five water molecules are part of each formula unit, so the hydrate holds 9 O and 10 H. Five H2O come off. The reverse reaction (adding water to the white powder) is the classic test for water.
How to write it: CuSO4·5H2O(s) → CuSO4(s) + 5 H2O(g)
Copper wire in silver nitrate solution
Atoms and charge must both balance.
A copper wire grows silver crystals in silver nitrate solution. Balance the net ionic equation. Skeleton: Ag^+(aq) + Cu(s) -> Ag(s) + Cu^2+(aq)
| Element | Left | Right | Balanced? |
|---|---|---|---|
| Ag | 2 × 1 = 2 | 2 × 1 = 2 | ✓ Yes |
| Cu | 1 × 1 = 1 | 1 × 1 = 1 | ✓ Yes |
| Charge | 2 × (+1) = 2 | 1 × (+2) = 2 | ✓ Yes |
What it means: One Ag+ + Cu → Ag + Cu2+ balances the atoms but not the charge (+1 vs +2). Two silver ions fix it: +2 on each side. Each copper atom gives two electrons, one to each silver ion.
How to write it: 2 Ag+(aq) + Cu(s) → 2 Ag(s) + Cu2+(aq)
Photosynthesis in a leaf
The balanced chemical equation for photosynthesis.
Green plants make glucose from carbon dioxide and water using light. Balance the overall equation. Skeleton: CO2(g) + H2O(l) -> C6H12O6(aq) + O2(g)
| Element | Left | Right | Balanced? |
|---|---|---|---|
| C | 6 × 1 = 6 | 1 × 6 = 6 | ✓ Yes |
| H | 6 × 2 = 12 | 1 × 12 = 12 | ✓ Yes |
| O | 6 × 2 + 6 × 1 = 18 | 1 × 6 + 6 × 2 = 18 | ✓ Yes |
What it means: Starting from glucose: 6 C needs 6 CO2, 12 H needs 6 H2O, and the 18 O on the left leave 12 for six O2 molecules after the 6 in glucose. Respiration is the same equation reversed.
How to write it: 6 CO2(g) + 6 H2O(l) → C6H12O6(aq) + 6 O2(g)
Two reactions written as one
When more than one answer balances.
A student writes hydrogen and oxygen making both water and hydrogen peroxide in one equation. Skeleton: H2 + O2 -> H2O + H2O2
| Element | Left | Right | Balanced? |
|---|---|---|---|
| H | 1 × 2 = 2 | 1 × 2 + 1 × 2 = 4 | No |
| O | 1 × 2 = 2 | 1 × 1 + 1 × 2 = 3 | No |
What it means: 2 H2 + O2 → 2 H2O and H2 + O2 → H2O2 both fit, and so does any mix of them, so there is no single answer. The balancer refuses to guess. Write two equations; the conditions decide how much of each forms.
How to write it: 2 H2 + O2 → 2 H2O and H2 + O2 → H2O2 (two separate equations)
Photosynthesis without oxygen
A missing product makes balancing impossible.
The oxygen product has been left out of the photosynthesis equation. Skeleton: CO2 + H2O -> C6H12O6
| Element | Left | Right | Balanced? |
|---|---|---|---|
| C | 1 × 1 = 1 | 1 × 6 = 6 | No |
| H | 1 × 2 = 2 | 1 × 12 = 12 | No |
| O | 1 × 2 + 1 × 1 = 3 | 1 × 6 = 6 | No |
What it means: Carbon forces 6 CO2 and hydrogen forces 6 H2O, which carry 18 O atoms, but glucose holds only 6. No coefficients can fix that, so the formula list is wrong, not the arithmetic. Adding O2 to the products solves it.
How to write it: Cannot be balanced as written; add O2 as a product.
Co is cobalt, CO is carbon monoxide
One capital letter changes the substance.
A question about cobalt oxide typed as "CO + O2 -> Co3O4" would mix carbon monoxide with cobalt. Skeleton: Co(s) + O2(g) -> Co3O4(s)
| Element | Left | Right | Balanced? |
|---|---|---|---|
| Co | 3 × 1 = 3 | 1 × 3 = 3 | ✓ Yes |
| O | 2 × 2 = 4 | 1 × 4 = 4 | ✓ Yes |
What it means: With Co (cobalt) the answer is 3 Co + 2 O2 → Co3O4. With CO (carbon monoxide) the left side has carbon and no cobalt, so it cannot be balanced. Always type element symbols with a capital first letter and a small second letter.
How to write it: 3 Co(s) + 2 O2(g) → Co3O4(s)
✏️ 14. How to Balance a Chemical Equation by Hand, Step by Step
This is the written method examiners expect, on the same example as Sections 7, 9, 10 and 11: balance C3H8 + O2 → CO2 + H2O.
14.1 The written method
- Write the skeleton equation with correct formulas. C3H8 + O2 → CO2 + H2O. Oxygen gas is O2.
- Draw an atom-count table. Left: C 3, H 8, O 2. Right: C 1, H 2, O 3.
- Start with the most complicated formula (C3H8) and keep its coefficient at 1.
- Balance carbon. 3 C on the left, so write 3 CO2. Carbon: 3 = 3.
- Balance hydrogen. 8 H on the left, and each H2O holds 2, so write 4 H2O. Hydrogen: 8 = 8.
- Balance oxygen last. Right side: 3 × 2 + 4 × 1 = 10 O atoms. Each O2 holds 2, so write 10 ÷ 2 = 5 O2.
- Clear any fractions. None here. (Butane gives 13/2 O2: multiply every coefficient by 2.)
- Check. C 3 = 3, H 8 = 8, O 10 = 10. The coefficients 1, 5, 3, 4 share no common factor. Answer: C3H8 + 5 O2 → 3 CO2 + 4 H2O.
For ionic redox equations use the half-reaction method instead: split into two half-equations, balance atoms other than O and H, add H2O for oxygen, H+ for hydrogen and electrons for charge, multiply so the electrons cancel, then add (and in basic solution add OH− to both sides).
14.2 On a scientific calculator
A calculator cannot read formulas, but models with an equation mode solve the element equations. On the Casio fx-991EX ClassWiz: press MENU, choose A Equation/Func, then 1 Simul Equation, then 3 unknowns. Enter one element per row with a = 1 already moved to the right: carbon 0 1 0 3, hydrogen 0 0 2 8, oxygen 2 (−)2 (−)1 0, pressing = after each number. Press = again to read x = 5 (b), y = 3 (c), z = 4 (d).
Menu names differ between models (the fx-991ES uses MODE then EQN). Check your model's manual. Basic calculators such as the fx-82 have no equation mode: use the inspection method.
14.3 Do it in the lab: proving the law of conservation of mass
Copper(II) sulfate with sodium hydroxide in a closed flask
Balanced equation: CuSO4(aq) + 2 NaOH(aq) → Cu(OH)2(s) + Na2SO4(aq). A pale blue precipitate forms, and the total mass does not change.
- Put 25 cm3 of 0.5 mol/dm3 copper(II) sulfate solution in a conical flask. Put 25 cm3 of 0.4 mol/dm3 sodium hydroxide solution in a small test tube and stand it upright inside the flask.
- Close the flask with a stopper and weigh the whole set-up on a balance reading to 0.01 g.
- Tip the flask gently so the two solutions mix. Watch the blue precipitate of copper(II) hydroxide form.
- Weigh the closed flask again. Repeat the experiment twice more.
- Calculate the change in mass for each run.
Hazards: sodium hydroxide solution is an irritant at 0.4 mol/dm3 and can damage eyes; copper(II) sulfate solution is harmful if swallowed, irritates eyes and skin, and is toxic to aquatic life. Wear eye protection and gloves, wipe up spills at once, wash skin splashes with plenty of water, do not pour waste down the sink, and follow your school's risk assessment.
Main errors: liquid left on the outside of the flask, a balance that drifts, and a stopper that is not tight. In an open flask a gas-forming reaction (marble chips in acid) seems to lose mass because the CO2 escapes.
| Run | Mass before mixing (g) | Mass after mixing (g) | Change (g) |
|---|---|---|---|
| 1 | 162.48 | 162.48 | 0.00 |
| 2 | 161.93 | 161.92 | −0.01 |
| 3 | 162.15 | 162.15 | 0.00 |
Example data. Every change is within the 0.01 g resolution of the balance, so mass is conserved, just as the balanced equation says. Moles check: 0.0125 mol CuSO4 and 0.010 mol NaOH; the 1 : 2 ratio means NaOH runs out first (it is the limiting reagent).
14.4 Balancing chemical equations practice problems with answers
Ten practice problems, easy to hard. Open each one to see the answer.
1. Balance H2 + Cl2 → HCl
H2 + Cl2 → 2 HCl
Atoms on each side: Cl 2, H 2.
2. Balance Na + Cl2 → NaCl
2 Na + Cl2 → 2 NaCl
Atoms on each side: Na 2, Cl 2.
3. Balance Mg + O2 → MgO
2 Mg + O2 → 2 MgO
Atoms on each side: Mg 2, O 2.
4. Balance N2 + H2 → NH3
N2 + 3 H2 → 2 NH3
Atoms on each side: N 2, H 6.
5. Balance CH4 + O2 → CO2 + H2O
CH4 + 2 O2 → CO2 + 2 H2O
Atoms on each side: C 1, H 4, O 4.
6. Balance Al + O2 → Al2O3
4 Al + 3 O2 → 2 Al2O3
Atoms on each side: Al 4, O 6.
7. Balance Zn + HCl → ZnCl2 + H2
Zn + 2 HCl → ZnCl2 + H2
Atoms on each side: Zn 1, Cl 2, H 2.
8. Balance NaHCO3 → Na2CO3 + CO2 + H2O
2 NaHCO3 → Na2CO3 + CO2 + H2O
Atoms on each side: Na 2, C 2, H 2, O 6.
9. Balance C2H6 + O2 → CO2 + H2O
2 C2H6 + 7 O2 → 4 CO2 + 6 H2O
Atoms on each side: C 4, H 12, O 14.
10. Balance Cu + HNO3 → Cu(NO3)2 + NO + H2O
3 Cu + 8 HNO3 → 3 Cu(NO3)2 + 2 NO + 4 H2O
Atoms on each side: Cu 3, N 8, H 8, O 24.
Want more practice on paper? Print the worksheet and check your answers.
14.5 Mistakes that lose marks
Research on how students balance equations finds the same errors again and again: changing subscripts, and treating a coefficient as if it only applied to the first atom of a formula (Yarroch, 1985; Nakhleh, 1992). Check your own answer against this list, or paste it into the chemical equation balancer to see the atom count.
- Changing a subscript (writing H2O2 instead of 2 H2O). That makes a different substance.
- Writing oxygen, hydrogen or chlorine gas as single atoms (O, H, Cl) instead of O2, H2, Cl2.
- Putting a coefficient in the middle of a formula (Ca2(OH)2).
- Forgetting the atoms inside brackets: Ca3(PO4)2 has 2 P and 8 O.
- Leaving a fraction or a common factor in the final answer (4 H2 + 2 O2 → 4 H2O should be 2, 1, 2).
- Balancing atoms but not charge in an ionic equation.
- Not rechecking every element after the last change.
✅ 15. When to Use a Chemical Equation Balancer and Each Balancing Method
- There are 4 or 5 species and simple formulas.
- The question says "balance the equation" in Class 9 or 10, GCSE or IGCSE.
- You can see the element in one compound on each side.
- There are 6 or more species, or coefficients above 10: use the algebraic method.
- Ions change charge in water: use the half-reaction method.
- One element changes oxidation number in a molecular equation: use the oxidation number method.
Four real examples
| Equation | Best method | Why |
|---|---|---|
| Mg + O2 → MgO | Inspection | Three species; 2 Mg + O2 → 2 MgO in two moves |
| Ca(OH)2 + H3PO4 → Ca3(PO4)2 + H2O | Inspection, treating PO4 as a unit | The phosphate ion is unchanged on both sides |
| KMnO4 + HCl → KCl + MnCl2 + H2O + Cl2 | Oxidation number or algebraic method | Six species and large coefficients (2, 16, 2, 2, 8, 5) |
| MnO4− + Fe2+ → Mn2+ + Fe3+ (acid) | Half-reaction method | H+ and H2O must be added; 5 electrons move |
Decision tree
- Are there charges, and does the reaction happen in water? Yes: is it redox? Use the half-reaction method (choose Acidic or Basic here). No: go on.
- Six or more species? Yes: algebraic method. No: go on.
- Does a polyatomic ion appear unchanged on both sides? Yes: balance it as one unit by inspection.
- Otherwise: inspection, O and H last.
🔧 16. Chemical Equation Balancer Troubleshooting and Common Mistakes
The tool says my equation cannot be balanced
Cause: a formula is wrong, a product is missing, or an element appears on one side only. Fix: read the "as typed" atom table. A row with atoms on only one side points at the missing species (photosynthesis without O2 is the classic).
It says "two independent reactions"
Cause: the products could be made in more than one ratio, as in H2 + O2 → H2O + H2O2. Fix: write each reaction as its own equation. Real chemistry, not arithmetic, decides the ratio.
"Element symbols start with a capital letter"
Cause: a lowercase symbol such as "co" or "nacl". Fix: CO is carbon monoxide, Co is cobalt, NaCl is sodium chloride. Phones often capitalise the first letter of a word; the box switches that off, but check pasted text.
My ionic redox equation will not balance
Cause: the H+, OH− or H2O is not written. Fix: set the medium to Acidic or Basic solution; the balancer adds them.
My answer has the same ratio but bigger numbers
Cause: a common factor was left in (4, 2, 4 instead of 2, 1, 2). Fix: divide every coefficient by their greatest common factor.
The book shows different numbers
Cause: a different formula (Fe3O4 vs Fe2O3, or H2SO4 vs HSO4−) or a different but equally valid way to write the reaction. Fix: type exactly the formulas in the book.
The mass total is slightly different from my textbook
Cause: a different atomic-weight set. Fix: switch to rounded exam values; the coefficients stay the same.
"Unexpected character" or "brackets do not match"
Cause: a stray symbol or an unclosed bracket. Fix: use only letters, digits, ( ) [ ], a dot for hydrates, and ^ for charges. Write Ca(OH)2, not Ca(OH2.
"Write exactly one arrow"
Cause: no arrow, or two arrows. Fix: use one of ->, =, → or <=> between reactants and products.
"A species gets a coefficient of zero"
Cause: a substance that does not take part, such as a catalyst or a spectator written on one side only. Fix: remove it, or write it on both sides and then cancel it.
⚖️ 17. Assumptions and Limitations of the Chemical Equation Balancer
| Assumption | What it requires | How to check | If it fails |
|---|---|---|---|
| The formulas are correct | Every reactant and product is the real substance | Compare with your textbook or a data book | The tool balances the wrong reaction perfectly: the answer looks verified but describes something that does not happen |
| All species are listed | No missing product such as O2 or H2O | Look for an element on one side only | Cannot be balanced, or a coefficient of zero |
| One reaction is written | A single overall reaction | The tool reports two independent reactions | No unique answer; any mix balances |
| Medium chosen correctly | Acidic or basic set for ionic redox in water | Does the reaction happen in acid or alkali? | The wrong medium gives H+ where OH− belongs, so the equation is balanced but chemically wrong for that solution |
| Atomic weights | CIAAW 2024 or rounded values | Pick the set your course uses | Mass totals shift in the second or third decimal place; coefficients never change |
Limitations. A chemical equation balancer checks atoms and charge, not chemistry. A balanced equation says nothing about whether the reaction actually happens, how fast it goes, or how far it goes before equilibrium; for that you need thermodynamics, kinetics and equilibrium constants. The reaction-type label is rule based and can be wrong for unusual reactions; use an oxidation number calculation to confirm redox. Formulas for organic structures are read as molecular formulas only (C2H5OH is counted as C2H6O). The particle diagram is drawn only for small reactions.
🎯 18. Conclusion
What the answer is
A chemical equation balancer turns a skeleton equation into a balanced chemical equation with the smallest whole-number coefficients. For the headline example, C3H8 + 5 O2 → 3 CO2 + 4 H2O, every element balances (C 3, H 8, O 10) and 204.087 g of reactants become 204.087 g of products.
What it means chemically
A balanced equation is the law of conservation of mass written in symbols. The coefficients are the mole ratio of the reaction, which is why chemical equations must be balanced before any stoichiometry: an unbalanced equation gives wrong reacting masses, wrong gas volumes and wrong yields.
Watch out for
Never change a subscript. Write diatomic gases as O2, H2, N2 and Cl2. Balance charge as well as atoms in ionic equations. If an equation will not balance, check the formulas before you check the arithmetic.
Next steps
Use the mole ratio to find the limiting reagent and the theoretical yield, or practise with the thirty worked equations in Section 12 and the ten problems in Section 14. Whatever the question, start every quantitative problem the same way: with the chemical equation balancer.
❓ 19. Frequently Asked Questions
What is a chemical equation balancer?
A chemical equation balancer is a tool that finds the smallest whole-number coefficients that give the same number of atoms of each element on both sides of a chemical equation. This one also shows the steps, the atom count, the matrix method and a mass check.
How do you balance a chemical equation step by step?
Write the correct formulas, count the atoms on each side, then add coefficients one element at a time: the element found in one compound on each side first, hydrogen next, oxygen last. Clear any fractions and recount every element. For propane this gives C3H8 + 5 O2 → 3 CO2 + 4 H2O.
What are the 4 steps for balancing chemical equations?
The 4 steps for balancing chemical equations are: 1) write the skeleton equation with correct formulas, 2) count the atoms of each element on both sides, 3) add coefficients one element at a time, hydrogen and oxygen last, and 4) check every element and the charge, using the smallest whole numbers. Only coefficients change, never subscripts.
Why must chemical equations be balanced?
Chemical equations must be balanced because atoms are not created or destroyed in a chemical reaction, so the law of conservation of mass requires the same atoms on both sides. A balanced equation also gives the mole ratio needed for every reacting-mass calculation.
What is a balanced chemical equation?
A balanced chemical equation is a chemical equation in which each element has the same number of atoms on both sides of the arrow and, for ions, the total charge is the same on both sides. Example: 2 H2 + O2 → 2 H2O.
What is the balanced chemical equation for photosynthesis?
The balanced chemical equation for photosynthesis is 6 CO2 + 6 H2O → C6H12O6 + 6 O2, using light energy and chlorophyll. Six carbon, twelve hydrogen and eighteen oxygen atoms appear on each side.
A chemical equation is balanced when what is true?
A chemical equation is balanced when the number of atoms of every element is equal on the reactant and product sides and the total charge is equal on both sides. The number of molecules does not have to be equal.
Can you change subscripts when balancing a chemical equation?
No, you can never change subscripts when balancing a chemical equation, because a subscript defines the substance: H2O is water, H2O2 is hydrogen peroxide. Only the coefficients in front of the formulas may change.
What do the coefficients in a balanced chemical equation mean?
The coefficients give the ratio of particles, or of moles, that react and form. In C3H8 + 5 O2 → 3 CO2 + 4 H2O, 1 mol of propane reacts with 5 mol of oxygen to give 3 mol of carbon dioxide and 4 mol of water. They are not mass ratios.
How do you balance chemical equations with polyatomic ions?
If a polyatomic ion such as SO4 or PO4 appears unchanged on both sides, balance it as one unit. For example 2 Al + 3 CuSO4 → Al2(SO4)3 + 3 Cu has 3 sulfate groups on each side. Counting the atoms one by one gives the same answer.
How do you balance a redox equation in acidic or basic solution?
Use the half-reaction method: balance atoms other than O and H, add H2O for oxygen, H+ for hydrogen and electrons for charge, make the electrons equal, then add the half-equations. In basic solution add OH- to both sides to cancel H+. In this tool, choose Acidic or Basic solution.
What is the significance of balancing chemical equations in stoichiometry?
Balancing gives the mole ratios that link every reactant and product, so it is the first step of every stoichiometry problem. Without it, limiting reagent, theoretical yield and gas volume answers are wrong by a whole-number factor.
What is the easiest way to balance a chemical equation?
The easiest way is to start with the most complicated formula, keep it at 1, and balance the other elements one at a time, leaving hydrogen and oxygen until last. If a fraction appears, multiply everything by its denominator. For long or ionic equations, a chemical equation balancer that shows the steps is fastest. If no answer exists, a formula is wrong or a species is missing.
How do you balance a combustion reaction?
Balance carbon with CO2, then hydrogen with H2O, then oxygen last with O2, and double everything if O2 ends up as a fraction. Butane: C4H10 + 13/2 O2 becomes 2 C4H10 + 13 O2 → 8 CO2 + 10 H2O.
How do I balance chemical equations in Excel?
Type the atom counts as a matrix with one coefficient fixed at 1, then solve with =MMULT(MINVERSE(B2:D4),E2:E4). Check each element with SUMPRODUCT. Section 9 shows the sheet step by step for propane.
How do you balance chemical equations in Python?
Build the element matrix and take its exact null space with SymPy, Matrix(A).nullspace(), then multiply by the least common denominator. ChemPy's balance_stoichiometry does it from formulas in one line. Section 11 has a complete script.
How do you balance chemical equations in R?
Build the element matrix A and use MASS::Null(t(A)) to get the null space, then scale it to the smallest whole numbers and verify with A %*% coef. Section 10 has a complete script that also saves a figure.
Can a scientific calculator balance chemical equations?
Not from formulas, but a calculator with an equation mode, such as the Casio fx-991EX, can solve the element equations once one coefficient is fixed at 1. Section 14.2 lists the keys for propane.
Do state symbols, temperature or atomic weights change the balanced equation?
No, state symbols, temperature and the atomic-weight set never change the coefficients, because they do not change the number of atoms. They affect only physical data such as masses and enthalpy changes, which is why this tool lets you pick CIAAW 2024 or rounded exam weights.
How is this different from the PhET balancing chemical equations simulation?
The PhET Balancing Chemical Equations simulation from the University of Colorado Boulder lets you change coefficients for a set of built-in reactions and watch the molecules. This balancer solves any equation you type, including ions and redox, and shows the written steps, the matrix method and a mass check.
📑 20. Cite This Tool
StatsUnlock Team. (2026). Chemical equation balancer [Interactive chemistry tool]. StatsUnlock. https://statsunlock.com/chemical-equation-balancer/@misc{statsunlock_balancer_2026, title={Chemical Equation Balancer}, author={{StatsUnlock Team}}, year={2026}, note={Interactive chemistry tool}, url={https://statsunlock.com/chemical-equation-balancer/}}Chemical equations were balanced with the StatsUnlock Chemical Equation Balancer (2026), which solves the element and charge conservation matrix exactly and reports the smallest whole-number coefficients. Molar masses used CIAAW 2024 standard atomic weights.🔗 21. Related Tools
Test whether two sets of lab results, such as yields from two methods, really differ.
Open tool →Work out how many repeat runs or titrations an experiment needs before you start.
Open tool →See the chance of a false positive or a missed real effect in your experiment.
Open tool →Measure how big a difference is, not just whether it is significant.
Open tool →Check whether your experiment is large enough to detect the change you expect.
Open tool →Plan a two-condition comparison, such as two catalysts or two reaction temperatures.
Open tool →Compare how often an outcome happens in two groups, from a simple 2 by 2 table.
Open tool →Find how much of the variation in an ANOVA is explained by your treatment.
Open tool →Balanced equations tell you what should happen; these tools help you design experiments and judge whether your lab results show a real difference.
📖 22. Glossary of Terms
| Term | Plain-English meaning |
|---|---|
| Algebraic method | Balancing by writing one equation per element and solving for the coefficients. |
| Atomic weight | The average mass of an element's atoms relative to 1/12 of a carbon-12 atom (no unit; in g/mol it gives the molar mass). |
| Balanced chemical equation | An equation with equal numbers of each kind of atom, and equal total charge, on both sides. |
| Chemical equation | A reaction written with formulas: reactants, an arrow, products. |
| Coefficient | The number in front of a formula; the number of particles or moles taking part. |
| Combustion | A fast reaction with oxygen that releases heat; a hydrocarbon gives CO2 and H2O. |
| Conservation of mass | The total mass of reactants equals the total mass of products in a closed system. |
| Diatomic element | An element that exists as two-atom molecules: H2, N2, O2, F2, Cl2, Br2, I2. |
| Half-equation | One half of a redox reaction, showing either electrons lost (oxidation) or gained (reduction). |
| Hydrate | A salt with water built into its crystals, written with a dot: CuSO4·5H2O. |
| Inspection method | Balancing by trial and error, one element at a time. |
| Ionic equation | An equation written with the ions that react; charge must balance too. |
| Mole | The amount of substance containing 6.022 140 76 × 1023 particles (unit mol). |
| Mole ratio | The ratio of the coefficients, used to convert moles of one species to moles of another. |
| Null space | All the coefficient sets that make every element row add to zero; the balanced equation is its smallest whole-number member. |
| Polyatomic ion | A charged group of atoms that acts as one unit, such as SO42−. |
| Product | A substance formed in the reaction, written right of the arrow. |
| Reactant | A substance used up in the reaction, written left of the arrow. |
| Redox reaction | A reaction in which electrons are transferred: one species is oxidised, another reduced. |
| Skeleton equation | An equation with correct formulas but no coefficients yet. |
| State symbol | (s), (l), (g) or (aq): solid, liquid, gas or dissolved in water. |
| Stoichiometry | Calculating amounts of reactants and products from a balanced equation. |
| Subscript | The small number in a formula giving how many atoms of an element are in one unit; never changed when balancing. |
📚 23. References
Peer-reviewed sources for the methods used in this chemical equation balancer: the algebraic and matrix methods, inspection methods, how students learn balancing, and the atomic-weight and constant data.
- Alberty, R. A. (1991). Chemical equations are actually matrix equations. Journal of Chemical Education, 68(12), 984. https://doi.org/10.1021/ed068p984
- Blakley, G. R. (1982). Chemical equation balancing: A general method which is quick, simple, and has unexpected applications. Journal of Chemical Education, 59(9), 728–734. https://doi.org/10.1021/ed059p728
- Guo, C. (1997). A new and general method for balancing chemical equations by inspections. Journal of Chemical Education, 74(11), 1365–1366. https://doi.org/10.1021/ed074p1365
- Haidar, A. H. (1997). Prospective chemistry teachers’ conceptions of the conservation of matter and related concepts. Journal of Research in Science Teaching, 34(2), 181–197. https://doi.org/10.1002/(SICI)1098-2736(199702)34:2<181::AID-TEA5>3.0.CO;2-P
- Hamerská, L., Matěcha, T., Tóthová, M., & Rusek, M. (2024). Between symbols and particles: Investigating the complexity of learning chemical equations. Education Sciences, 14(6), 570. https://doi.org/10.3390/educsci14060570
- Herndon, W. C. (1997). On balancing chemical equations: Past and present. Journal of Chemical Education, 74(11), 1359–1362. https://doi.org/10.1021/ed074p1359
- Johnstone, A. H. (1991). Why is science difficult to learn? Things are seldom what they seem. Journal of Computer Assisted Learning, 7(2), 75–83. https://doi.org/10.1111/j.1365-2729.1991.tb00230.x
- Kolb, D. (1978). The chemical equation. Part I: Simple reactions. Journal of Chemical Education, 55(3), 184–189. https://doi.org/10.1021/ed055p184
- Lewis, G. N. (1916). The atom and the molecule. Journal of the American Chemical Society, 38(4), 762–785. https://doi.org/10.1021/ja02261a002
- Nakhleh, M. B. (1992). Why some students don’t learn chemistry: Chemical misconceptions. Journal of Chemical Education, 69(3), 191–196. https://doi.org/10.1021/ed069p191
- Nurrenbern, S. C., & Pickering, M. (1987). Concept learning versus problem solving: Is there a difference? Journal of Chemical Education, 64(6), 508–510. https://doi.org/10.1021/ed064p508
- Olson, J. A. (1997). An analysis of the algebraic method for balancing chemical reactions. Journal of Chemical Education, 74(5), 538–542. https://doi.org/10.1021/ed074p538
- Porter, S. K. (1985). How should equation balancing be taught? Journal of Chemical Education, 62(6), 507–508. https://doi.org/10.1021/ed062p507
- Prohaska, T., Irrgeher, J., Benefield, J., Böhlke, J. K., Chesson, L. A., Coplen, T. B., ... Zhu, X. (2022). Standard atomic weights of the elements 2021 (IUPAC Technical Report). Pure and Applied Chemistry, 94(5), 573–600. https://doi.org/10.1515/pac-2019-0603
- Sanger, M. J. (2005). Evaluating students’ conceptual understanding of balanced equations and stoichiometric ratios using a particulate drawing. Journal of Chemical Education, 82(1), 131–134. https://doi.org/10.1021/ed082p131
- Sen, S. K., Agarwal, H., & Sen, S. (2006). Chemical equation balancing: An integer programming approach. Mathematical and Computer Modelling, 44(7–8), 678–691. https://doi.org/10.1016/j.mcm.2006.02.004
- Smith, W. R., & Missen, R. W. (1997). Using Mathematica and Maple to obtain chemical equations. Journal of Chemical Education, 74(11), 1369–1371. https://doi.org/10.1021/ed074p1369
- Tiesinga, E., Mohr, P. J., Newell, D. B., & Taylor, B. N. (2021). CODATA recommended values of the fundamental physical constants: 2018. Reviews of Modern Physics, 93(2), 025010. https://doi.org/10.1103/RevModPhys.93.025010
- Tóth, Z. (1997). Balancing chemical equations by inspection. Journal of Chemical Education, 74(11), 1363–1364. https://doi.org/10.1021/ed074p1363
- Yarroch, W. L. (1985). Student understanding of chemical equation balancing. Journal of Research in Science Teaching, 22(5), 449–459. https://doi.org/10.1002/tea.3660220507
