How to balance a chemical equation
By the law of conservation of mass atoms are neither created nor destroyed, so each element must have the same number of atoms on both sides. Coefficients are chosen to make this true, and the smallest whole numbers are used.
Balancing by inspection
- Start with the element that appears in the fewest substances, usually the metal.
- Then balance the acid groups, then hydrogen; check oxygen last.
- If you get a fraction (such as ½O2), multiply all coefficients by the denominator.
Example: C3H8 + O2 → CO2 + H2O. Three carbons give 3CO2; eight hydrogens give 4H2O; oxygen on the right is 3·2 + 4 = 10, so 5O2.
How the calculator does it
Each substance gets an unknown coefficient, and each element gives an equation «left equals right». This is a homogeneous system of linear equations. The calculator solves it exactly in rational numbers (no rounding) and scales the solution to the smallest whole numbers, so it also handles redox reactions: 2KMnO4 + 16HCl → 2KCl + 2MnCl2 + 5Cl2 + 8H2O.
For ionic equations one more condition is added: the total charge on the left equals the total charge on the right.
When it cannot be balanced
If the system has no positive solution, there is a mistake in the formulas or products. If there are infinitely many solutions, the record actually contains several independent reactions: for example, with hydrogen peroxide the coefficients depend on how much oxygen came from the oxidising agent and how much from the peroxide itself. Then the half-reaction (electron balance) method is needed.