Tutorials
How to Draw Lewis Dot Structures: A Step-by-Step Method With Worked Examples
How to draw Lewis dot structures in seven steps: count valence electrons, add bonds and lone pairs, check formal charge. Worked examples and practice problems.

A Lewis dot structure is a bookkeeping diagram. It accounts for every valence electron in a molecule or ion and shows where each one sits: shared between two atoms as a bond, or held by one atom as a lone pair. G. N. Lewis proposed the idea in 1916, and it is still the first thing chemistry courses teach about bonding because almost everything else, from formal charge to molecular shape, is read off it.
Drawing one is not a matter of intuition. The same seven steps work for nearly every molecule and polyatomic ion you will meet in general chemistry, and the cases where they need adjusting (boron, phosphorus, sulfur, odd electron counts) follow rules of their own. This guide gives the method, works through seven examples from water to sulfate, covers resonance, ions and the octet-rule exceptions, and ends with practice problems and answers. When you want to check an answer, the free Lewis dot structure generator draws the structure for any formula you type, with formal charges and the VSEPR shape.
The method in seven steps
- Count the valence electrons of every atom, then add one electron for each negative charge or remove one for each positive charge.
- Choose the central atom: the least electronegative atom that is not hydrogen.
- Join each outer atom to the centre with a single bond. Each bond uses two electrons.
- Complete the octets of the outer atoms with lone pairs (hydrogen needs only two electrons, which its bond already gives it).
- Put any electrons still left on the central atom as lone pairs.
- If the central atom has fewer than eight electrons, turn outer lone pairs into double or triple bonds until it has eight, unless that would make the formal charges worse.
- Check the formal charges. They must add up to the overall charge, and the best structure keeps them as close to zero as possible.
Each step is explained below, then applied to real molecules.
Step 1: Count the valence electrons
Valence electrons are the outer-shell electrons, the only ones that take part in bonding. For main-group elements you can read the number straight from the periodic table group.
| Group | 1 | 2 | 13 | 14 | 15 | 16 | 17 | 18 |
|---|---|---|---|---|---|---|---|---|
| Valence electrons | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 (helium 2) |
| Examples | H, Li, Na, K, Cs | Be, Mg, Ca, Sr | B, Al | C, Si | N, P | O, S | F, Cl, Br, I | Ne, Ar, Xe |
Add the values for every atom in the formula, then adjust for charge:
- Negative ion: add one electron per negative charge. Sulfate, SO42−, has 6 + (4 × 6) + 2 = 32.
- Positive ion: subtract one electron per positive charge. Ammonium, NH4+, has 5 + (4 × 1) − 1 = 8.
This total is fixed. Every later step only moves electrons around; the count you finish with must equal the count you started with. Getting it wrong here is the single most common reason a Lewis structure fails, so write the arithmetic down.
If you are unsure where an element's valence electrons come from, its electron configuration shows them: the orbital diagram generator fills the orbitals for any element, and the Bohr model maker draws the shells, with the outer shell holding the valence electrons.
Step 2: Choose the central atom
- The central atom is usually the least electronegative atom other than hydrogen. In practice it is often the atom that appears only once in the formula: C in CO2, N in NO3−, S in SO42−, P in PCl5.
- Hydrogen is never central. It can form only one bond. Fluorine is always an outer atom too.
- Carbon is central whenever it appears with H, N, O or the halogens.
- In oxoacids the hydrogens bond to oxygen, not to the central atom: nitric acid is H–O–N, not H–N.
Steps 3 to 5: Bonds first, then outer octets, then the centre
Draw a single bond (a line, which stands for two shared electrons) from the central atom to each outer atom, and subtract two electrons per bond from your total.
Then complete the outer atoms first. Give each one enough lone pairs (pairs of dots) to reach eight electrons, counting the bond: a halogen or oxygen with one single bond needs three lone pairs. Hydrogen already has its two.
Whatever is left goes on the central atom as lone pairs. If nothing is left and the central atom has fewer than eight electrons, go to step 6.
Step 6: Make multiple bonds when the centre is short
When the central atom ends step 5 with fewer than eight electrons, take a lone pair from an outer atom and share it with the centre as a second bond. One lone pair moved makes a double bond; two moved to the same atom make a triple bond. Repeat until the centre has an octet.
Do this only where it helps. Moving a lone pair from fluorine to boron completes boron's octet but leaves fluorine with a positive formal charge, which is worse than leaving boron short (see BF3 below). Step 7 is how you tell.
Step 7: Check formal charges
Formal charge tells you how the electrons in your drawing compare with the atom's own valence count:
formal charge = valence electrons − lone-pair electrons − number of bonds
Count each line as one bond and each dot as one electron. For an oxygen with two lone pairs and a double bond: 6 − 4 − 2 = 0. For an oxygen with three lone pairs and a single bond: 6 − 6 − 1 = −1.
The formal charges in a structure must add up to the overall charge: zero for a neutral molecule, −2 for sulfate. When more than one structure is possible, prefer the one that:
- has formal charges of zero, or as close to zero as possible;
- does not put charges of the same sign on neighbouring atoms;
- puts any negative formal charge on the most electronegative atom.
A quick check: needed minus available
For molecules that obey the octet rule there is a shortcut that tells you how many bonds to expect before you start. Count the electrons every atom needs for a full shell (8 each, 2 for hydrogen), subtract the electrons available (your valence total), and the difference is the number of shared electrons. Halve it for the number of bonds.
| Species | Needed | Available | Shared | Bonds |
|---|---|---|---|---|
| CO2 | 3 × 8 = 24 | 16 | 8 | 4 (two double bonds) |
| HCN | 2 + 8 + 8 = 18 | 10 | 8 | 4 (one single, one triple) |
| NO3− | 4 × 8 = 32 | 24 | 8 | 4 (one double, two single) |
The shortcut does not apply to electron-deficient or expanded-octet species, so use it as a check, not a replacement for the steps.
Worked examples
Every structure below was drawn by our Lewis dot structure generator, with formal charges shown in red where they are not zero.
Water, H2O (8 valence electrons)
Valence electrons: 2 × 1 (H) + 6 (O) = 8. Oxygen is central. Two O–H bonds use 4 electrons; the hydrogens are already full, so the remaining 4 go on oxygen as two lone pairs. Oxygen now has 8 electrons, and every formal charge is zero. The four electron domains around oxygen (two bonds, two lone pairs) give a tetrahedral electron geometry and a bent molecule with a bond angle of about 104.5°.
Carbon dioxide, CO2 (16 valence electrons)
Valence electrons: 4 + 2 × 6 = 16. Carbon is central. Two single bonds use 4; completing both oxygen octets uses the other 12, which leaves carbon with only 4 electrons. Move one lone pair from each oxygen into a second bond: O=C=O. Now every atom has an octet and every formal charge is zero (oxygen: 6 − 4 − 2 = 0; carbon: 4 − 0 − 4 = 0).
The alternative, a triple bond to one oxygen and a single bond to the other, also gives every atom an octet, but it leaves +1 on the triple-bonded oxygen and −1 on the other. The formal-charge check rejects it. CO2 is linear, 180°.
Ammonium ion, NH4+ (8 valence electrons)
Valence electrons: 5 + 4 × 1 − 1 = 8. Four N–H bonds use all 8, and nitrogen has its octet with no lone pairs. Its formal charge is 5 − 0 − 4 = +1, which matches the charge of the ion. Because it is an ion, the whole structure goes in square brackets with the charge outside. Ammonium is tetrahedral, 109.5°. Notice that nitrogen has four bonds and a positive charge here, not five bonds: a period 2 atom can never hold more than eight electrons.
Nitrate ion, NO3− (24 valence electrons)
Valence electrons: 5 + 3 × 6 + 1 = 24. Three single bonds use 6, the three oxygen octets use 18, and nitrogen is left with 6 electrons. One oxygen lone pair becomes a double bond. Formal charges: nitrogen +1, the double-bonded oxygen 0, each single-bonded oxygen −1, which sums to −1 as it must.
The double bond could have gone to any of the three oxygens, so nitrate has three equivalent resonance structures. The real ion is an average of them: all three N–O bonds are identical, each somewhere between a single and a double bond. Nitrate is trigonal planar, 120°.
Sulfate ion, SO42− (32 valence electrons)
Valence electrons: 6 + 4 × 6 + 2 = 32. Four S–O single bonds use 8, and the four oxygen octets use the other 24. Every atom has an octet, so the steps stop here, with sulfur at +2 and each oxygen at −1 (sum −2).
Sulfate is where textbooks disagree, and it is worth knowing why. Sulfur is in period 3, so it is allowed more than eight electrons, and applying the formal-charge rule strictly gives a different answer: convert two oxygen lone pairs into S=O double bonds and sulfur's formal charge drops to 0, with −1 left on each of the two single-bonded oxygens. That structure has 12 electrons around sulfur and needs six resonance forms to show that all four S–O bonds are the same.
- The expanded-octet structure (two S=O) is what the "minimise formal charge" rule produces and what many general chemistry courses expect.
- The octet structure (four S–O, +2 on sulfur) is the one that bonding analyses support: sulfur's d orbitals contribute very little, so the real ion is better described by single bonds with charge separation (Suidan et al., 1995, in the sources).
Both give the correct shape, tetrahedral at 109.5°. Use whichever your course or exam board asks for. Our generator draws the octet structure.
Boron trifluoride, BF3 (24 valence electrons)
Valence electrons: 3 + 3 × 7 = 24. Three B–F bonds use 6 and the fluorine octets use 18, leaving boron with only 6 electrons. Step 6 says to try a double bond, but a B=F bond would put −1 on boron and +1 on fluorine, the most electronegative element. With single bonds every formal charge is zero, so that is the structure to draw. Boron's empty slot is real chemistry: it is why BF3 readily accepts a lone pair from ammonia. BF3 is trigonal planar, 120°.
Phosphorus pentachloride, PCl5 (40 valence electrons)
Valence electrons: 5 + 5 × 7 = 40. Five P–Cl bonds use 10 and the five chlorine octets use 30, so nothing is left over. Phosphorus has 10 electrons, an expanded octet, which is allowed because phosphorus is in period 3. Every formal charge is zero. The shape is trigonal bipyramidal, with 120° angles around the middle and 90° to the top and bottom atoms.
Resonance structures
When a double bond could sit in more than one equivalent position, as in nitrate, carbonate (CO32−) or ozone (O3), draw every version and join them with a single double-headed arrow (↔). Only the electrons move between resonance structures; the atoms stay where they are.
Two points cause most of the confusion:
- The molecule does not flip between the forms. It is one structure, the resonance hybrid, and each form is an incomplete picture of it. That is why the three N–O bonds in nitrate all have the same length.
- The double-headed resonance arrow is not an equilibrium arrow (⇌). Using the wrong one is marked wrong in most courses.
When the octet rule does not apply
| Exception | What happens | Examples |
|---|---|---|
| Electron-deficient centre | Beryllium is stable with 4 electrons and boron with 6; forcing an octet gives worse formal charges | BeCl2 (gas phase), BF3, BCl3 |
| Expanded octet | Atoms in period 3 and below can hold 10 or 12 electrons | PCl5 (10), SF6 (12), XeF4 (12) |
| Odd number of electrons | One electron must stay unpaired, so at least one atom misses an octet (a radical) | NO (11), NO2 (17), ClO2 (19) |
The rule of thumb: C, N, O and F never exceed eight electrons. If your nitrogen has five bonds, you have made a mistake; the fix is usually a formal charge, as in ammonium.
Lewis dot symbols for single atoms
For a single atom, a Lewis dot symbol is the element symbol with one dot per valence electron. Place the dots on the four sides of the symbol, one per side first, and pair them only from the fifth electron onwards.
| Atom | Group | Valence electrons | Lewis dot symbol |
|---|---|---|---|
| Sodium, Na | 1 | 1 | Na with one dot |
| Calcium, Ca; strontium, Sr | 2 | 2 | Ca or Sr with two single dots on different sides |
| Carbon, C; silicon, Si | 14 | 4 | C or Si with four single dots, one on each side |
| Nitrogen, N; phosphorus, P | 15 | 5 | one pair and three single dots |
| Oxygen, O; sulfur, S | 16 | 6 | two pairs and two single dots |
| Chlorine, Cl; iodine, I | 17 | 7 | three pairs and one single dot |
| Argon, Ar | 18 | 8 | four pairs, one on each side |
The single dots are the electrons available for bonding. Silicon's four unpaired dots are why it forms four bonds, as in SiCl4 or SiI4 (32 valence electrons, four single bonds, three lone pairs on each halogen, tetrahedral), and argon's four pairs are why it forms none.
Lewis dot diagrams for ions and ionic compounds
Cations. A main-group metal loses its valence electrons, so its Lewis symbol has no dots left. Write the symbol with the charge: Na+, Ca2+, Sr2+. Some courses put the cation in brackets, [Ca]2+; both are accepted.
Anions. A nonmetal gains electrons until it has eight. Draw all eight dots, put the symbol and dots in square brackets, and write the charge outside the top-right corner: [:Cl:]− with four pairs, [:O:]2− with four pairs.
Ionic compounds. Draw the ions side by side, not joined by a line, because no electrons are shared. Caesium iodide, CsI, is Cs+ next to an iodide ion with eight dots in brackets; magnesium oxide is Mg2+ next to O2− with eight dots. The charges must balance: calcium chloride needs one Ca2+ and two separate Cl− ions.
A polyatomic ion with competing structures: thiocyanate, SCN−
Thiocyanate has 6 + 4 + 5 + 1 = 16 valence electrons, with carbon in the centre. Three arrangements give every atom an octet:
| Structure | Formal charges (S, C, N) | Verdict |
|---|---|---|
| S=C=N, two lone pairs on S and on N | 0, 0, −1 | Best: the negative charge is on nitrogen, the more electronegative end |
| S–C≡N, three lone pairs on S, one on N | −1, 0, 0 | Also important; real thiocyanate is a mix of these two |
| S≡C–N, one lone pair on S, three on N | +1, 0, −2 | Poor: large charges |
Draw the first two as resonance structures, in brackets with a − charge.
From the Lewis structure to the shape
Once the structure is drawn, VSEPR theory turns it into a 3D shape. Count the electron domains on the central atom: each bond counts once whether it is single, double or triple, and each lone pair counts once.
| Domains | Lone pairs on the centre | Molecular shape | Example |
|---|---|---|---|
| 2 | 0 | Linear, 180° | CO2 |
| 3 | 0 | Trigonal planar, 120° | BF3, NO3− |
| 4 | 0 | Tetrahedral, 109.5° | NH4+, SO42− |
| 4 | 1 | Trigonal pyramidal, about 107° | NH3 |
| 4 | 2 | Bent, about 104.5° | H2O |
| 5 | 0 | Trigonal bipyramidal | PCl5 |
| 6 | 2 | Square planar | XeF4 |
Lewis structures have one well-known blind spot. They draw oxygen, O2, as O=O with every electron paired, yet liquid oxygen is attracted to a magnet because O2 has two unpaired electrons. Molecular orbital theory explains it; our guide on how to draw a molecular orbital diagram and the molecular orbital diagram tool show how.
Ten common mistakes
- Counting all the electrons instead of the valence electrons. Oxygen contributes 6, not 8.
- Forgetting the charge, or adding electrons for a cation instead of removing them.
- Putting hydrogen in the middle or giving it more than one bond.
- Leaving outer atoms short of an octet because the lone pairs were never drawn. Every lone pair counts toward the total.
- Giving C, N, O or F more than eight electrons.
- Forcing an octet on boron with a B=F double bond.
- Counting a double bond as two electrons. A double bond is four electrons; a triple bond is six.
- Forgetting the brackets and charge on a polyatomic ion.
- Using an equilibrium arrow between resonance structures instead of ↔.
- Skipping the formal-charge check. If the charges do not add up to the overall charge, an electron has gone missing or been added.
Practice problems
Draw each one with the seven steps, then check against the answers.
- NH3
- HCN
- CH2O (formaldehyde)
- O3 (ozone)
- CO32− (carbonate)
- CN− (cyanide)
- SF6
- XeF4
- NO (nitric oxide)
- CsI (caesium iodide)
Answers
| # | Valence electrons | Structure | Formal charges and notes |
|---|---|---|---|
| 1 | 8 | Three N–H bonds, one lone pair on N | All 0. Trigonal pyramidal |
| 2 | 10 | H–C≡N, one lone pair on N | All 0. Linear |
| 3 | 12 | C central with two C–H bonds and C=O; two lone pairs on O | All 0. Trigonal planar |
| 4 | 18 | O=O–O: central O has one lone pair, double-bonded O two, single-bonded O three | Central O +1, single-bonded O −1. Two resonance structures. Bent |
| 5 | 24 | C with one C=O and two C–O; two lone pairs on the double-bonded O, three on each other O | Each single-bonded O −1. Three resonance structures, brackets, 2− |
| 6 | 10 | C≡N with one lone pair on each atom | C −1, N 0. Brackets, − |
| 7 | 48 | Six S–F bonds, three lone pairs on each F | All 0. 12 electrons on S. Octahedral |
| 8 | 36 | Four Xe–F bonds, three lone pairs on each F, two lone pairs on Xe | All 0. 12 electrons on Xe. Square planar |
| 9 | 11 | N=O with two lone pairs on O, one lone pair and one unpaired electron on N | All 0. A radical: N has only 7 electrons |
| 10 | 8 | Cs+ beside [I]− with eight dots | Ionic: no bond line between the ions |
Check your structure in seconds
Once you can do it by hand, checking is where a tool earns its place. Type a formula into the Lewis dot structure generator, writing a charge after a space (NO3 -, SO4 2-, NH4+), and it counts the valence electrons, picks the central atom, draws the bonds and lone pairs, and lists the formal charge on each atom with the electron geometry, molecular shape and bond angle. It draws one structure per formula, so for resonance species draw the other forms yourself, and it handles molecules with one central atom; for longer chains, apply the steps atom by atom. The drawing exports as PNG or SVG for worksheets and slides.
For the electrons behind the dots, use the orbital diagram generator or the Bohr model maker. For reaction schemes and mechanism figures beyond a single molecule, see the chemistry diagram generator.
Frequently asked questions
What is a Lewis dot structure?
A diagram of a molecule or ion that shows every valence electron: shared pairs as lines between atoms (bonds) and unshared pairs as dots on one atom (lone pairs). It is also called a Lewis structure, Lewis diagram or electron dot structure.
How do you know how many dots to draw?
Add up the valence electrons of every atom (the group number for groups 1 and 2, the group number minus 10 for groups 13 to 18), add one per negative charge and subtract one per positive charge. Every electron in that total must appear in the final drawing as part of a bond or a lone pair.
What is the difference between a Lewis dot symbol and a Lewis structure?
A Lewis dot symbol shows one atom or monatomic ion with its valence electrons as dots, such as Cl with seven dots. A Lewis structure shows a whole molecule or polyatomic ion, with bonds between the atoms.
How do you choose the central atom?
Pick the least electronegative atom that is not hydrogen. It is usually the atom that appears once in the formula. Hydrogen and fluorine are always outer atoms, and carbon is central in organic molecules.
When do you use a double or triple bond?
Only when the central atom is still short of eight electrons after the outer atoms have their octets and the leftover electrons are placed. Move outer lone pairs into bonds one at a time, and stop if doing so would make the formal charges worse, as with boron.
How do you draw the Lewis dot diagram for a cation?
For a main-group metal ion, write the element symbol with no dots, because the atom has lost its valence electrons, and add the charge as a superscript: Na+, Ca2+. For a polyatomic cation such as NH4+, draw the full structure with one electron removed per positive charge and enclose it in brackets with the charge outside.
How do you calculate formal charge?
Formal charge = valence electrons − lone-pair electrons − number of bonds. The formal charges in a structure must add up to the overall charge of the molecule or ion.
Can an atom have more than eight electrons in a Lewis structure?
Yes, if it is in period 3 or below: phosphorus in PCl5 has 10 and sulfur in SF6 has 12. Period 2 atoms (C, N, O, F) cannot.
Why do some molecules need resonance structures?
Because a single Lewis structure cannot show bonds that are equal in reality. In nitrate the double bond could be drawn to any of the three oxygens, so you draw all three; the real ion is the average, with three identical N–O bonds.
Is there a Lewis structure generator that shows formal charges?
Yes. Our free Lewis dot structure generator runs in the browser, needs no sign-up, and shows the formal charge on every atom along with the VSEPR shape and bond angle.
Related guides and tools
- Lewis dot structure generator: draws the structure for any formula, with formal charges and shape.
- Orbital diagram generator and Bohr model maker: where the valence electrons come from.
- Molecular orbital diagram and the guide on how to draw a molecular orbital diagram: bonding beyond Lewis structures.
- ChemDraw alternatives for chemical structures: software for drawing larger molecules.
Sources
- OpenStax, Chemistry 2e, 7.3 Lewis Symbols and Structures: valence electrons, the octet rule and its exceptions.
- OpenStax, Chemistry 2e, 7.4 Formal Charges and Resonance: the formal-charge formula and the rules for choosing between structures.
- OpenStax, Chemistry 2e, 7.1 Ionic Bonding: how main-group atoms form cations and anions.
- OpenStax, Chemistry 2e, 7.6 Molecular Structure and Polarity: VSEPR shapes and bond angles.
- OpenStax, Chemistry 2e, 8.4 Molecular Orbital Theory: why O2 is paramagnetic.
- Lewis, G. N. (1916). The atom and the molecule. Journal of the American Chemical Society, 38(4), 762–785.
- Suidan, L., Badenhoop, J. K., Glendening, E. D., & Weinhold, F. (1995). Common textbook and teaching misrepresentations of Lewis structures. Journal of Chemical Education, 72(7), 583–586.