Chemical Equation Balancer
How to Use
What this tool does
Balancing an equation by trial and error works until an oxyacid salt or several products make you lose track of one element. This tool counts atoms on each side, builds the corresponding linear system and solves for the smallest integer coefficients, so the right-hand side is never a copy of the left and the atom counts actually agree.
Four reactions you can check immediately: hydrogen burns as 2H2 + O2 = 2H2O; methane as CH4 + 2O2 = CO2 + 2H2O; iron to magnetite as 3Fe + 2O2 = Fe3O4; aluminium with hydrochloric acid as 2Al + 6HCl = 2AlCl3 + 3H2. A coefficient of one is omitted, as in ordinary notation.
The result panel adds a side-by-side atom count for every element, so a balance can be verified line by line. A small library of common reactions is built in, or you can type your own using plus signs between substances and an equals sign between the two sides.
The parser reads a formula into element counts, treating a subscript as a multiplier for the symbol immediately before it and expanding brackets with their own subscript. From those counts it builds one linear equation per element and solves for coefficients that make every element match on both sides. The solution is then scaled to the smallest whole-number ratio, which is why a reducible set like four, four, two is never returned. A coefficient of one is omitted in the output to match ordinary chemical notation. The atom-count table under the equation is generated independently from the balanced coefficients, so it is a genuine check rather than a restatement of the answer; walking down the two columns is the fastest way to catch a typo in the formula you typed. Case is significant: Co and CO are different elements, and a slip there changes the system being solved. The tool balances coefficients only. It does not decide whether a reaction proceeds, add conditions such as heat or a catalyst, insert precipitate or gas arrows, or handle ionic charge balance. Equations with no solution, or with a solution that cannot be expressed as small integers, produce a message rather than a forced approximation. Unmatched brackets, unknown symbols and a missing side are reported with their location. The built-in reaction list is there for convenience and is not a substance database.
Key features
- Smallest integer ratio: The solver returns the reduced integer set rather than a reducible answer like 4, 4, 2.
- Element-by-element check: Left and right atom totals are printed so the balance can be verified on the spot.
- Built-in reaction list: Common combustion, displacement and double-displacement reactions load with one click.
- Brackets and subscripts: Formulae such as Ca(OH)2 and Fe2(SO4)3 are parsed by standard chemical notation.
- Ones omitted: Output follows writing convention and does not print a coefficient of one.
- Specific errors: Unmatched brackets, invalid element symbols and missing sides all produce a located message.
How to use it
- Write the reaction: Enter it as A + B = C + D with numeric subscripts straight after each element.
- Press Balance: The result area returns the full equation with coefficients.
- Verify atom counts: Compare the element table underneath to confirm both sides match.
- Use the library: Press Example or pick a reaction from the common list instead of typing.
- Clear: Clear removes equation and result together before the next reaction.
Things to keep in mind
- Coefficients only: The tool does not judge whether a reaction occurs, nor add conditions, precipitate or gas marks.
- Integer solutions required: Systems with no solution or only fractional ratios produce a message instead of a forced approximation.
- No ionic charge handling: Counting assumes neutral formulae; ionic equations and charge balance need separate checking.
- Case matters: Co and CO parse as different elements, so a typo changes the system being solved.
- Not a chemical database: It does not verify that a substance exists or supply physical properties beyond formula parsing.