Balance any chemical equation with exact whole-number coefficients.
Why equations must balance
A chemical equation is a short statement about what reacts and what forms. On the left you write the reactants, and on the right you write the products. Atoms are never created or destroyed in an ordinary chemical reaction, so every atom on the left must appear on the right in the same number. Balancing an equation means finding the numbers, called coefficients, that make both sides match.
Students often find balancing slow because it feels like guesswork. You change one number, another element goes out of balance, and you start again. This balancer removes the guessing. Type the equation, and it works out the smallest whole-number coefficients that balance every element at once, using the linear algebra behind the equation.
How to use the balancer
Type your equation with a plus sign between compounds on each side and an arrow between the sides. Use the standard chemical symbols, with capital letters for element symbols and small numbers for subscripts, for example H2 + O2 -> H2O. You can also use brackets, such as Ca(OH)2, and the tool reads the group inside the brackets correctly.
Click the balance button and read the result. The balanced equation appears with coefficients in front of each compound, and the list of coefficients is shown below it. A coefficient of one is not written in front of a compound, which follows normal chemical notation. If the tool cannot balance your input, check the spelling of each formula and make sure the arrow is present.
A worked example: burning methane
Natural gas is mostly methane, CH4. When it burns in oxygen, it forms carbon dioxide and water. The unbalanced equation is CH4 + O2 -> CO2 + H2O. Counting atoms shows the problem: the left has four hydrogen atoms but the right has only two, and the oxygen atoms do not match either.
The balanced equation is CH4 + 2O2 -> CO2 + 2H2O. Now the left has one carbon, four hydrogen, and four oxygen atoms, and the right has the same. The balancer finds this answer by treating each element as an equation and solving the whole system together, then scaling the result to whole numbers. The same method works for harder equations where guessing would take many tries.
How the maths works
Behind the scenes, each compound becomes a column of numbers, one row per element, with a plus sign for reactants and a minus sign for products. Balancing means finding coefficients that make every row add up to zero. That is a system of linear equations, and the tool solves it with exact fractions so no rounding error creeps in. The final step divides by the greatest common factor to give the smallest whole numbers.
This page also loads Math.js, a well-known maths library, and cross-checks the result with a matrix solve when the library is available. If the library fails to load, the exact fraction solver still gives the answer. Either way, the result you see is a real balanced equation, not a stored answer for a few famous examples.
Mistakes that stop a balance
The most common error is writing a formula with the wrong case, such as CO for carbon monoxide versus Co, which is cobalt. Chemical symbols matter: the first letter is capital and the second, if any, is small. Another common error is forgetting that some elements, such as oxygen and hydrogen, travel in pairs as O2 and H2 in their pure form.
Subscripts also cause trouble. In H2O, the 2 belongs only to hydrogen, while in Ca(OH)2 the 2 outside the brackets doubles everything inside. If your equation will not balance at all, it may be chemically impossible as written, for example because a product is missing. Add the missing product and try again.
Frequently asked questions
Does balancing change the compounds? No. Coefficients change how many molecules take part, but subscripts inside a formula never change during balancing. Changing a subscript would turn one substance into a different substance, which is not allowed.
Can the balancer handle ions and charges? This tool balances atoms in neutral compounds and common bracketed groups. It does not balance charges in half-equations or redox equations with electrons, so use it for standard molecular equations in school and early university work.
Why are fractions never shown in the answer? Chemists write balanced equations with whole numbers, so the tool scales any fractional result up to the smallest whole numbers. The ratios stay exactly the same, and the equation stays balanced.
