helping kids learn

How do you write chemical formula?

How do you write the formula of an ionic compound?

The chemical formula of an ionic compound shows the ratio positive and negative ions in the compound.

For example magnesium chloride has the chemical formula of MgCl2.

The ratio of magnesium and chloride ions is one to two or Mg2+ : Cl- = 1 : 2

An ionic compound is made up of positive and negative ions.

The following table of ionic compounds shows the ratio of ions needed to produce a neutral compound.

Ionic compound Metallic ions Non metallic ions Ratio of ions Chemica formula
 Sodium chloride  Na+  Cl-  1:1  NaCl
 Sodium oxide

 Na+

Na+

 O2-  2:1  Na2O
 Sodium nitride

 Na+

Na+

Na+

 N3-  3:1  Na3N
 Magnesium oxide  Mg2+  O2-  1:1  MgO
 Aluminum nitrde  Al3+  N3-  1:1  AlN
 Calcium nitride

 Ca2+

 Ca2+

 Ca2+

 N3-

N3-

 3:2  Ca3N2

Click on the ionic compound link to show or hide each chemical formula.

Chemical Formula Table

Na+
K+
Mg2+
Ca2+
Al3+
NaCl
sodium chloride

KCl
potassium chloride

MgCl2
magnesium chloride

CaCl2
calcium chloride

AlCl3
aluminum chloride

Cl-
Na2O
sodium oxide

K2O
potassium oxide

MgO
magnesium oxide

CaO
calcium oxide

Al2O3
aluminum oxide

O2-
NaBr
sodium bromide

KBr
potassium bromide

MgBr2
magnesium bromide

CaBr2
calcium bromide

AlBr3
aluminum bromide

Br-
Na2S
sodium sulfide

K2S
potassium sulfide

MgS
magnesium sulfide

CaS
calcium sulfide

Al2S3
aluminum sulfide

S2-
Na3P
sodium phosphide

K3P
potassium phosphide

Mg3P2
magnesium phosphide

Ca3P2
calcium phosphide

AlP
aluminum phosphide

P3-