
Web Scripts & Software
DEV3 Chemical Equation Balancer — Source Code (React + Tailwind)
from $20$29
Loading…
Everyday tool
Free, no sign-up. Runs in your browser; nothing is uploaded. Buy the source code: $29 Regular / $69 Extended
Use -> or = between sides. Charges with ^ (Fe^3+, SO4^2-, e^-). Hydrates with * (CuSO4*5H2O).
Try an example
C₃H₈ + 5O₂ → 3CO₂ + 4H₂O
Combustion. A fuel burns in oxygen to give carbon dioxide and water (complete combustion).
| Element | Reactants | Products | Balanced |
|---|---|---|---|
| C | 3 | 3 | ✓ equal |
| H | 8 | 8 | ✓ equal |
| O | 10 | 10 | ✓ equal |
Each column is a substance (reactants positive, products negative). Each row is an element. A balanced equation is a combination of columns that sums to zero.
| C3H8 | O2 | CO2 | H2O | |
|---|---|---|---|---|
| C | 3 | 0 | -1 | 0 |
| H | 8 | 0 | 0 | -2 |
| O | 0 | 2 | -2 | -1 |
Reduced row echelon form
| 1 | 0 | 0 | -1/4 |
| 0 | 1 | 0 | -5/4 |
| 0 | 0 | 1 | -3/4 |
Free (unpinned) column: H2O. Solution vector: (1/4, 5/4, 3/4, 1), scaled to the smallest whole numbers.
Everything is calculated in your browser with exact fractions. The reaction type is a pattern-based hint, not a proof that the reaction happens in real life.
Need Chemical Equation Balancer as a full mobile or web app? We build it in about a week. Built in about a week, from $99. Send your requirements or SOW; you get a fixed quote and a delivery date.
The chemical equation balancer stays free to use online. If you want the code to run, edit and ship in your own project, get the full source from the DEV3 Marketplace. Instant download, 6 months of support.
Get the full app behind this tool. Buy once, own the source, and try each one live first.

Web Scripts & Software
from $20$29

Web Scripts & Software Mobile app
from $69$99

Enterprise SaaS Starters
from $69$99

Enterprise SaaS Starters
from $69$99

Web Scripts & Software
from $69$99

Web Scripts & Software Mobile app
from $69$99

Web Scripts & Software Mobile app
from $69$99

Web Scripts & Software Mobile app
from $69$99
A balanced equation has the same number of atoms of every element on both sides, and the same total charge when ions are involved. This balancer does it with exact linear algebra instead of trial and error.
Each substance becomes a column and each element a row. Reactant counts are positive and product counts negative, so a balanced equation is a vector that multiplies the matrix to zero. Gaussian elimination with exact fractions finds that vector, which is then scaled to the smallest whole numbers. For ionic equations the net charge is one more row.
The tool balances the species you enter. It cannot add missing products, so for redox reactions in water include H2O, H^+ or OH^- yourself.
Write reactants and products with a plus sign and an arrow, for example Fe + O2 -> Fe2O3. Use capital first letters (Co is cobalt, CO is carbon monoxide), brackets such as Ca(OH)2, hydrates with a dot or star (CuSO4*5H2O), and charges with a caret (Fe^3+, SO4^2-, e^-).
It counts each element in every substance and builds a matrix where reactants are positive and products negative. The solution is the null space of that matrix, found by exact fraction Gaussian elimination. The result is scaled to the smallest whole numbers, so there is no guessing or rounding.
Yes. When ions or electrons are present, electric charge becomes an extra row in the matrix, so atoms and charge are both conserved. Write every species that takes part, including H^+, OH^- and H2O when the reaction needs them.
Usually a formula has a typo, a substance is missing, or a substance is on the wrong side. If the same element is not present on both sides, no coefficients can balance it. The message tells you which case applies.
Some equations hide two reactions in one, so several independent balanced forms exist. The tool then shows the smallest all-positive combination and tells you that other mixtures are also valid.
They are a helpful guess based on the pattern of reactants and products: synthesis, decomposition, combustion, single or double replacement, neutralization and redox. The balance itself is exact, while the type label is only a hint.