Explainer

The Octet Rule: Why Atoms "Want" Eight Electrons (and When They Don't)

Atomic StructureBeginner6 min read
On this page
  1. The rule
  2. Where the rule came from
  3. Why eight?
  4. Using the octet rule: ions
  5. Using the octet rule: covalent bonds
  6. “Want” is the wrong word
  7. When the rule works best
  8. When it doesn’t work: a preview
  9. A step-by-step way to apply it
  10. Common mistakes
  11. Key takeaways

Look at almost any simple compound, such as water, methane, carbon dioxide or sodium chloride, and a pattern appears: each atom ends up with eight electrons in its outer shell, either by sharing electrons or by gaining and losing them. This pattern is the octet rule, one of the most useful rules of thumb in chemistry. It isn’t a law of nature, and it has plenty of exceptions, but it correctly predicts the formulas and structures of a huge number of compounds. This article explains what the rule says, why it works and how to use it.

The rule

Atoms tend to form bonds or ions so that each has eight electrons in its outer (valence) shell, the same arrangement as a noble gas.

“Octet” comes from the Latin for eight. Hydrogen (and helium-like ions such as Li⁺) follow a duet rule instead: two electrons in the outer shell, like helium.

Where the rule came from

In 1916, the American chemist Gilbert N. Lewis proposed that atoms combine by sharing pairs of electrons to reach stable arrangements. He pictured atoms as cubes, with electrons at the corners; a complete cube had eight. At about the same time, the German chemist Walther Kossel explained ionic compounds in terms of atoms gaining or losing electrons to reach noble gas configurations. Irving Langmuir popularised and extended Lewis’s ideas and coined the term “octet”. Lewis’s dot diagrams are still used today. See Lewis dot structures.

Why eight?

The number eight comes from electron structure:

  • The outer shell of a main-group atom holds valence electrons in one s subshell (2 electrons) and one p subshell (6 electrons).
  • s² p⁶ = 8 electrons fills both.
  • A filled s and p subshell is the configuration of the noble gases (neon, argon, krypton…), which are exceptionally unreactive.

See shells vs subshells vs orbitals and noble gases.

Using the octet rule: ions

Atoms can reach an octet by losing or gaining electrons:

Atom Valence electrons Change Ion New arrangement
Na 1 lose 1 Na⁺ [Ne]
Mg 2 lose 2 Mg²⁺ [Ne]
O 6 gain 2 O²⁻ [Ne]
Cl 7 gain 1 Cl⁻ [Ar]

This predicts ionic formulas: Na⁺ and Cl⁻ give NaCl; Mg²⁺ and O²⁻ give MgO; Mg²⁺ and Cl⁻ give MgCl₂. See how to predict the charge of an ion.

Using the octet rule: covalent bonds

Non-metal atoms can reach an octet by sharing electrons. Each shared pair counts towards the octet of both atoms.

Worked example: water (H₂O)

  • Oxygen has 6 valence electrons; each hydrogen has 1.
  • Oxygen shares one pair with each hydrogen.
  • Oxygen: 2 bonding pairs (4 electrons) + 2 lone pairs (4 electrons) = 8 ✓
  • Each hydrogen: 1 bonding pair = 2 ✓ (duet)

Worked example: carbon dioxide (CO₂)

  • Carbon has 4 valence electrons; each oxygen has 6. Total = 16.
  • Structure: O=C=O, with two double bonds.
  • Carbon: 2 double bonds = 8 electrons ✓
  • Each oxygen: 1 double bond (4 electrons) + 2 lone pairs (4 electrons) = 8 ✓

Worked example: nitrogen (N₂)

  • Each nitrogen has 5 valence electrons.
  • To reach 8 each, they share three pairs: a triple bond, N≡N.
  • Each nitrogen: 3 bonding pairs (6) + 1 lone pair (2) = 8 ✓

This very strong triple bond is why nitrogen gas is so unreactive.

Predicting the number of bonds

The octet rule predicts how many covalent bonds an atom typically forms:

Atom Valence electrons Electrons needed Typical bonds
H 1 1 (duet) 1
C 4 4 4
N 5 3 3
O 6 2 2
F, Cl 7 1 1

That’s why methane is CH₄, ammonia NH₃, water H₂O and hydrogen fluoride HF.

“Want” is the wrong word

It’s common to say atoms “want” a full octet. Atoms don’t want anything. The real reason is energy:

  • Forming bonds releases energy, so bonded arrangements are lower in energy (more stable) than separate atoms.
  • For ions, removing electrons actually costs energy; ionic compounds form because the attraction between oppositely charged ions in a lattice releases even more. See how atoms become ions.
  • Octet arrangements are common because, for second-period elements especially, they’re usually the lowest-energy options available.

It’s fine to use the octet rule as a shortcut, but explain chemistry in terms of energy and electrostatic attraction.

When the rule works best

The octet rule is most reliable for:

  • Second-period elements (C, N, O, F), which have only s and p orbitals available in their valence shell and can’t hold more than eight electrons.
  • Simple ionic compounds of groups 1, 2, 16 and 17.
  • Most organic molecules, where carbon forms four bonds, nitrogen three, oxygen two and hydrogen one.

When it doesn’t work: a preview

There are three main types of exception:

  1. Incomplete octets: some atoms have fewer than eight electrons, such as boron in BF₃ (6 electrons around B) and beryllium in BeCl₂ (4).
  2. Expanded octets: elements in period 3 and below can hold more than eight, such as phosphorus in PCl₅ (10) and sulfur in SF₆ (12).
  3. Odd-electron molecules: molecules with an odd total number of electrons, such as nitrogen monoxide (NO) and nitrogen dioxide (NO₂), can’t give every atom an octet.

Transition metals also rarely follow the octet rule. These cases are explained in exceptions to the octet rule.

A step-by-step way to apply it

When drawing a molecule, the octet rule gives a reliable procedure:

  1. Count all valence electrons from every atom (add one for each negative charge; subtract one for each positive charge).
  2. Choose the central atom, usually the least electronegative one that isn’t hydrogen.
  3. Connect atoms with single bonds, using two electrons per bond.
  4. Complete octets on the outer atoms with lone pairs.
  5. Put any remaining electrons on the central atom.
  6. If the central atom has fewer than eight, turn lone pairs on neighbouring atoms into double or triple bonds until it has eight.

For example, in hydrogen cyanide (HCN), there are 1 + 4 + 5 = 10 valence electrons. A single H–C bond and a triple C≡N bond, plus a lone pair on nitrogen, use all ten and give both carbon and nitrogen octets.

Common mistakes

  • Counting shared electrons only once. A bonding pair counts towards the octet of both atoms it connects.
  • Forgetting lone pairs. They count towards an atom’s octet.
  • Giving hydrogen eight electrons. Hydrogen follows the duet rule.
  • Treating the rule as absolute. It’s a guide, not a law.

Key takeaways

  • The octet rule: atoms tend to gain, lose or share electrons to reach eight valence electrons, like a noble gas.
  • Eight comes from a filled s² p⁶ outer shell; hydrogen follows a duet rule.
  • It predicts ionic charges, covalent bond counts and many molecular structures.
  • The real driving force is lower energy, not atoms “wanting” electrons.
  • Important exceptions include incomplete octets, expanded octets and odd-electron molecules.

Advertisement

More from this topic: Atomic Structure