Formulas of Ionic Compounds

A 3D example of an ionic compound.
dra_schwartz / Getty Images

Ionic compounds form when positive and negative ions share electrons and form an ionic bond. The strong attraction between positive and negative ions often produce crystalline solids that have high melting points. Ionic bonds form instead of covalent bonds when there is a large difference in electronegativity between the ions. The positive ion, called a cation, is listed first in an ionic compound formula, followed by the negative ion, called an anion. A balanced formula has a neutral electrical charge or net charge of zero.

Determining the Formula of an Ionic Compound

A stable ionic compound is electrically neutral, where electrons are shared between cations and anions to complete outer electron shells or octets. You know you have the correct formula for an ionic compound when the positive and negative charges on the ions are the same or "cancel each other out."

Here are the steps for writing and balancing the formula:

  1. Identify the cation ( the portion with a positive charge). It is the least electronegative (most electropositive) ion. Cations include metals and they are often located on the left-hand side of the periodic table.
  2. Identify the anion ( the portion with a negative charge). It is the most electronegative ion. Anions include halogens and nonmetals. Keep in mind, hydrogen can go either way, carrying either a positive or negative charge.
  3. Write the cation first, followed by the anion.
  4. Adjust the subscripts of the cation and anion so the net charge is 0. Write the formula using the smallest whole number ratio between the cation and anion to balance charge.

Balancing the formula requires a bit of trial and error, but these tips help speed up the process. It becomes easier with practice!

  • If the charges of the cation and anion are equal (e.g., +1/-1, +2/-2, +3/-3), then combine the cation and anion in a 1:1 ratio. An example is potassium chloride, KCl. Potassium (K+) has a 1- charge, while chlorine (Cl-) has a 1- charge. Note that you do not ever write a subscript of 1.
  • If the charges on the cation and the anion are not equal, add subscripts as needed to the ions to balance the charge. The total charge for each ion is the subscript multiplied by the charge. Adjust the subscripts to balance charge. An example is sodium carbonate, Na2CO3. The sodium ion has a +1 charge, multiplied by the subscript 2 to get a total charge of 2+. The carbonate anion (CO3-2) has a 2- charge, so there is no additional subscript.
  • If you need to add a subscript to a polyatomic ion, enclose it in parentheses so it is clear the subscript applies to the entire ion and not to an individual atom. An example is aluminum sulfate, Al2(SO4)3. The parenthesis around the sulfate anion indicates three of the 2- sulfate ions are needed to balance 2 of the 3+ charged aluminum cations.

Examples of Ionic Compounds

Many familiar chemicals are ionic compounds. A metal bonded to a nonmetal is a dead giveaway that you're dealing with an ionic compound. Examples include salts, such as table salt (sodium chloride or NaCl) and copper sulfate (CuSO4). However, the ammonium cation (NH4+) forms ionic compounds even though it consists of nonmetals.

Compound Name Formula Cation Anion
lithium fluoride LiF Li+ F-
sodium chloride NaCl Na+ Cl-
calcium chloride CaCl2 Ca2+ Cl-
iron(II) oxide FeO Fe2+ O2-
aluminum sulfide Al2S3 Al3+ S2-
iron(III) sulfate Fe2(SO3)3 Fe3+ SO32-
Ionic Compound Formulas


  • Atkins, Peter; de Paula, Julio (2006). Atkins' Physical Chemistry (8th ed.). Oxford: Oxford University Press. ISBN 978-0-19-870072-2.
  • Brown, Theodore L.; LeMay, H. Eugene, Jr; Bursten, Bruce E.; Lanford, Steven; Sagatys, Dalius; Duffy, Neil (2009). Chemistry: The Central Science: A Broad Perspective (2nd ed.). Frenchs Forest, N.S.W.: Pearson Australia. ISBN 978-1-4425-1147-7.
  • Fernelius, W. Conard (November 1982). "Numbers in chemical names". Journal of Chemical Education. 59 (11): 964. doi:10.1021/ed059p964
  • International Union of Pure and Applied Chemistry, Division of Chemical Nomenclature (2005). Neil G. Connelly (ed.). Nomenclature of Inorganic Chemistry: IUPAC Recommendations 2005. Cambridge: RSC Publ. ISBN 978-0-85404-438-2.
  • Zumdahl, Steven S. (1989). Chemistry (2nd ed.). Lexington, Mass.: D.C. Heath. ISBN 978-0-669-16708-5.
mla apa chicago
Your Citation
Helmenstine, Anne Marie, Ph.D. "Formulas of Ionic Compounds." ThoughtCo, Apr. 5, 2023, Helmenstine, Anne Marie, Ph.D. (2023, April 5). Formulas of Ionic Compounds. Retrieved from Helmenstine, Anne Marie, Ph.D. "Formulas of Ionic Compounds." ThoughtCo. (accessed June 9, 2023).