Skip to main content

Chemical equation balancer

Enter an equation such as H2 + O2 -> H2O. The tool conserves each element, solves the stoichiometric coefficients and verifies atom counts on both sides.

Embed this widget

Customize the result, check the live preview, then copy the code.

Preview

Embed code type

Code to copy

Responsive and automatically resized by Bethemesh.

Enter a neutral molecular equation with reactants on the left and products on the right. Existing leading coefficients are ignored and recalculated.

Examples: H2 + O2 -> H2O; Fe + O2 -> Fe2O3; C3H8(g) + O2(g) -> CO2(g) + H2O(l).

Neutral molecular equations only. Explicit ionic charges, electrons and redox half-equations are not supported.

Balanced equation

-

Atom-conservation check

ElementReactantsProductsCheck

Balancing details

    Was this tool useful?

    How does this tool work?

    Balancing a chemical equation means choosing coefficients in front of formulas so that each element has the same total number of atoms on the reactant and product sides. This is the symbolic expression of conservation of matter. The calculator builds those conservation equations automatically, solves them exactly and returns the smallest positive whole-number coefficient ratio.

    Reactants are written on the left and products on the right, separated by an arrow. Plus signs separate species. Numbers placed before formulas are stoichiometric coefficients describing relative numbers of reacting and produced species.

    Formula subscripts must never be changed to achieve balance. Changing H2O to H2O2 creates a different substance. Only coefficients placed before formulas may be adjusted.

    The calculation counts atoms in chemical formulas, including parentheses, square brackets and hydrates, then creates a conservation equation for each element.

    For each element, the tool creates a conservation equation. These equations form a matrix that is reduced using exact rational arithmetic rather than floating-point approximations.

    OpenStax states that a balanced equation has equal atom counts for every element on both sides and that the conventional result uses the smallest whole-number coefficients. The audit table directly verifies that requirement.

    Balanced coefficients also define stoichiometric ratios. In N2 + 3 H2 → 2 NH3, the 1:3:2 ratio applies to relative molecule counts and to relative amounts in moles.

    The tool handles neutral molecular equations. Ionic balancing also requires electrical-charge conservation; explicitly charged ions and electrons are not supported.

    How to use this tool

    1. Enter valid species

      Use correct chemical-symbol capitalization and separate species with + signs.

    2. Separate reactants and products

      Use ->, =>, = or → as the reaction separator.

    3. Let coefficients be recalculated

      Existing leading coefficients are removed and the smallest ratio is solved again.

    4. Check the atom audit

      Every element must have exactly the same total on the reactant and product sides.

    Conservation principle for balancing reactions

    For every element E, the coefficient-weighted atom total must be equal on the reactant and product sides.

    Element conservation

    Σ reactants(νᵢNᵢ,E) = Σ products(νⱼNⱼ,E)

    ν is the stoichiometric coefficient and N is the number of atoms of the element in a species.

    Coefficient reduction

    gcd(ν₁, …, νₙ) = 1

    The final equation uses the smallest whole-number ratio.

    ν
    whole-number stoichiometric coefficient of a species
    Nᵢ,E
    number of atoms of element E in species i

    Molecular balancing conserves elements. Ionic equations additionally require conservation of electrical charge.

    Use cases

    Chemistry exercises

    Check a manual balance and identify whether every element is conserved.

    Prepare stoichiometry calculations

    Obtain the coefficients that become mole ratios among reactants and products.

    Validate an entered reaction

    Confirm that the same elements occur on both sides before quantitative work.

    Teach conservation of matter

    Show atom totals for each element before using the balanced coefficients.

    Examples

    Formation of water

    Four H atoms and two O atoms appear on each side.

    Input

    H2 + O2 -> H2O

    Result

    2 H2 + O2 → 2 H2O

    Iron(III) oxide

    Four Fe and six O atoms are conserved.

    Input

    Fe + O2 -> Fe2O3

    Result

    4 Fe + 3 O2 → 2 Fe2O3

    Ethane combustion

    The smallest integer ratio is 2:7:4:6.

    Input

    C2H6 + O2 -> CO2 + H2O

    Result

    2 C2H6 + 7 O2 → 4 CO2 + 6 H2O

    Ammonia synthesis

    The 1:3:2 ratio can then be used as a mole ratio.

    Input

    N2 + H2 -> NH3

    Result

    N2 + 3 H2 → 2 NH3

    With physical states

    Physical-state labels are preserved.

    Input

    C3H8(g) + O2(g) -> CO2(g) + H2O(l)

    Result

    C3H8(g) + 5 O2(g) → 3 CO2(g) + 4 H2O(l)

    Tips and best practices

    • Never change a chemical subscript to balance a reaction; change coefficients only.
    • Reduce coefficients to the smallest possible whole-number ratio.
    • A coefficient of 1 is normally omitted.
    • State labels (s), (l), (g) and (aq) do not affect atom counts.
    • If an element appears on only one side, the equation cannot be balanced as written.
    • A balanced equation does not by itself prove that a reaction occurs or goes to completion.
    • An ionic equation must conserve electrical charge as well as atoms; use a method that handles explicit charges.

    Sources and references

    Frequently asked questions

    What does balancing a chemical equation mean?

    It means selecting coefficients so each element has the same atom count on both sides.

    Can I change formula subscripts?

    No. Subscripts define the chemical identity; only coefficients in front of formulas should change.

    Why use the smallest integers?

    They express the simplest stoichiometric ratio among the species.

    What do coefficients represent?

    They represent relative particle counts and, macroscopically, relative amounts of substance in moles.

    Are parentheses supported?

    Yes, along with square brackets and hydrate notation supported by the shared formula engine.

    Are (aq), (s), (l) and (g) supported?

    Yes. State labels are preserved and do not affect the atom balance.

    Are ionic equations supported?

    No. This tool balances neutral molecular species. Explicitly charged ions, electrons and redox half-equations also require an electrical-charge balance.

    Does a balanced equation directly give masses?

    No. Coefficients give mole ratios; converting those ratios to masses requires molar masses.

    Are my data sent to a server?

    No. Parsing and balancing run locally in your browser.

    Related tools

    Tools similar or complementary to this one.

    Similar tools