Formulas of Ionic Compounds


Learning Objective

  • Apply knowledge of ionic bonding to predict the formula of ionic compounds

Key Points

    • The charge on the cations and anions in an ionic compound can be determined by the loss or gain of valence electrons necessary in order to achieve stable, noble gas electronic configurations.
    • The number of cations and anions that are combined in an ionic compound is the simplest ratio of whole integers that can be combined to reach electrical neutrality.
    • The cation precedes the anion in both the written form and the formula.


  • polyatomic ionAn ion composed of several atoms.
  • empirical formulaThe simplest whole-number ratio between elements in a formula of a compound.
  • noble gasAny of the elements of group 18 of the periodic table, which are monatomic and, with very limited exceptions, inert, or non-reactive.
  • electrically neutralA net charge of zero, which occurs when an atom or molecule/compound has no surplus or deficit of electrons.

Ionic Compounds

An ionic bond is formed through the transfer of one or more valence electrons, typically from a metal to a non-metal, which produces a cation and an anion that are bound together by an attractive electrostatic force. On a macroscopic scale, ionic compounds, such as sodium chloride (NaCl), form a crystalline lattice and are solids at normal temperatures and pressures.

Crystalline LatticeSodium chloride crystal lattice

The charge on the cations and anions is determined by the number of electrons required to achieve stable noble gas electronic configurations. The ionic composition is then defined by the requirement that the resulting compound be electrically neutral overall.

For example, to combine magnesium (Mg) and bromine (Br) to get an ionic compound, we first note the electronic configurations of these atoms (valence level in indicated in italics):

Mg: 1s22s22p63s2

Br: 1s22s22p63s23p63d104s24p5

In order to achieve noble gas configurations, the magnesium atom needs to lose its two valence electrons, while the bromine atom, which has 7 valence electrons, requires one additional electron to fill its outer shell. Therefore, for the resulting compound to be neutral, two bromine anions must combine with one magnesium cation to form magnesium bromide (MgBr2). In addition, though any ratio of 2 bromine atoms to 1 magnesium atom will satisfy the two requirements above, the formula for ionic compounds is typically presented as the empirical formula, or the simplest whole-number ratio of atoms with positive integers.

Note that the cation always precedes the anion both in written form and in formulas. In the written form, while the cation name is generally the same as the element, the suffix of single-atom anions is changed to –ide, as in the case of sodium chloride. If the anion is a polyatomic ion, its suffix can vary, but is typically either –ate or –ite,as in the cases of sodium phosphate and calcium nitrite, depending on the identity of the ion.

More examples:

  • lithium fluoride: Li+ and F combine to form LiF
  • calcium chloride: Ca2+ and Cl combine to form CaCl2
  • iron (II) oxide: Fe2+ and O2- combine to form FeO
  • aluminum sulfide: Al3+ and S2- combine to form Al2S3
  • sodium sulfate: Na+ and SO42- combine to form Na2SO4
  • ammonium phosphate: NH4+ and PO43- combine to form (NH4)3PO4
  • potassium chlorite: K+ and ClO2 combine to form KClO2

Video Summary

Chemistry 5.3 Formula Writing: Ionic Compounds – YouTubeA lesson on writing formulas for binary ionic compounds as well as ionic compounds containing polyatomic ions. The cross-over method is demonstrated.