Chemical Equation Balancer

Enter the reactants and products of an unbalanced chemical equation and get the smallest whole-number coefficients, with an atom-by-atom check.

⚖️ Chemical Equation Balancer

Balanced Equation
—
Coefficients
—

⚖️ What is a Chemical Equation Balancer?

A chemical equation balancer is a tool that finds the whole-number coefficients needed so a chemical equation obeys the law of conservation of mass, meaning the same number of atoms of each element appears on the reactant side and the product side. An unbalanced equation like CH4 + O2 → CO2 + H2O only shows which substances react and form, not the correct proportions; balancing it to CH4 + 2O2 → CO2 + 2H2O reveals that one molecule of methane needs exactly two molecules of oxygen.

Balancing equations by hand usually means trial and error: pick an element, adjust a coefficient, check if it broke another element's balance, and repeat. This becomes tedious fast for equations with several elements and species, especially redox reactions with four or more products. This calculator instead treats balancing as a system of linear equations, one equation per element, and solves it exactly using fraction arithmetic, then scales the answer to the smallest possible whole numbers.

A common misconception is that balancing changes the subscripts inside a formula, for example turning H2O into H2O2. That would describe a completely different substance (hydrogen peroxide instead of water). Balancing only changes the coefficient placed in front of a formula, never the formula itself, because subscripts are fixed by the compound's actual chemical identity.

This tool is useful for chemistry students checking homework, teachers generating verified examples, and anyone who needs a balanced equation as the starting point for a stoichiometry calculation, since every mole ratio used in stoichiometry comes directly from these coefficients.

📐 Formula

Σ ci · Ai (reactants) = Σ cj · Bj (products)
Ai = formula of reactant i
Bj = formula of product j
ci, cj = the whole-number stoichiometric coefficients being solved for
Constraint: for every element, total atoms in reactants = total atoms in products
Example: for N₂ + H₂ → NH₃, nitrogen gives c(N₂) = c(NH₃) and hydrogen gives 2·c(H₂) = 3·c(NH₃), solving to 1, 3, 2.

📖 How to Use This Calculator

Steps

1
Enter the reactants - list every reactant formula, separated by commas, e.g. CH4, O2.
2
Enter the products - list every product formula, separated by commas, e.g. CO2, H2O.
3
Click Calculate to see the balanced equation, the coefficients, and an atom-by-atom check table.

💡 Example Calculations

Example 1 — Methane combustion

CH4 + O2 → CO2 + H2O, the reaction that powers a gas stove burner.

1
Carbon and hydrogen balance from methane alone (1 C, 4 H) once water gets a coefficient of 2.
2
That fixes oxygen demand at 4 atoms (2 from CO2, 2 from 2H2O), so O2 needs a coefficient of 2.
Balanced: CH4 + 2O2 → CO2 + 2H2O (coefficients 1 : 2 : 1 : 2)
Try this example →

Example 2 — Propane combustion

C3H8 + O2 → CO2 + H2O, the reaction used in propane camping stoves.

1
3 carbon atoms require a coefficient of 3 on CO2; 8 hydrogen atoms require a coefficient of 4 on H2O.
2
Total oxygen needed on the right is (3×2) + (4×1) = 10 atoms, so O2 needs a coefficient of 5.
Balanced: C3H8 + 5O2 → 3CO2 + 4H2O (coefficients 1 : 5 : 3 : 4)
Try this example →

Example 3 — Iron(III) oxide reduction

Fe2O3 + CO → Fe + CO2, the core reaction inside a blast furnace.

1
2 iron atoms in Fe2O3 require a coefficient of 2 on the elemental Fe product.
2
3 oxygen atoms from Fe2O3 must end up in CO2, requiring 3CO and 3CO2 to keep carbon and oxygen consistent.
Balanced: Fe2O3 + 3CO → 2Fe + 3CO2 (coefficients 1 : 3 : 2 : 3)
Try this example →

Example 4 — Acid-base neutralization

NaOH + H2SO4 → Na2SO4 + H2O, sodium hydroxide neutralizing sulfuric acid.

1
Na2SO4 needs 2 sodium atoms, so NaOH needs a coefficient of 2.
2
That supplies 2 hydrogen atoms from NaOH plus 2 from H2SO4, giving 4 hydrogen atoms total, so H2O needs a coefficient of 2.
Balanced: 2NaOH + H2SO4 → Na2SO4 + 2H2O (coefficients 2 : 1 : 1 : 2)
Try this example →

❓ Frequently Asked Questions

How do you balance a chemical equation step by step?+
List every element that appears, then adjust whole-number coefficients in front of each formula until the count of each element is identical on both sides. For CH4 + O2 → CO2 + H2O, balancing carbon and hydrogen first (methane already gives 1 C and 4 H, so H2O needs a coefficient of 2) leaves 4 oxygen atoms needed, which requires 2O2. This calculator automates that trial-and-error using linear algebra.
What is the algebraic method for balancing equations?+
The algebraic method assigns a variable coefficient to every species, writes one linear equation per element (atoms in equal atoms out), and solves the resulting system. Because a correctly balanced equation has one more unknown than independent equations, the system has a one-parameter family of solutions; fixing that parameter and clearing fractions gives the smallest whole-number coefficients. This calculator solves that system exactly using fractions, not decimal approximations.
Why must a chemical equation be balanced?+
A balanced equation obeys the law of conservation of mass: atoms are neither created nor destroyed in a chemical reaction, only rearranged. An unbalanced equation implies atoms appearing from nowhere or vanishing, which is physically impossible. Balanced coefficients also give the correct mole ratios needed for every stoichiometry calculation that follows.
Can this calculator handle equations with parentheses like Ca(OH)2?+
Yes. One level of parentheses is expanded automatically, so Ca(OH)2, Al2(SO4)3, and similar formulas parse correctly. Nested parentheses (a group inside another group) are not supported; rewrite the formula without nesting if needed.
What does it mean if the calculator says the elements do not match?+
It means an element appears in the reactants but never in the products, or vice versa, which usually signals a typo in one of the formulas. Chemically valid equations always have the same set of elements on both sides, since atoms are only rearranged, not created or destroyed.
How many reactants and products can I enter?+
Up to 6 total species combined (reactants plus products). This covers the overwhelming majority of introductory and intermediate chemistry equations, including multi-product redox reactions such as KMnO4 + HCl → KCl + MnCl2 + H2O + Cl2.
Why are the coefficients always whole numbers?+
Coefficients represent counts of molecules or moles, which cannot be fractional in a physically meaningful balanced equation. The calculator solves the underlying system in exact fractions, then scales every coefficient by the least common multiple of the denominators so the final answer is always the smallest possible set of whole numbers.
What is the difference between a coefficient and a subscript in a chemical formula?+
A subscript (the small number inside a formula, like the 4 in CH4) is fixed by the compound's identity and can never be changed when balancing. A coefficient (the number placed in front of a formula, like the 2 in 2H2O) is what balancing adjusts. Changing a subscript would describe a different substance entirely.
Can I balance combustion reactions with this tool?+
Yes. Combustion reactions (a hydrocarbon plus O2 producing CO2 and H2O) are one of the most common uses. Enter the fuel and O2 as reactants, CO2 and H2O as products, for example C3H8, O2 as reactants and CO2, H2O as products for propane combustion.
What if my equation involves an ion or a charge?+
This calculator balances atoms only, not electrical charge, so it works for standard molecular equations but not for balancing half-reactions or net ionic equations that require charge balancing alongside atom balancing. For charge-balanced redox half-reactions, balance atoms first with this tool, then balance charge separately by adding electrons.
Is there a limit to how large the coefficients can be?+
No practical limit within the 6-species scope. Some redox equations naturally require larger coefficients, for example 2KMnO4 + 16HCl → 2KCl + 2MnCl2 + 8H2O + 5Cl2, and the calculator finds these exactly the same way as smaller examples.
Do I need to know the products in advance to use this calculator?+
Yes. This tool balances a given set of reactants and products, it does not predict what products a reaction will form. Predicting products requires knowledge of reaction type (combustion, synthesis, decomposition, single or double displacement) which is a separate chemistry skill from balancing.

How do you balance a chemical equation step by step?

List every element that appears, then adjust whole-number coefficients in front of each formula until the count of each element is identical on both sides. For CH4 + O2 → CO2 + H2O, balancing carbon and hydrogen first (methane already gives 1 C and 4 H, so H2O needs a coefficient of 2) leaves 4 oxygen atoms needed, which requires 2O2. This calculator automates that trial-and-error using linear algebra.

What is the algebraic method for balancing equations?

The algebraic method assigns a variable coefficient to every species, writes one linear equation per element (atoms in equal atoms out), and solves the resulting system. Because a correctly balanced equation has one more unknown than independent equations, the system has a one-parameter family of solutions; fixing that parameter and clearing fractions gives the smallest whole-number coefficients. This calculator solves that system exactly using fractions, not decimal approximations.

Why must a chemical equation be balanced?

A balanced equation obeys the law of conservation of mass: atoms are neither created nor destroyed in a chemical reaction, only rearranged. An unbalanced equation implies atoms appearing from nowhere or vanishing, which is physically impossible. Balanced coefficients also give the correct mole ratios needed for every stoichiometry calculation that follows.

Can this calculator handle equations with parentheses like Ca(OH)2?

Yes. One level of parentheses is expanded automatically, so Ca(OH)2, Al2(SO4)3, and similar formulas parse correctly. Nested parentheses (a group inside another group) are not supported; rewrite the formula without nesting if needed.

What does it mean if the calculator says the elements do not match?

It means an element appears in the reactants but never in the products, or vice versa, which usually signals a typo in one of the formulas. Chemically valid equations always have the same set of elements on both sides, since atoms are only rearranged, not created or destroyed.

How many reactants and products can I enter?

Up to 6 total species combined (reactants plus products). This covers the overwhelming majority of introductory and intermediate chemistry equations, including multi-product redox reactions such as KMnO4 + HCl → KCl + MnCl2 + H2O + Cl2.

Why are the coefficients always whole numbers?

Coefficients represent counts of molecules or moles, which cannot be fractional in a physically meaningful balanced equation. The calculator solves the underlying system in exact fractions, then scales every coefficient by the least common multiple of the denominators so the final answer is always the smallest possible set of whole numbers.

What is the difference between a coefficient and a subscript in a chemical formula?

A subscript (the small number inside a formula, like the 4 in CH4) is fixed by the compound's identity and can never be changed when balancing. A coefficient (the number placed in front of a formula, like the 2 in 2H2O) is what balancing adjusts. Changing a subscript would describe a different substance entirely.

Can I balance combustion reactions with this tool?

Yes. Combustion reactions (a hydrocarbon plus O2 producing CO2 and H2O) are one of the most common uses. Enter the fuel and O2 as reactants, CO2 and H2O as products, for example C3H8, O2 as reactants and CO2, H2O as products for propane combustion.

What if my equation involves an ion or a charge?

This calculator balances atoms only, not electrical charge, so it works for standard molecular equations but not for balancing half-reactions or net ionic equations that require charge balancing alongside atom balancing. For charge-balanced redox half-reactions, balance atoms first with this tool, then balance charge separately by adding electrons.

Is there a limit to how large the coefficients can be?

No practical limit within the 6-species scope. Some redox equations naturally require larger coefficients, for example 2KMnO4 + 16HCl → 2KCl + 2MnCl2 + 8H2O + 5Cl2, and the calculator finds these exactly the same way as smaller examples.

Do I need to know the products in advance to use this calculator?

Yes. This tool balances a given set of reactants and products, it does not predict what products a reaction will form. Predicting products requires knowledge of reaction type (combustion, synthesis, decomposition, single or double displacement) which is a separate chemistry skill from balancing.