acalculator

What net ionic equation do I get?

Type a reaction in water, such as AgNO3 + NaCl = AgCl + NaNO3. The net ionic equation calculator balances it, splits every strong electrolyte into ions, and cancels the spectator ions to leave the net ionic equation.

Your numbers

States like (aq) or (s) are optional; the page uses them when you type them.
Net ionic equation
Ag⁺(aq) + Cl⁻(aq) → AgCl(s)

The net ionic equation is Ag⁺(aq) + Cl⁻(aq) → AgCl(s).

Balanced molecular equation
AgNO₃(aq) + NaCl(aq) → AgCl(s) + NaNO₃(aq)
Complete ionic equation
Ag⁺(aq) + NO₃⁻(aq) + Na⁺(aq) + Cl⁻(aq) → AgCl(s) + Na⁺(aq) + NO₃⁻(aq)
Spectator ions
NO₃⁻(aq), Na⁺(aq)

Net ionic equation: Ag⁺(aq) + Cl⁻(aq) → AgCl(s). The net ionic equation is Ag⁺(aq) + Cl⁻(aq) → AgCl(s).

How to calculate

Balances a reaction in water, writes the complete ionic equation from the solubility rules and strong acids, and cancels the spectator ions to give the net ionic equation.

Example with the default inputs (Molecular equation AgNO3 + NaCl = AgCl + NaNO3): The net ionic equation is Ag⁺(aq) + Cl⁻(aq) → AgCl(s).

Method: Balance the molecular equation; write each soluble ionic compound (Table 4.1), each strong acid (Table 4.2) and each ion in water as its ions; cancel ions found unchanged on both sides; divide by the common factor.

  • Reactions in water at room temperature. Solubility follows OpenStax Chemistry 2e Table 4.1; a state you type, (aq), (s), (l) or (g), overrides it.
  • Strong acids: HCl, HBr, HI, HNO₃, HClO₄ and H₂SO₄ (both protons). Every other molecule, including weak acids, water and gases, stays whole; water with no state typed is shown as H₂O(l).
  • Ionic hydroxides that Table 4.1 calls soluble (group 1 and Ba(OH)₂) are strong bases.

Machine-readable copies: Markdown, JSON.

Worked examples

Each example is checked against the calculator on every build.

  1. Molecular equation NaCl(aq) + AgNO3(aq) = AgCl(s) + NaNO3(aq) gives Net ionic equation Cl⁻(aq) + Ag⁺(aq) → AgCl(s), Spectator ions Na⁺(aq), NO₃⁻(aq).Source: OpenStax, Chemistry 2e, §4.2 Classifying Chemical Reactions (NaCl(aq) + AgNO₃(aq) ⟶ AgCl(s) + NaNO₃(aq); net ionic Ag⁺(aq) + Cl⁻(aq) ⟶ AgCl(s)). https://openstax.org/books/chemistry-2e/pages/4-2-classifying-chemical-reactions
  2. Molecular equation Ba(OH)2 + HNO3 = Ba(NO3)2 + H2O gives Balanced molecular equation Ba(OH)₂(aq) + 2HNO₃(aq) → Ba(NO₃)₂(aq) + 2H₂O(l), Net ionic equation OH⁻(aq) + H⁺(aq) → H₂O(l).Source: OpenStax, Chemistry 2e, §4.2 Classifying Chemical Reactions, Example 4.4 (Ba(OH)₂(aq) + 2HNO₃(aq) ⟶ Ba(NO₃)₂(aq) + 2H₂O(l); strong acids in Table 4.2; ionic hydroxides are strong bases). https://openstax.org/books/chemistry-2e/pages/4-2-classifying-chemical-reactions
  3. Molecular equation CaCl2 + Na3PO4 = Ca3(PO4)2 + NaCl gives Balanced molecular equation 3CaCl₂(aq) + 2Na₃PO₄(aq) → Ca₃(PO₄)₂(s) + 6NaCl(aq), Net ionic equation 3Ca²⁺(aq) + 2PO₄³⁻(aq) → Ca₃(PO₄)₂(s), Spectator ions Cl⁻(aq), Na⁺(aq).Source: OpenStax, Chemistry 2e, §4.2, Table 4.1 (chlorides and group 1 compounds are soluble; phosphates are insoluble except with group 1 and NH₄⁺). https://openstax.org/books/chemistry-2e/pages/4-2-classifying-chemical-reactions
  4. Molecular equation HC2H3O2 + NaOH = NaC2H3O2 + H2O gives Net ionic equation HC₂H₃O₂ + OH⁻(aq) → C₂H₃O₂⁻(aq) + H₂O(l), Spectator ions Na⁺(aq).Source: OpenStax, Chemistry 2e, §4.2 (acetic acid is a weak acid: about 1% ionized; sodium compounds and acetates are soluble). https://openstax.org/books/chemistry-2e/pages/4-2-classifying-chemical-reactions

How it works

1. Balance. The page reads each formula (brackets, charges written Fe^3+ or SO4^2-, optional states) and finds the smallest whole-number coefficients that make every element and the total charge equal on both sides: the null space of the element-count matrix, by exact row reduction. An equation with no balance, or more than one independent balance, has no answer.

2. Split strong electrolytes. For each formula, times its coefficient:

  • An ion you type (with a charge) stays as that ion, in solution (aq).
  • A strong acid (HCl, HBr, HI, HNO₃, HClO₄, H₂SO₄; OpenStax Table 4.2) gives H⁺(aq) and its anion; H₂SO₄ gives 2H⁺ + SO₄²⁻.
  • An ionic compound is a formula with one metal (or NH₄⁺ groups) and one anion from this list: Cl⁻, Br⁻, I⁻, F⁻, S²⁻, OH⁻, NO₃⁻, ClO₃⁻, ClO₄⁻, HCO₃⁻, C₂H₃O₂⁻ (acetate, in any atom order), SO₄²⁻, CO₃²⁻, CrO₄²⁻, PO₄³⁻. The metal’s charge is the anion charge divided by the number of metal atoms, and must be one it commonly takes: 1 for Li, Na, K, Rb, Cs, Ag; 2 for Be, Mg, Ca, Sr, Ba, Zn, Cd, Ni, Mn, Pb, Sn; 3 for Al and Cr; 2 or 3 for Fe and Co; 1 or 2 for Cu; Hg as Hg²⁺ or as the pair Hg₂²⁺. A soluble one gives its cations and anions (aq); an insoluble one stays as the solid (s).
  • Everything else (water, gases, weak acids, oxides, metals and other molecules) stays whole. With no state typed, water is shown as H₂O(l) and the others with no state.
  • A typed state wins: (aq) splits an ionic compound or strong acid; (s), (l) or (g) keeps it whole.

Solubility (OpenStax Table 4.1), checked in this order:

  1. Compounds of NH₄⁺, Li⁺, Na⁺, K⁺, Rb⁺, Cs⁺: soluble.
  2. Acetates, hydrogen carbonates, nitrates, chlorates: soluble.
  3. Chlorides, bromides, iodides: soluble except with Ag⁺, Hg₂²⁺, Pb²⁺.
  4. Fluorides: soluble except with group 2 cations, Pb²⁺, Fe³⁺.
  5. Sulfates: soluble except with Ag⁺, Ba²⁺, Ca²⁺, Hg₂²⁺, Pb²⁺, Sr²⁺.
  6. Carbonates, chromates, phosphates, sulfides: insoluble (rule 1 covers their exceptions).
  7. Hydroxides: insoluble except with Ba²⁺ (rule 1 covers group 1).
  8. Any other pair (a perchlorate of a metal outside group 1): no answer unless you type its state.

3. Cancel spectators. The complete ionic equation adds equal terms on each side (ions by formula and state). Each term on both sides is reduced by the smaller count; ions removed this way are listed as spectators. If one side is left empty, every ion is a spectator and there is no answer (no reaction). The rest is divided by the greatest common divisor of its coefficients.

Output format. Terms keep the order in which they first appear in the complete ionic equation; a coefficient of 1 is not written; subscripts and charges are printed as Unicode subscripts and superscripts.

Worked examples by hand

NaCl(aq) + AgNO₃(aq) = AgCl(s) + NaNO₃(aq) (OpenStax). Balanced as written. Complete: Na⁺ + Cl⁻ + Ag⁺ + NO₃⁻ → AgCl(s) + Na⁺ + NO₃⁻. Spectators Na⁺(aq), NO₃⁻(aq). Net: Cl⁻(aq) + Ag⁺(aq) → AgCl(s).

Ba(OH)₂ + HNO₃ = Ba(NO₃)₂ + H₂O (OpenStax Example 4.4). Balanced: Ba(OH)₂(aq) + 2HNO₃(aq) → Ba(NO₃)₂(aq) + 2H₂O(l). Complete: Ba²⁺ + 2OH⁻ + 2H⁺ + 2NO₃⁻ → Ba²⁺ + 2NO₃⁻ + 2H₂O(l). Cancelling Ba²⁺ and NO₃⁻ leaves 2OH⁻ + 2H⁺ → 2H₂O; dividing by 2: OH⁻(aq) + H⁺(aq) → H₂O(l).

CaCl₂ + Na₃PO₄ = Ca₃(PO₄)₂ + NaCl. Balanced: 3CaCl₂(aq) + 2Na₃PO₄(aq) → Ca₃(PO₄)₂(s) + 6NaCl(aq) (phosphates are insoluble except with group 1). Spectators Cl⁻(aq), Na⁺(aq). Net: 3Ca²⁺(aq) + 2PO₄³⁻(aq) → Ca₃(PO₄)₂(s).

HC₂H₃O₂ + NaOH = NaC₂H₃O₂ + H₂O. Acetic acid is weak and stays whole; NaOH and sodium acetate are soluble. Spectator Na⁺(aq). Net: HC₂H₃O₂ + OH⁻(aq) → C₂H₃O₂⁻(aq) + H₂O(l).

Other questions people ask

How do I write a net ionic equation?

Balance the molecular equation. Write every soluble ionic compound and strong acid in water as its ions (the complete ionic equation). Cross out ions that appear unchanged on both sides, the spectators, and reduce the coefficients. For NaCl(aq) + AgNO₃(aq) → AgCl(s) + NaNO₃(aq), the net ionic equation is Ag⁺(aq) + Cl⁻(aq) → AgCl(s).

What are spectator ions?

Ions that are in the solution before and after the reaction without changing, such as Na⁺ and NO₃⁻ when silver chloride precipitates. They balance the charge but take no part in the reaction, so the net ionic equation leaves them out.

Which compounds are split into ions?

Soluble ionic compounds (by the solubility rules), the strong acids HCl, HBr, HI, HNO₃, HClO₄ and H₂SO₄, and ions you type. Solids, water, gases and weak acids such as acetic acid stay whole.

How do I know if a compound is soluble?

The page uses OpenStax Chemistry 2e Table 4.1. Compounds of NH₄⁺ and group 1 cations are soluble; so are acetates, nitrates, chlorates and hydrogen carbonates. Chlorides, bromides and iodides are soluble except with Ag⁺, Hg₂²⁺ and Pb²⁺. Carbonates, chromates, phosphates and sulfides are insoluble except with group 1 and NH₄⁺. Hydroxides are insoluble except with group 1 and Ba²⁺.

What is the net ionic equation for a strong acid and a strong base?

H⁺(aq) + OH⁻(aq) → H₂O(l). For HCl + NaOH, Na⁺ and Cl⁻ are spectators. OpenStax writes the acid ion as H₃O⁺, which is the same reaction.

What if every ion is a spectator?

Then no precipitate, water, gas or weak electrolyte forms, and there is no reaction. Mixing NaCl and KNO₃ solutions just gives a solution of four ions, so the page shows no net ionic equation.

Can I type the states myself?

Yes. Add (aq), (s), (l) or (g) after a formula, as in AgCl(s). A typed state overrides the solubility rules: (aq) splits an ionic compound or strong acid into ions; (s), (l) and (g) keep the formula whole.