A chemical equation is only meaningful once it obeys conservation of mass โ€” every atom on the reactant side has to show up somewhere on the product side. This calculator automates that process for any equation, no matter how many species or how complex the formulas, by turning atom-balancing into a linear-algebra problem it can solve exactly.

How the balancer works

Each chemical formula is parsed into an element-count map โ€” for example Fe2(SO4)3 becomes Fe: 2, S: 3, O: 12 โ€” including nested parentheses and polyatomic groups. Those counts become a matrix where each row is an element and each column is a species, with reactant counts positive and product counts negative. A set of coefficients balances the equation exactly when it puts that matrix's columns into the matrix's nullspace: every row sums to zero. The calculator finds that nullspace vector using exact fraction arithmetic (no floating-point rounding), then scales it to the smallest possible whole numbers using the least common multiple of the denominators and the greatest common divisor of the resulting integers.

Inputs and what they mean

The only input is the equation itself, typed with + between species and an arrow between reactants and products. Any coefficient you type is ignored, since the calculator always solves for its own โ€” this means you can type an already-balanced equation, an unbalanced one, or one with placeholder coefficients like "1" and get the same correct answer. Element symbols must be valid (case-sensitive, e.g. Co is cobalt but CO is carbon monoxide), and parentheses must be properly matched.

Limits and edge cases

The balancer works on atom conservation only โ€” it does not track electron transfer, so it won't tell you the oxidation states in a redox reaction, only that the atom counts match. If an equation has redundant or duplicate species, the matrix can have more than one valid family of solutions; the calculator flags this as underdetermined rather than guessing. If the species you entered simply can't conserve atoms with any positive whole-number coefficients (for example, an element that appears on only one side), the calculator flags the equation as unbalanceable rather than returning a misleading answer. Physical states (s), (l), (g), (aq) are not part of the balancing math and are ignored if included.