Balancing Chemical Equations

Tap + and − to stack real atoms on a seesaw until every element matches, let the solver balance any equation with exact whole numbers, and weigh both sides to see that mass is conserved.

Start here: tap + and − to change how many of each molecule there are. When every row of the atom counter turns green, the seesaw levels out and the equation is balanced.

0 of 9 solved

Hold a button to count faster. On a keyboard, ↑ and ↓ also work.

Atom counter
ElementLeftRightMatches?

Why must they match? In a chemical reaction, atoms are not created or destroyed. They only swap partners. So every atom on the left has to show up on the right, and the total mass stays the same.

How to balance a chemical equation

A chemical equation is balanced when each element has the same number of atoms on both sides of the arrow. You balance it by changing only the coefficients, the big numbers in front of each formula, and never the small subscripts. Changing a subscript would turn the substance into a different one, and chemists use the smallest whole-number coefficients that work. [1]

Take methane burning in oxygen: CH₄ + O₂ → CO₂ + H₂O. Count first. Carbon is 1 and 1, which already matches. Hydrogen is 4 on the left but only 2 on the right, so put a 2 in front of H₂O. Now the right side has 2 + 2 = 4 oxygen atoms, and the left has 2, so put a 2 in front of O₂. The result is CH₄ + 2O₂ → CO₂ + 2H₂O, with 1 carbon, 4 hydrogen and 4 oxygen atoms on each side. [1] A good habit is to leave elements that stand alone, like O₂ or Fe, until last, because changing them does not disturb anything else.

Why atoms must balance: conservation of mass

Atoms are neither created nor destroyed during a chemical change. They are only rearranged into new substances, so the total mass stays the same. John Dalton put this idea into his atomic theory, first published in 1807, and it explains the law of conservation of matter. [3] A balanced equation is simply that rule written down: the seesaw in the game levels out only when every atom on the left has a partner on the right.

Antoine Lavoisier (1743–1794) popularized the principle of conservation of mass. His method was to weigh everything in a reaction carefully, including the gases, which is why burning and rusting stopped looking like matter disappearing or appearing out of nowhere. [8]

How the solver balances any equation

The solver turns the equation into one rule per element and solves those rules exactly, using whole numbers and fractions, so it never rounds. For methane it writes a CH₄ + b O₂ → c CO₂ + d H₂O and three rules: carbon gives a = c, hydrogen gives 4a = 2d, and oxygen gives 2b = 2c + d. Setting d = 1 gives a = 1/2, b = 1 and c = 1/2. Multiplying everything by 2 clears the fractions and gives 1, 2, 1, 2. This is our arithmetic, and it matches the textbook answer. [1]

Sometimes there is no answer. If an element shows up on only one side, its atoms would have to vanish or appear, so the equation can never balance. Even when every element appears on both sides, the rules can clash: CO → CO₂ needs as many carbon atoms on each side, but twice as many oxygen atoms on the right, and only zero of everything satisfies both. A third case is an equation with more than one independent answer, such as H₂ + O₂ → H₂O + H₂O₂, which is really two reactions written as one. The solver says which case it found instead of guessing.

Checking the mass with atomic masses

To weigh a formula, add up the average atomic masses of all its atoms. One mole of the substance has that many grams. [4] With PubChem's values for hydrogen (1.008), carbon (12.011) and oxygen (15.999), the same numbers the Interactive Periodic Table shows, [7] methane is 12.011 + 4 × 1.008 = 16.043 g/mol, O₂ is 31.998 g/mol, CO₂ is 44.009 g/mol and H₂O is 18.015 g/mol. On the left, 1 × 16.043 + 2 × 31.998 = 80.039 g. On the right, 1 × 44.009 + 2 × 18.015 = 80.039 g. The two sides match, as they must, because they hold exactly the same atoms. This is our arithmetic from the published values.

In an open container, a reaction can seem to lose or gain mass when a gas escapes or joins in from the air. Rust, for example, forms when iron reacts with oxygen and water from humid air, [5] so a rusting nail gains the mass of what it takes in. Weigh everything, gases included, as Lavoisier did, and the totals agree. [8]

What this tool simplifies

For teachers

The tool supports the Next Generation Science Standards performance expectations below. The wording is our paraphrase, so please check the official pages linked from each code. [9] A simulation supports these expectations, but it does not replace hands-on modeling.

CodePerformance expectation (paraphrased)How the tool helps
MS-PS1-5
Middle school
Develop and use a model to describe how the total number of atoms stays the same in a chemical reaction, so mass is conserved.Practice: the atom balls are a digital model of the atoms, and the counters show that nothing appears or vanishes. Note that the NGSS assessment for this code leaves out atomic masses and balancing symbolic equations, so at this level the balls, not the symbols, are the point.
HS-PS1-7
High school
Use mathematical representations to support the claim that atoms, and therefore mass, are conserved in a chemical reaction.Mass check: students add up atomic masses on each side and use the mole to move from single molecules to grams. Balance any: the atom-count rules are a system of equations solved exactly.

Grades: 6–8 for the Practice game as an atom model, 9–12 for the solver and the Mass check. Time: about one 45-minute class period for the lesson below, or 15 minutes as a warm-up with levels 1 to 4. These are our suggestions, not NGSS requirements.

Deep links: add #practice, #balance-any or #mass-check to the end of this page's address to open a mode, or #practice-5 to open a single level (1 to 9). Projector tip: the Large text button makes the controls and the canvas labels bigger. Print worksheet prints the nine practice equations with blanks and an answer key on a separate page.

Lesson plan

  1. Engage (5 minutes). Hold up a shiny nail and a rusty one and ask: "When iron rusts, does it get lighter, heavier, or stay the same?" Collect answers without correcting them.
  2. Explore (20 minutes). Pairs play Practice levels 1 to 5, then try 6 to 9. One partner taps, the other reads the atom counter aloud. Ask pairs to write down the order they changed the coefficients in.
  3. Explain (15 minutes). Open Mass check, have the class vote in the Predict box, then weigh. Turn on "Compare with the unbalanced equation" to show that an unbalanced equation would break conservation of mass. High school classes can test their own equations in Balance any and read the solver's steps.
  4. Wrap up (5 minutes). Return to the rusty nail: if atoms are never created, where did the rust's extra atoms come from?

Discussion questions

Common misconceptions

Quick formative check

Ask students to balance Na + H₂O → NaOH + H₂ without the tool, then explain in one sentence why the masses on both sides are equal. Answer: 2Na + 2H₂O → 2NaOH + H₂. [1] A strong answer mentions that the same atoms are on both sides, just rearranged.

Offline extension

Cut paper circles in three colors for hydrogen, carbon and oxygen. Students build one methane and two oxygen molecules on the left half of a desk, then take them apart and rebuild them into carbon dioxide and water on the right half, without adding or removing a single circle. Have them write the balanced equation from what they built.

Frequently Asked Questions

What does it mean to balance a chemical equation?

It means choosing the numbers in front of each formula so that every element has the same number of atoms on the left and on the right. The equation then obeys the rule that atoms are not created or destroyed in a reaction.

Why can't I change the subscripts?

Subscripts are part of what a substance is. H₂O is water, while H₂O₂ is hydrogen peroxide, a different chemical. Coefficients only change how many molecules you have, so they are the only numbers you are allowed to adjust.

Why use the smallest whole numbers?

Doubling every coefficient still balances the equation, but it describes the same reaction. Chemists agree to write the smallest whole numbers so everyone gets the same answer. Fractions can help partway through, and then you multiply them away.

Can every equation be balanced?

No. If an element appears on only one side, or the atom ratios clash, as in CO → CO₂, no positive whole numbers work. Usually a formula is wrong or a substance is missing. Some equations have more than one independent answer because two reactions are mixed together.

Is mass really the same before and after a reaction?

Yes, when you count every substance, including gases that escape or join in. The Mass check adds up the published atomic masses on each side, and a balanced equation always gives the same total on both sides because it holds the same atoms.

Which grades is this tool for?

The Practice game works as an atom model for middle school. The solver and the Mass check add the algebra and the mole for high school. See the For teachers section for the matching NGSS codes.

Dr. Pippa is a cartoon host, and her speech bubbles are jokes. The atom counter and the results panel hold the actual numbers. You can find more tools in the Science Lab.

References

  1. 4.1 Writing and Balancing Chemical Equations, Chemistry 2e. OpenStax, Rice University.Supports: A balanced equation has equal numbers of atoms of each element on both sides; the smallest whole-number coefficients are used; subscripts cannot be changed. Source of the water, ammonia, methane, ethane, N₂O₅, NH₄NO₃, CaCl₂ + AgNO₃ and salt-water reactions.
  2. 4.2 Classifying Chemical Reactions, Chemistry 2e. OpenStax, Rice University.Supports: Source of the H₂ + Cl₂, Na + Cl₂, Mg(OH)₂ + HCl, Ba(OH)₂ + HNO₃, Cu + AgNO₃, C₂H₄ combustion and aluminum rocket-propellant reactions.
  3. 2.1 Early Ideas in Atomic Theory, Chemistry 2e. OpenStax, Rice University.Supports: The law of conservation of matter: total mass stays constant when matter changes form. Dalton (first published 1807): atoms are neither created nor destroyed in a chemical change, only rearranged.
  4. 3.1 Formula Mass and the Mole Concept, Chemistry 2e. OpenStax, Rice University.Supports: Formula mass is the sum of the average atomic masses of the atoms in a formula; molar mass in g/mol equals the formula mass in amu; a mole is 6.02214076 × 10²³ entities.
  5. 17.6 Corrosion, Chemistry 2e. OpenStax, Rice University.Supports: Rust is an iron(III) oxide hydrate, Fe₂O₃·xH₂O, formed from iron in humid air.
  6. 8.1 Overview of Photosynthesis, Biology 2e. OpenStax, Rice University.Supports: Figure 8.5: six carbon dioxide and six water molecules make one sugar molecule and six oxygen molecules, with sunlight as the energy source.
  7. Periodic Table of Elements (data file, retrieved November 1, 2026). PubChem, National Library of Medicine.Supports: The average atomic masses used in the Mass check, as published by PubChem (for example H 1.008, C 12.011, O 15.999).
  8. Antoine-Laurent Lavoisier. Science History Institute.Supports: Lavoisier (1743–1794) popularized the principle of conservation of mass, carefully weighing all components of a reaction, gases included.
  9. Next Generation Science Standards: performance expectations MS-PS1-5 and HS-PS1-7. NGSS Lead States, nextgenscience.org (accessed November 7, 2026).Supports: The wording paraphrased in the For teachers section, including the MS-PS1-5 assessment boundary.