ChemGem

How to Tell If a Compound Is Ionic or Molecular (Step-by-Step, with Practice)

A compound is two or more elements chemically combined. Before you write or name one, decide whether it is ionic (held by attraction between ions) or molecular (held by shared electrons). That one choice sets the route for the rest of the chapter.

Spot it, solve it, practice it: 4 steps, 1 worked example, 4 practice problems. Free, no account.

The route · 4 steps

  1. Find each element on the periodic table: metal, nonmetal or metalloid.
  2. Metal + nonmetal, or a recognizable ion such as NH4+: treat it as ionic.
  3. Nonmetals only: treat it as molecular.
  4. Ionic: balance ion charges to zero. Molecular: count the actual atoms.
Spot it

How to recognize ionic vs. molecular questions

Look for a formula and the words "ionic or molecular": check whether a metal or ammonium (NH4+) is present, or only nonmetals.

Example wording, with the clue words marked:

Is MgCl2 ionic or molecular?

Not sure it’s this type? Compare the neighbors:

Step-by-step

Worked example: ionic vs. molecular

The idea

Periodic table colored by type. Metals (blue) are left of a zigzag staircase line that starts just left of boron. Nonmetals (green) are right of it, plus hydrogen. Metalloids (gold) touch the line: B, Si, Ge, As, Sb, Te.
Left of the staircase: metals (blue). Right: nonmetals (green), plus hydrogen. Touching it: metalloids (gold).
Three kinds of element
KindWhere on the tableTypical behavior
MetalsLeft of the staircase line (most elements)Lose electrons and form positive ions.
NonmetalsRight of the line, plus hydrogen (H) at top leftGain or share electrons.
MetalloidsTouching the line: B, Si, Ge, As, Sb, TeProperties in between.
The staircase line runs down the right side of the table, starting just left of boron (B).
Chapter route map. Ionic path: metal plus nonmetal. Molecular path: two nonmetals. Both decision clues highlighted in section 2.1. Ammonium compounds are also ionic without a metal. Green: earlier material. Gold: current decision or upcoming route. Gray: later material. Follow ionic charges/formulas/names or molecular atom counts/prefixes, then acids, strong bases, and mixed practice.
Metal + nonmetal → usually ionic; nonmetals only → usually molecular. Ammonium compounds are ionic without a metal. Green = earlier, gold = now, gray = later; colors do not measure mastery.
Ionic or molecular?
CompareIonic compoundsMolecular compounds
What holds it togetherAttraction between positive and negative ionsAtoms sharing electrons in covalent bonds
First clueA metal with a nonmetal, or recognizable ions. Ammonium compounds are ionic without a metal.Nonmetals combined into molecules, such as CO2 or H2O
What the formula countsSimplest whole-number ratio of ions: 1 Mg2+ to 2 Cl− in MgCl2Actual atoms in one molecule: 1 C and 2 O in CO2
Formula routeUse ion charges: criss-cross, simplify, check neutralUse given atom counts or naming prefixes; no criss-cross
Cations and anions
Cation = positive ion
Metals usually lose electrons.
Na → Na+ (loses 1 electron).
Removing a negative charge leaves the ion more positive.
Anion = negative ion
Nonmetals usually gain electrons to form single-atom anions.
Cl → Cl− (gains 1 electron).
Adding a negative charge drives the total down.
Cartoon sodium cation Na⁺ and chloride anion Cl⁻ attract because their charges are opposite. An alternating array represents the ionic compound NaCl.
Opposite charges attract. In solid NaCl, each smaller Na+ (blue) is surrounded by larger Cl− ions (green), and each Cl− by Na+, in a repeating cube pattern.
Sodium chloride is neutral
Na+ + Cl−: (+1) + (−1) = 0 → NaCl
NaCl gives the simplest ratio. The solid is a repeating array of many ions, not one isolated pair.
A carbon dioxide molecule has one carbon atom between two oxygen atoms, O=C=O. Covalent bonds represent shared electron pairs, not attraction between simple ions.
CO2 is molecular: one C and two O atoms share electrons through covalent bonds.
Molecular compounds
  • Many nonmetal compounds are made of molecules: separate groups of atoms held by covalent bonds.
  • Covalent means the atoms share electrons.
  • CO2 is not a carbon cation balanced by oxide anions. On the periodic table: C and O are both right of the staircase, so both are nonmetals.

On the periodic table: Sodium (Na) is in Group 1; Group 1 atoms lose 1 electron, so sodium forms Na+.

On the periodic table: Chlorine (Cl) is in Group 17; Group 17 atoms gain 1 electron, so chlorine forms Cl−.

On the periodic table: Magnesium (Mg) is in Group 2, so it forms Mg2+.

On the periodic table: Carbon (C) and oxygen (O) are right of the staircase line, so both are nonmetals.

Worked example · 4 steps

How many Cl− ions balance one Mg2+? Write the formula.

One Mg²⁺ ion and two Cl⁻ ions: +2 minus 1 minus 1 equals zero, giving the ion ratio in MgCl₂.
One magnesium ion needs two chloride ions to balance its +2 charge.
  1. 1
    Read the charges

    On the periodic table: Mg is in Group 2, so it forms Mg2+. Cl is in Group 17, so it forms Cl−.

    IonCharge
    Mg2++2
    Cl−−1
  2. 2
    Try one chloride

    The total is still positive, so one chloride is not enough.

    (+2) + (−1) = +1
  3. 3
    Add a second chloride

    Now the charges balance.

    (+2) + (−1) + (−1) = 0
  4. 4
    Write the formula

    The unwritten 1 means one Mg2+; the small 2 means two Cl−.

    IonCount× Charge= Total
    Mg2+1+2+2
    Cl−2−1−2
    Sum0
  5. ✓
    Answer

    MgCl2

Your turn

Ionic vs. molecular practice problems

Answer first, then check. Hints open one at a time; the answer and full solution open after you try.

Problem 1 of 4 · warm-up

Is MgCl2 ionic or molecular?

Hint 1 · the clue

First decide whether this asks for compound type, ion charge, formula, or name, then use the matching route.

Hint 2 · the next move

A formula with the words "ionic or molecular" tells you to check each element: Mg is a metal and Cl is a nonmetal.

Your path:

  1. Find Mg and Cl on the table
  2. Metal + nonmetal → ionic
  3. Check: Mg2+ and two Cl− add to zero
Answer

Answer: Ionic

On the periodic table: Magnesium (Mg) is a Group 2 metal and chlorine (Cl) is a Group 17 nonmetal.

Full worked solution

What you know: The formula MgCl2. What you want: Whether it is ionic or molecular.

  1. Find each element on the periodic table. Mg is left of the staircase line, so it is a metal. Cl is right of it, so it is a nonmetal.
  2. Apply the first clue: metal + nonmetal → ionic.
  3. Confirm with charges. Mg forms Mg2+ and Cl forms Cl−. One Mg2+ and two Cl− give (+2) + 2(−1) = 0. The ions attract, so the compound is Ionic.

Check: The subscript 2 matches the two chloride ions needed to balance +2.

On the periodic table: Magnesium (Mg) is in Group 2 on the left side, so it is a metal. Chlorine (Cl) is in Group 17 on the right side, so it is a nonmetal.

Answer: Ionic

YOUR PERIODIC-TABLE REFERENCE

12MgMagnesium24.31Group 2 · Period 3
17ClChlorine35.45Group 17 · Period 3

Atomic number identifies proton count. The decimal mass is an average, not an isotope’s mass number. Use supplied rounded masses when a problem gives them.

Problem 2 of 4

Is CO2 ionic or molecular?

Hint 1 · the clue

First decide whether this asks for compound type, ion charge, formula, or name, then use the matching route.

Hint 2 · the next move

"Ionic or molecular" with a formula of two nonmetals, carbon and oxygen, points to a molecular compound with shared electrons.

Your path:

  1. Find C and O on the table
  2. Both are nonmetals
  3. Two nonmetals → molecular, shared electrons
Answer

Answer: Molecular

On the periodic table: Carbon (C) and oxygen (O) are both nonmetals on the right side of the table.

Full worked solution

What you know: The formula CO2. What you want: Whether it is ionic or molecular.

  1. Find each element. Carbon and oxygen are both right of the staircase line, so both are nonmetals.
  2. Apply the first clue: two nonmetals → molecular.
  3. Think about what holds it together. The atoms share electrons in covalent bonds. One molecule has 1 C and 2 O. So CO2 is Molecular.

Why it matters: The type decides the route. Molecular compounds use prefixes and actual atom counts, not ion charges.

Watch out: Do not crisscross CO2 into C4+ and O2−. These atoms are not separate simple ions.

On the periodic table: Carbon (C) and oxygen (O) are both to the right of the staircase line, so both are nonmetals.

Answer: Molecular

YOUR PERIODIC-TABLE REFERENCE

6CCarbon12.01Group 14 · Period 2
8OOxygen16.00Group 16 · Period 2

Atomic number identifies proton count. The decimal mass is an average, not an isotope’s mass number. Use supplied rounded masses when a problem gives them.

Problem 3 of 4

Is NH4Cl ionic even though it has no metal?

Hint 1 · the clue

First decide whether this asks for compound type, ion charge, formula, or name, then use the matching route.

Hint 2 · the next move

"Ionic even though it has no metal" hints at a polyatomic cation: NH4 is ammonium, the common exception.

Your path:

  1. Look for a known ion: NH4+
  2. The rest, Cl, forms Cl−
  3. Cation + anion attract → ionic
Answer

Answer: Yes

Full worked solution

What you know: NH4Cl contains only nonmetals. What you want: Whether it is still ionic.

  1. Look for a recognizable ion. NH4 is ammonium, NH4+, a common polyatomic cation.
  2. The rest is Cl, which forms the anion Cl−.
  3. A cation and an anion attract each other: (+1) + (−1) = 0. That attraction makes the compound ionic. So the answer is Yes.

Why it matters: "Metal + nonmetal" is a starting clue, not the full rule. Ammonium compounds are the common ionic exception without a metal.

Watch out: Seeing only nonmetals and calling it molecular. Check for NH4+ first.

On the periodic table: Nitrogen (N), hydrogen (H), and chlorine (Cl) are all nonmetals, so NH₄Cl has no metal. Chlorine is in Group 17, so it forms Cl⁻.

Answer: Yes

YOUR PERIODIC-TABLE REFERENCE

7NNitrogen14.01Group 15 · Period 2
17ClChlorine35.45Group 17 · Period 3

Atomic number identifies proton count. The decimal mass is an average, not an isotope’s mass number. Use supplied rounded masses when a problem gives them.

Problem 4 of 4

Compare NaCl and CO2: which is ionic and which is molecular? Why?

Hint 1 · the clue

Locate each element on the periodic table relative to the staircase line. Metal + nonmetal suggests ions held together by opposite charges; nonmetals only suggests a molecule held together by shared electrons.

Hint 2 · the next move

"Which is ionic and which is molecular" with two formulas means sort each by metal versus nonmetal.

Your path:

  1. NaCl: metal + nonmetal → ionic
  2. Opposite ions attract
  3. CO2: two nonmetals → molecular, shared electrons
Answer

NaCl is ionic: positive/negative ions attract. CO2 is molecular: atoms share electrons.

Full worked solution

What you know: The formulas NaCl and CO2. What you want: Which is ionic, which is molecular, and why.

  1. NaCl: Na is a metal (left of the staircase) and Cl is a nonmetal. Metal + nonmetal → ionic.
  2. What holds NaCl together: Na+ and Cl− attract because their charges are opposite. (+1) + (−1) = 0.
  3. CO2: C and O are both nonmetals. Two nonmetals → molecular. Its atoms share electrons in covalent bonds. So NaCl is ionic: positive/negative ions attract. CO2 is molecular: atoms share electrons.

Why it matters: NaCl's formula is an ion ratio. CO2's formula counts the actual atoms in one molecule.

Answer: NaCl is ionic: positive/negative ions attract. CO2 is molecular: atoms share electrons.

On the periodic table: Sodium (Na) is a Group 1 metal and chlorine (Cl) is a nonmetal, so NaCl is ionic. Carbon (C) and oxygen (O) are both nonmetals, so CO₂ is molecular.

YOUR PERIODIC-TABLE REFERENCE

6CCarbon12.01Group 14 · Period 2
11NaSodium22.99Group 1 · Period 3

Atomic number identifies proton count. The decimal mass is an average, not an isotope’s mass number. Use supplied rounded masses when a problem gives them.

Watch out

Common ionic vs. molecular mistakes