Molecule vs Compound

A molecule is any group of two or more atoms joined by covalent bonds — the atoms can be the same element (O₂) or different ones (H₂O). A compound is a substance made of two or more different elements chemically combined in a fixed ratio — whether as molecules (H₂O) or as an ionic lattice (NaCl).

Last reviewed on 2026-10-03.

Quick Comparison

Aspect MoleculeCompound
Definition Two or more atoms covalently bonded Two or more different elements chemically combined
Can contain only one element? Yes (O₂, N₂, O₃, S₈) No — always at least two elements
Bond types Covalent Covalent or ionic (sometimes metallic in intermetallics)
Smallest unit The molecule itself A molecule (covalent compounds) or a formula unit (ionic compounds)
Examples of both H₂O, CO₂, CH₄, C₆H₁₂O₆ H₂O, CO₂, CH₄, C₆H₁₂O₆
Only one of the two O₂, N₂, H₂, O₃ (molecules, not compounds) NaCl, MgO, CaCO₃ (ionic compounds, not molecules)

Key Differences

1. What Counts as a Molecule

A molecule is an electrically neutral group of atoms held together by covalent bonds, in which atoms share pairs of electrons. Size is not part of the definition: a molecule can be two atoms (H₂) or millions (DNA). What matters is that the atoms are bonded into a discrete unit.

Molecules can be made of one element. Oxygen gas is O₂ molecules, ozone is O₃, nitrogen is N₂ and sulfur commonly forms S₈ rings. These are molecules of elements, not compounds.

2. What Counts as a Compound

A compound is a pure substance containing two or more different elements in a fixed proportion, with properties different from those of its elements. Sodium is a reactive metal and chlorine a toxic gas, but the compound sodium chloride is table salt.

Compounds can be molecular (covalent), built from discrete molecules such as water or carbon dioxide, or ionic, built from a repeating lattice of positive and negative ions such as sodium chloride. Ionic compounds have no separate molecules; chemists describe them by a formula unit (NaCl = one Na⁺ for every Cl⁻).

3. The Overlap: "All Compounds Are Molecules?"

A common classroom statement is "all compounds are molecules, but not all molecules are compounds." It is only partly true. The second half is right — O₂ and N₂ are molecules but not compounds. The first half fails for ionic compounds: table salt is a compound but is not made of molecules.

A more accurate summary: molecular compounds (water, CO₂, glucose) are both; molecules of elements (O₂, N₂) are molecules only; ionic compounds (NaCl, CaCO₃) are compounds only.

4. How This Fits With Atoms and Mixtures

An atom is the smallest unit of an element; atoms bond to form molecules; substances made of different elements bonded together are compounds; and physically combined substances that are not bonded are mixtures. Air is a mixture of molecules (N₂, O₂, CO₂) and a few single atoms (argon).

Examples Sorted

Molecule and compound

  • Water, H₂O
  • Carbon dioxide, CO₂
  • Methane, CH₄
  • Glucose, C₆H₁₂O₆
  • Ammonia, NH₃

Molecule but not a compound

  • Oxygen gas, O₂
  • Ozone, O₃
  • Nitrogen gas, N₂
  • Hydrogen gas, H₂
  • Chlorine gas, Cl₂

Compound but not a molecule

  • Table salt, NaCl (ionic lattice)
  • Magnesium oxide, MgO
  • Calcium carbonate, CaCO₃ (chalk, limestone)
  • Potassium iodide, KI

Frequently Asked Questions

Is water a molecule or a compound?

Both. Water is a compound because it contains two different elements (hydrogen and oxygen) in a fixed 2:1 ratio, and it is made of discrete H₂O molecules held together by covalent bonds.

Is O₂ a compound?

No. O₂ is a molecule made of two oxygen atoms, but because it contains only one element it is not a compound. It is the molecular form of the element oxygen.

Is NaCl a molecule?

Not in the usual sense. Sodium chloride is an ionic compound: a lattice of Na⁺ and Cl⁻ ions with no separate molecules. Its formula describes the ratio of ions (a formula unit).

Are all compounds molecules?

No. Covalent compounds such as water and carbon dioxide are made of molecules, but ionic compounds such as salt are not.

What is the difference between an atom, a molecule and a compound?

An atom is a single particle of an element. A molecule is two or more atoms covalently bonded. A compound is a substance made of two or more different elements chemically combined, whether as molecules or as an ionic lattice.