Ends Dec 1, PT
SciFig
Tutorials·

How to Draw Lewis Dot Structures Step by Step (+ Examples)

How to draw Lewis dot structures step by step: count valence electrons, place bonds, fill octets and check formal charges, with worked examples and exceptions.

SciFig Team
SciFig Team
SciFig editorial team

How to draw Lewis dot structures step by step: count electrons, connect atoms, fill octets, check charges.

A Lewis structure shows how the valence electrons of a molecule or ion are arranged: shared pairs as bonds between atoms and unshared pairs as dots. Once you can count electrons reliably, every structure follows the same six steps. This guide walks through those steps, works through water, carbon dioxide, ammonia and nitrate by hand, and covers formal charge, resonance and the molecules that break the octet rule.

A Lewis dot structure pattern on grid paper, three atoms joined by two double bonds with two lone pairs on each outer atom, above six step cards linked by arrows
A Lewis dot structure pattern on grid paper, three atoms joined by two double bonds with two lone pairs on each outer atom, above six step cards linked by arrows

What is a Lewis structure?

A Lewis structure, also called a Lewis dot structure or electron dot diagram, is a drawing of a molecule's valence electrons. Each line between two atoms is a bond made of two shared electrons, a double line is four shared electrons, and a triple line is six. Pairs of dots on a single atom are lone pairs that belong to that atom only.

Lewis structures rest on the octet rule: main-group atoms tend to share or transfer electrons until each one is surrounded by eight valence electrons. Hydrogen is the exception from the start, since it is complete with two electrons (a duet). Only valence electrons appear; inner-shell electrons are left out.

How do you draw Lewis dot structures? The 6 steps

Six numbered panels building the Lewis structure of carbon dioxide: 16 valence electrons, carbon central, single bonds, oxygen octets, two double bonds, zero formal charges
Six numbered panels building the Lewis structure of carbon dioxide: 16 valence electrons, carbon central, single bonds, oxygen octets, two double bonds, zero formal charges

These six steps work for almost every molecule and polyatomic ion you meet in general chemistry.

Step 1: Count the total valence electrons

Add up the valence electrons of every atom. For main-group elements, the count matches the group: group 1 has 1, group 2 has 2, and groups 13 to 18 have 3 to 8 (helium, with 2, is the one exception in group 18). Then adjust for charge: add one electron for each negative charge and subtract one for each positive charge.
ElementGroupValence electrons
H11
B133
C144
N, P155
O, S166
F, Cl, Br, I177
Example: the nitrate ion NO₃⁻ has 5 + (3 × 6) + 1 = 24 valence electrons.

Step 2: Choose the central atom

The central atom is usually the least electronegative atom that is not hydrogen, and often the one that appears only once in the formula. Carbon is central in CO₂ and CH₄, nitrogen in NH₃ and NO₃⁻, and sulfur in SO₂. Hydrogen and fluorine are never central, because each forms only one bond.

Step 3: Draw the skeleton with single bonds

Connect each outer atom to the central atom with a single bond. Every single bond uses two electrons, so subtract two from your total for each bond you draw.

Step 4: Complete the octets of the outer atoms

Place the remaining electrons as lone pairs on the outer atoms until each has eight electrons, counting the bond it already shares. Hydrogen stops at two.

Step 5: Place leftover electrons on the central atom, then form multiple bonds

Put any electrons still left over on the central atom as lone pairs. If the central atom now has fewer than eight electrons, move a lone pair from an outer atom into the bond to make a double bond, and repeat until the central atom has an octet. Carbon, nitrogen, oxygen and sulfur are the atoms that most often form double and triple bonds.

Step 6: Check the formal charges

Calculate the formal charge on each atom (the formula is in the next section). The formal charges must add up to the overall charge of the molecule or ion. If you can draw more than one valid structure, choose the one whose formal charges are closest to zero, with any negative charge on the more electronegative atom.

Finally, count every electron in your drawing. The number must equal the total from Step 1.

Worked examples: H₂O, CO₂, NH₃ and NO₃⁻

Lewis structures of water, carbon dioxide, ammonia and the nitrate ion, with lone pairs as dot pairs and nitrate in brackets with its formal charges and negative charge
Lewis structures of water, carbon dioxide, ammonia and the nitrate ion, with lone pairs as dot pairs and nitrate in brackets with its formal charges and negative charge

Water (H₂O)

  1. Valence electrons: (2 × 1) + 6 = 8.
  2. Oxygen is central; hydrogen can only be terminal.
  3. Two O–H single bonds use 4 electrons, leaving 4.
  4. Each hydrogen already has its two electrons.
  5. The remaining 4 electrons go on oxygen as two lone pairs, giving oxygen an octet.
  6. Formal charges: all zero.

Carbon dioxide (CO₂)

  1. Valence electrons: 4 + (2 × 6) = 16.
  2. Carbon is central.
  3. Two C–O single bonds use 4 electrons, leaving 12.
  4. Six electrons go on each oxygen, which completes both oxygen octets and uses all 12.
  5. Carbon now has only 4 electrons, so move one lone pair from each oxygen into a bond. The result is O=C=O, with two lone pairs on each oxygen.
  6. Formal charges: all zero.

Ammonia (NH₃)

  1. Valence electrons: 5 + (3 × 1) = 8.
  2. Nitrogen is central.
  3. Three N–H bonds use 6 electrons, leaving 2.
  4. The hydrogens are complete.
  5. The last 2 electrons form one lone pair on nitrogen, giving it an octet.
  6. Formal charges: all zero.

Nitrate ion (NO₃⁻)

  1. Valence electrons: 5 + (3 × 6) + 1 = 24.
  2. Nitrogen is central.
  3. Three N–O single bonds use 6 electrons, leaving 18.
  4. Six electrons go on each oxygen, which uses all 18.
  5. Nitrogen has only 6 electrons, so one oxygen shares a lone pair to make an N=O double bond.
  6. Formal charges: nitrogen +1, the double-bonded oxygen 0, and each single-bonded oxygen −1, for a total of −1. Write the structure in square brackets with the charge outside: [NO₃]⁻.

How do you calculate formal charge in a Lewis structure?

Formal charge tells you how an atom's electrons in the drawing compare with the electrons it brings as a neutral atom:

Formal charge = valence electrons − nonbonding electrons − ½ × bonding electrons

Nonbonding electrons are the dots on that atom; bonding electrons are all the electrons in the bonds it forms. In the nitrate structure above:

AtomValence electronsNonbonding electronsBonding electronsFormal charge
N5085 − 0 − 4 = +1
O (double bond)6446 − 4 − 2 = 0
O (single bond)6626 − 6 − 1 = −1

The sum, +1 + 0 + (−1) + (−1) = −1, matches the ion's charge. A structure with formal charges of zero on every atom, like H₂O or CO₂, is usually the best one you can draw.

What are resonance structures?

When a double bond can sit in more than one equivalent position, the molecule has resonance structures. Nitrate has three: the double bond can go to any of the three oxygens. Ozone (O₃, 18 valence electrons) has two, with the double bond on either side of the central oxygen, which carries a formal charge of +1 while the single-bonded oxygen carries −1.
The two resonance structures of ozone joined by a double-headed arrow, with formal charges of +1 on the central oxygen and −1 on the single-bonded oxygen
The two resonance structures of ozone joined by a double-headed arrow, with formal charges of +1 on the central oxygen and −1 on the single-bonded oxygen
Draw every resonance form, connect them with a double-headed arrow (↔), and keep the atoms in the same positions; only electrons move. The real molecule is a blend of the forms, which is why both O–O bonds in ozone have the same length, somewhere between a single and a double bond.

Exceptions to the octet rule

Some molecules cannot give every atom eight electrons. Recognizing them saves you from forcing a wrong structure.

ExceptionExampleValence electronsWhat the central atom has
Odd number of electronsNO, NO₂11, 17One unpaired electron, so one atom stays short of an octet
Incomplete octetBF₃, BeCl₂24, 16Boron has 6 electrons, beryllium has 4
Expanded octetPCl₅, SF₆40, 48Phosphorus has 10 electrons, sulfur has 12
  • Odd-electron molecules (radicals) have an odd total, so at least one electron stays unpaired. Put it on the less electronegative atom, which is nitrogen in NO.
  • Incomplete octets occur mainly with boron and beryllium, which are stable with fewer than eight electrons in these compounds.
  • Expanded octets are only possible for elements in period 3 and below, such as phosphorus, sulfur, chlorine and xenon. Carbon, nitrogen, oxygen and fluorine never exceed eight electrons.

How do you draw Lewis structures for ionic compounds?

Ionic compounds transfer electrons instead of sharing them, so there is no bond line. Draw each ion separately with its own brackets and charge. For sodium chloride, sodium gives up its one valence electron and becomes Na⁺ with no dots, while chlorine gains it and becomes [Cl]⁻ with eight dots. For polyatomic ions such as NO₃⁻ or NH₄⁺ (8 valence electrons, nitrogen formal charge +1), draw the covalent structure inside the brackets and write the charge outside.

Common mistakes and quick checks

  • Forgetting the charge in the electron count. NO₃⁻ has 24 electrons, not 23.
  • Putting hydrogen in the center. Hydrogen forms one bond and is always terminal.
  • Giving carbon, nitrogen or oxygen more than eight electrons. Second-period atoms cannot expand their octet.
  • Using double bonds too early. Fill outer atoms first; only make a multiple bond when the central atom is short of an octet.
  • Losing electrons along the way. The dots and bond electrons in the finished drawing must add up to the Step 1 total.
  • Skipping formal charges. They tell you which of several valid structures is the best one and are needed for resonance.

Quick reference: common molecules

Molecule or ionValence electronsCentral atomBonds to central atomLone pairs on central atomShape
H₂O8O2 single2Bent (about 104.5°)
NH₃8N3 single1Trigonal pyramidal (about 107°)
CH₄8C4 single0Tetrahedral (109.5°)
CO₂16C2 double0Linear (180°)
HCN10C1 single, 1 triple0Linear
SO₂18S1 single, 1 double (resonance)1Bent
NO₃⁻24N2 single, 1 double (resonance)0Trigonal planar
CO₃²⁻24C2 single, 1 double (resonance)0Trigonal planar

The last two columns connect a Lewis structure to molecular shape: count the bonding groups and lone pairs around the central atom, and VSEPR theory predicts the geometry.

Draw clean Lewis structures for slides, worksheets and papers

Working out a structure by hand is how you learn it. Turning it into a clean scientific figure for a lecture slide, a worksheet answer key or a paper is a separate job. The SciFig Lewis dot structure generator draws the structure from the molecule or ion you type, with bonds, lone pairs, formal charges, brackets for ions and resonance forms joined by a double-headed arrow. Change any label in place, convert the figure into an editable SVG to move a bond or a lone pair, and export SVG, PNG, JPG or PPTX.
For larger chemistry figures, such as reaction schemes or several structures in one panel, the chemistry structure generator builds them from a description, and the electron configuration diagram generator shows where the valence electrons in Step 1 come from. SciFig runs in the browser on a computer, tablet or phone, and you can start free.

Create Scientific Figures Now

Describe your scientific figure in natural language — get publication-ready illustrations in minutes.

Try Free

Frequently Asked Questions

Keep going

Recommended resources

Templates, tools, and further reading for your research

Call to action background

Ready to start?

Publication-ready scientific figures, in minutes

Start Creating Free

Free to start · No credit card required · Built for researchers