Chemical Equation
Balancer
Balance chemical equations automatically — coefficients calculated instantly, atom conservation verified.
Supported format examples:Fe2O3 + C = Fe + CO2
Fe^3+ + Sn^2+ = Fe^2+ + Sn^4+
MnO4^- + Fe^2+ + H^+ = Mn^2+ + Fe^3+ + H2O
✓ Parentheses: Ca(OH)₂, K₄[Fe(CN)₆]
✓ Ionic charge: Fe^3+ or Fe3+ · NO3^- or NO3-
✓ Paste from textbooks: Fe²⁺, MnO₄⁻, Cr₂O₇²⁻ are recognized automatically
✓ Phase notation is ignored: (g), (l), (s), (aq)
How Does the Algorithm Work?
1
Parsing
The equation string is tokenized and an element–atom count map is built for each species. Parentheses and nested groups are resolved recursively.
2
Matrix Construction
Each element is a row and each species is a column. The stoichiometric matrix (A) is built with + on the left and − on the right. Balancing becomes the system Ax = 0.
3
Null Space (Gauss–Jordan)
Without floating-point arithmetic, integer Gauss–Jordan elimination finds the null space. Scaling by LCM yields the smallest integer coefficients.
Frequently Asked Questions
What is chemical equation balancing?
Balancing a chemical equation means matching the number of atoms of each element among reactants and products. By the law of conservation of mass, the total number of atoms of each element does not change before and after the reaction, so equations must be written with specific integer coefficients.
How does the balancing algorithm work?
This tool uses the stoichiometric matrix method: each element is a row and each species is a column. Species on the left enter with positive coefficients and those on the right with negative coefficients, forming the system Ax = 0. Gauss–Jordan elimination finds the null space and yields the smallest integer coefficients. All operations use integer arithmetic without floating-point numbers.
Which formula formats are supported?
Parentheses and brackets such as Fe2O3, Ca(OH)2, Al2(SO4)3, K4[Fe(CN)6]; ionic charge notation such as Fe^3+, CO3^2-, H^+; and simple formulas like H2O are supported. Phase labels (g), (l), (s), (aq) are ignored automatically. Use =, →, ->, or => as equation separators.
Why can some equations not be balanced?
Some equations cannot be balanced for two reasons: (1) Mass conservation cannot be satisfied — e.g. in C = N₂, carbon cannot become nitrogen. (2) The equation combines multiple independent reactions; the matrix rank is too low and infinite solutions appear.
How do I enter ionic equations?
Use ^ for ionic charge: Fe^3+, SO4^2-, MnO4^-, H^+, Cl^-, etc. The tool checks charge conservation automatically and shows charge balance in the verification table. Electrons can be entered as e or e^-.
Why do uppercase and lowercase letters matter?
Distinctions like "Co" (cobalt) vs "CO" (carbon monoxide) are critical. Element symbols always start with an uppercase letter followed by lowercase (Fe, Cu, Na, Cl). Writing all lowercase or wrong capitalization leads to parsing different elements.
What is the law of conservation of mass?
Formulated by Antoine Lavoisier in 1789, the law of conservation of mass states that in a closed system the total mass does not change in a chemical reaction. The number of atoms of each element is the same before and after, so atom counts must match on both sides of the equation.
What do mole ratios mean?
Coefficients in a balanced equation show mole ratios of reactants and products. For example, in 2Fe₂O₃ + 3C → 4Fe + 3CO₂, 2 mol Fe₂O₃ reacts with 3 mol C to produce 4 mol Fe and 3 mol CO₂. These ratios are the basis of stoichiometric calculations.
What Is Chemical Equation Balancing and How Do You Do It?
Balancing a chemical equation means matching the number of atoms of each element on both sides of a reaction. By the law of conservation of mass, the total number of atoms of each element does not change before and after the reaction, so equations must be written with specific integer coefficients.
This tool uses the stoichiometric matrix method: each element is a row and each species is a column, and Gauss–Jordan elimination yields the smallest integer coefficients. All operations use integer arithmetic, so floating-point error does not occur. It supports everything from simple equations (H₂ + O₂ → H₂O) to ionic redox reactions (MnO₄⁻ + Fe²⁺ + H⁺).
Equation Balancing — Exam Prep Tips
Use this tool for combustion, acid–base, and redox equations during exam prep. The atom verification table in the results shows how many times each element appears, helping you spot mistakes instantly. For stoichiometry calculations, combine it with the Mol Calculator tool for mole and molarity calculations.
