Formula tool

Ionic Compound Calculator

Enter a positive ion and a negative ion. The calculator balances the charges and returns a neutral ionic formula.

Example: magnesium + oxygen gives MgO. Aluminum + chloride gives AlCl3. Iron(III) + sulfate gives Fe2(SO4)3.
Balanced ionic formula

MgO

Positive ion
Mg (+2)
Negative ion
O (-2)

1 Mg ion balance 1 O ion. The total charge is zero.

What the calculator does

It uses the charge on each ion to find the smallest whole-number ratio that gives a neutral compound.

Example formulas

Magnesium and oxygen give MgO. Calcium and nitrate give Ca(NO3)2. Aluminum and chloride give AlCl3.

Transition metals

Use Roman numerals when needed, such as iron(III), copper(II), or tin(IV).

Formula help