AP · Chemistry · Lewis Diagrams and Molecular Shape

Lewis Diagrams

13 min readUpdated November 30, 2026FreeAP Chemistry, Compound Structure and Properties

A Lewis diagram shows every valence electron in a molecule or ion: shared pairs as bonds, unshared pairs as lone pairs. Count the valence electrons, join outer atoms to a central atom, and place the rest to give each atom an octet, adding multiple bonds where the central atom falls short. Boron can have six electrons, and atoms from period 3 onward can hold more than eight.

Quick check

  1. How many valence electrons does an atom of nitrogen, oxygen or chlorine have?Show answerHide answer

    Nitrogen has 5, oxygen has 6 and chlorine has 7. For groups 13 to 18, subtract 10 from the group number.

  2. A water molecule has two O–H bonds. How many lone pairs does the oxygen atom carry?Show answerHide answer

    Two. Water has 1+1+6=81 + 1 + 6 = 8 valence electrons; the two bonds use 4, and the other 4 sit on oxygen as two lone pairs.

Know these already? Jump to the practice questions

What you'll be able to do

  • Calculate the total number of valence electrons in a molecule or polyatomic ion.
  • Draw a Lewis diagram, with multiple bonds where needed, and describe it in words.
  • Determine the number of bonding pairs and lone pairs in a Lewis diagram.
  • Identify atoms with fewer or more than eight electrons, and explain which atoms can do this.

Key terms

Bonding pair

A pair of electrons shared between two atoms. A single bond is one bonding pair, a double bond two and a triple bond three.

In plain English
The electrons that make up a bond line.
Don't write
"A double bond is one bonding pair."

Lone pair

A pair of valence electrons that belongs to one atom and is not shared in a bond.

In plain English
A pair of dots sitting on one atom.
Don't write
"A single unpaired electron."

Octet rule

Main-group atoms in molecules tend to have eight electrons around them, counting bonding pairs and lone pairs; hydrogen needs only two.

In plain English
Most atoms end up surrounded by four pairs.
Don't write
"Every atom always has exactly eight electrons."

What does a Lewis diagram show?

A Lewis diagram shows only valence electrons, because they form the bonds. Each line is a bonding pair and each pair of dots is a lone pair.

To count the electrons around an atom, add 2 per bonding pair and 2 per lone pair. In ammonia, NH₃, nitrogen has three bonding pairs and one lone pair, so 3×2+2=83 \times 2 + 2 = 8: an octet. Each hydrogen has 2. A shared pair counts for both atoms, which is how atoms reach an octet.

Key idea

Electrons around an atom = 2 per bonding pair + 2 per lone pair; most atoms reach 8, hydrogen 2.

Check yourself

In methane, CH₄, how many electrons surround the carbon atom, and how many lone pairs does it carry?
Show answerHide answer

Eight electrons, from four bonding pairs. Carbon has no lone pairs.

How do you draw a Lewis diagram?

Use the same steps every time (Learn this):

  1. Count the valence electrons. Add one per negative charge; subtract one per positive charge.
  2. Choose the central atom, usually the one that forms the most bonds or is least electronegative. Hydrogen and fluorine are always outer atoms.
  3. Join each outer atom to the central atom with a single bond (2 electrons each).
  4. Complete the outer atoms' octets with lone pairs (hydrogen needs none).
  5. Put any remaining electrons on the central atom as lone pairs.
  6. If the central atom has fewer than eight, move an outer lone pair into a double bond, and repeat as needed.

Put an ion's diagram in square brackets with the charge outside. Then check that the bonding and lone-pair electrons add up to the step 1 count. When several diagrams pass, formal charge picks the best: see the note on resonance and formal charge.

Check yourself

How many valence electrons does the hydroxide ion, OH⁻, have?
Show answerHide answer

Eight: 6+1=76 + 1 = 7 from the atoms, plus 1 for the negative charge.

Which atoms break the octet rule?

Fewer than eight. Boron has three valence electrons. In boron trifluoride, BF₃, boron forms three single bonds and has no lone pairs, so it has six electrons around it, and that is the accepted diagram.

More than eight (an expanded octet). Period 2 atoms (C, N, O, F) bond using only their 2s and 2p orbitals, which hold at most eight electrons, so they never exceed an octet. Atoms from period 3 onward, such as P, S, Cl and Xe, are larger and can bond to more atoms, so they can show 10 or 12 electrons.

MoleculeBonding pairs on central atomLone pairs on central atomElectrons around central atom
PCl₅5010
SF₆6012
XeF₄4212

Examiner's eye

Marks are lost for giving C, N, O or F more than eight electrons. Only atoms from period 3 onward can expand their octets.

Check yourself

Could a Lewis diagram show nitrogen with five bonds?
Show answerHide answer

No. Five bonds would put ten electrons around nitrogen, and a period 2 atom cannot hold more than eight.

Worked example 1: Formaldehyde, CH₂O

Question: Formaldehyde, CH₂O, has carbon as its central atom. (a) Calculate the total number of valence electrons. Determine (b) the number of bonding pairs and (c) the number of lone pairs in its Lewis diagram.

What tells you the method

A neutral molecule with a named central atom: count, connect, fill, then fix the central atom.

  1. Step 1: Count.

    C 4, H 2×12 \times 1, O 6: 4+2+6=124 + 2 + 6 = 12.

    Why

    Every valence electron must appear in the diagram.

  2. Step 2: Connect and fill.

    Bonds C–H, C–H and C–O use 6; oxygen takes three lone pairs (6), so all 12 are placed.

    Why

    Outer atoms get their octets first.

  3. Step 3: Fix the central atom.

    Carbon has only 6 electrons, so move one oxygen lone pair into a C=O double bond.

    Why

    A short central atom shares a neighbor's lone pair.

    AtomBondsLone pairsElectrons around it
    Ctwo single (to H), one double (to O)08
    Oone double28

Check it

Four bonding pairs and two lone pairs give 6×2=126 \times 2 = 12 electrons.

Answer

(a) 1212 valence electrons. (b) 44 bonding pairs. (c) 22 lone pairs.

Worked example 2: The cyanide ion, CN⁻

Question: Determine (a) the total number of valence electrons in the cyanide ion, CN⁻, and (b) the number of bonding pairs between C and N in its Lewis diagram.

What tells you the method

A charge on the formula: adjust the electron count first.

  1. Step 1: Count.

    C 4, N 5, plus 1 for the 1− charge: 1010.

    Why

    A negative charge means one extra electron.

  2. Step 2: Connect and fill.

    A single C–N bond uses 2; nitrogen takes three lone pairs (6) and carbon one (2). Carbon has only 4 electrons.

    Why

    Leftover electrons go on the remaining atom.

  3. Step 3: Form multiple bonds.

    Move two nitrogen lone pairs into the bond, making a triple bond, so each atom has three shared pairs and one lone pair: 8 electrons.

    Why

    One extra shared pair still leaves carbon at 6.

Check it

Three bonding pairs and two lone pairs give 10 electrons. Add brackets and the 1− charge.

Answer

(a) 1010 valence electrons. (b) 33 bonding pairs: a triple bond.

Worked example 3: An expanded octet in a class activity

Question: In a class activity, students recorded the electrons around the central atom in three fluorides.

MoleculeElectrons around central atom
BF₃6
NF₃8
SF₄not yet recorded

(a) Calculate the total number of valence electrons in SF₄. (b) Determine the number of lone pairs on sulfur. (c) Identify the molecule in the table whose central atom has fewer than eight electrons.

What tells you the method

Sulfur is in period 3, so expect leftover electrons on the central atom.

  1. Step 1: Count.

    S 6, F 4×7=284 \times 7 = 28: total 34.

    Why

    Every valence electron must be placed.

  2. Step 2: Connect and fill.

    Four S–F bonds use 8, and the fluorines' lone pairs use 24: 32 placed.

    Why

    Each fluorine is an outer atom with three lone pairs.

  3. Step 3: Place the leftovers.

    34−32=234 - 32 = 2 electrons go on sulfur as one lone pair, so sulfur has 10 electrons.

    Why

    Sulfur is in period 3, so it can exceed eight.

  4. Step 4: Read the table.

    Only BF₃ is below eight.

    Why

    Boron shares its three valence electrons in three bonds and has no lone pairs.

Check it

Four bonding pairs and 13 lone pairs give 17×2=3417 \times 2 = 34 electrons.

Answer

(a) 3434 valence electrons. (b) 11 lone pair on sulfur. (c) BF₃.

Your turn

Question: Determine the total number of lone pairs in the Lewis diagram of nitrogen trifluoride, NF₃, with nitrogen as the central atom.

  1. Step 1: Count.

    N 5, F 3×7=213 \times 7 = 21: total 26 valence electrons.

  2. Step 2: Connect and fill.

    Three N–F bonds use 6, and each F takes three lone pairs (18), placing 24.

  3. Step 3: Your go: place the leftover electrons and count every lone pair.

Show the full solutionHide the solution

Step 3. 26−24=226 - 24 = 2 electrons go on nitrogen as one lone pair, giving nitrogen 8 electrons. Lone pairs: 9 on the fluorines plus 1 on nitrogen.

Answer: NF₃ has 1010 lone pairs in total.

Traps

Trap

A double bond counts as one bonding pair.

It seems right because a double bond joins just one pair of atoms. But it holds two shared pairs (four electrons), and a triple bond three; count each pair when you total electrons or bonding pairs.

How many bonding pairs does carbon dioxide, O=C=O, contain?

Four: two in each C=O double bond.

Trap

The charge on an ion can be ignored when counting electrons.

It seems right because the charge sits outside the formula. But a 2− charge means two extra electrons and a 1+ charge one fewer.

How many valence electrons does the ammonium ion, NH₄⁺, have?

Eight: 5+4=95 + 4 = 9 from the atoms, minus 1 for the 1+ charge.

What's examined

On the AP® Chemistry exam (Unit 2: Compound Structure and Properties), Lewis diagrams appear in multiple-choice and free-response questions, often as the first step before shape or polarity. Expect to draw a diagram, count lone pairs, or justify whether an atom can exceed an octet. Show every lone pair, including those on outer atoms.

Practice questions

  1. Recall How many valence electrons are in the sulfite ion, SO₃²⁻?
  • A) 22
  • B) 24
  • C) 26
  • D) 28
Show answer

Answer: C. 6+3×6+2=266 + 3 \times 6 + 2 = 26.

Why the others are wrong:

  • A subtracts the two charge electrons instead of adding them.
  • B ignores the 2− charge.
  • D counts the charge twice.
  1. Apply In the Lewis diagram of the ion ICl₄⁻, iodine is the central atom. Determine the number of lone pairs on the iodine atom.
Show answer

Answer: Iodine carries 22 lone pairs.

Marking points:

  • Total: 7+4×7+1=367 + 4 \times 7 + 1 = 36 valence electrons.
  • Four I–Cl bonds use 8 and the chlorines' lone pairs use 24, leaving 4 on iodine: 2 lone pairs, 12 electrons in all.
  1. Apply In which molecule does the central atom have fewer than eight electrons around it?
  • A) BF₃
  • B) NF₃
  • C) PF₃
  • D) CF₄
Show answer

Answer: A. Boron forms three bonds and has no lone pairs, so it has 6 electrons.

Why the others are wrong:

  • B: nitrogen has three bonding pairs and one lone pair, 8 electrons.
  • C: phosphorus also has three bonding pairs and one lone pair, 8 electrons.
  • D: carbon has four bonding pairs, 8 electrons.
  1. Exam-style In a class activity, a student recorded these counts from Lewis diagrams.
SpeciesBonding pairs on central atomLone pairs on central atom
H₂O22
PCl₃31
XeF₄42
ClF₃31

Which row contains an error?

  • A) H₂O
  • B) PCl₃
  • C) XeF₄
  • D) ClF₃
Show answer

Answer: D. ClF₃ has 7+21=287 + 21 = 28 valence electrons; three bonds and the fluorines' lone pairs place 24, so 4 remain on chlorine as 2 lone pairs, not 1.

Why the others are wrong:

  • A is correct: 8 electrons, two bonds and two lone pairs on oxygen.
  • B is correct: 26 electrons leave one lone pair on phosphorus.
  • C is correct: 36 electrons leave two lone pairs on xenon.
  1. Exam-style Hydrazine, N₂H₄, has an N–N bond, and each nitrogen is bonded to two hydrogens. Calculate (a) the total number of valence electrons and (b) the total number of lone pairs in its Lewis diagram.
Show answer

Answer: (a) 1414 valence electrons. (b) 22 lone pairs.

Marking points:

  • (a) 2×5+4×1=142 \times 5 + 4 \times 1 = 14.
  • (b) Five single bonds use 10, leaving 4: one lone pair on each nitrogen, which gives each an octet.
  1. Exam-style A student draws a Lewis diagram for a hypothetical molecule NF₅, with five N–F single bonds. Which statement best explains why the diagram cannot be correct?
  • A) Fluorine cannot form single bonds.
  • B) Nitrogen is in period 2, so it cannot have more than eight electrons around it.
  • C) Nitrogen has only three valence electrons.
  • D) The molecule would have an odd number of valence electrons.
Show answer

Answer: B. Five bonds would put 10 electrons around nitrogen, and period 2 atoms hold at most eight.

Why the others are wrong:

  • A is wrong because fluorine forms one single bond in almost all its compounds.
  • C is wrong because nitrogen has five valence electrons.
  • D is wrong because 5+5×7=405 + 5 \times 7 = 40, an even number.

Key points

Recall, then reveal

Say the main points from memory first, then check them.

Show key pointsHide key points
  • Count valence electrons first: add one per negative charge, subtract one per positive charge.
  • Join outer atoms with single bonds, complete their octets, then put leftovers on the central atom.
  • If the central atom is short of eight, turn outer lone pairs into double or triple bonds.
  • Boron can have six electrons; atoms from period 3 onward can have 10 or 12; period 2 atoms never exceed eight.
  • Check the diagram: bonding-pair and lone-pair electrons must add up to the total count.

Keep learning

Explore AP Chemistry tutoring →

View the full Chemistry syllabus →

More in this unit

Compound Structure and Properties

All Lewis Diagrams and Molecular Shape notes

Part of Novark's AP Chemistry notes