How to draw a Lewis structure

How to draw a Lewis structure in six steps, with one you can build as you read. Covers resonance, expanded octets and formal charge.

Back to Reference
Nov 30, 2026STEMDiagram

A Lewis structure is bookkeeping. You have a fixed number of valence electrons, and every one of them has to end up as part of a bond or a lone pair. Build one here, then read what each step was doing.

24 of 24 electrons placed: 6 in bonds, 18 in lone pairs

N O O O
Give the outer atoms their octets, in pairs. Hydrogen needs none.

Count the electrons

Add the valence electrons of every atom: hydrogen 1, boron 3, carbon 4, nitrogen 5, oxygen 6, the halogens 7, xenon 8. A negative charge means extra electrons, so NO₃⁻ gets one more. A positive charge means missing ones, so NH₄⁺ loses one.

Choose the center

Pick the least electronegative atom that is not hydrogen. Hydrogen holds two electrons and can only sit at an end. In oxyacids such as H₂SO₄ the hydrogens sit on oxygen, not on the center. This is the most common mistake in textbook answers.

Bond, then fill the outside

One single bond to each outer atom, then lone pairs on the outer atoms until each has eight. Leftover pairs go on the center, even when that gives it more than eight, as in SF₄ and XeF₄.

Fix a short center

If carbon, nitrogen or oxygen in the middle has fewer than eight, move a lone pair in from a neighbor to make a double or triple bond. When several neighbors could supply it, each choice is a resonance structure. Nitrate has three. Beryllium and boron are allowed to stay short: BeCl₂ has four electrons around beryllium and BF₃ six around boron.

Check the formal charges

formal charge = valence electrons − lone-pair electrons − bonds

They must add up to the charge of the molecule or ion. Carbon, nitrogen, oxygen and fluorine never exceed eight electrons. For sulfur, phosphorus and chlorine, many courses add double bonds to oxygen to bring the charges down. This site does that: it adds them until the center has no formal charge. Other courses keep the octet and accept the charges. Follow your course: both are in use.

A full example: the carbonate ion

Carbonate is CO₃²⁻. Carbon brings 4 valence electrons, the three oxygens bring 18, and the charge adds 2, for 24 in total. Carbon is the least electronegative, so it goes in the center.

Three single bonds use 6 electrons. Three lone pairs on each oxygen use the other 18. Now every oxygen has eight, but carbon has only six, so one oxygen turns a lone pair into a second bond. Carbon reaches eight and no electrons are left over.

Check the charges. Carbon is 4 − 0 − 4 = 0. The double-bonded oxygen is 6 − 4 − 2 = 0. Each single-bonded oxygen is 6 − 6 − 1 = −1. The sum is −2, which matches the ion. Any of the three oxygens could have made the double bond, so this Lewis structure has three resonance forms.

Mistakes that cost marks

  1. Forgetting the charge when counting. A wrong total at the start makes every later step wrong. Count again at the end: bonds times two, plus lone pairs times two, must equal the total.
  2. Giving carbon or nitrogen ten electrons. If a second-row atom needs more than four pairs, one of the bonds you added should be a lone pair on a neighbor.
  3. Stopping when the octets are full. Two drawings can both satisfy the octet rule. Formal charge decides between them: prefer charges near zero, and put any negative charge on the more electronegative atom.
  4. Leaving the brackets off an ion. A Lewis structure of an ion needs square brackets and the overall charge at the upper right.
  5. Treating resonance forms as different molecules. They differ only in where electrons are drawn. If an atom has moved, it is an isomer.

When one Lewis structure is not enough

Dioxygen has two unpaired electrons, and no ordinary Lewis structure shows them. Molecules with an odd number of electrons, such as NO, cannot give every atom a full octet. Formulas such as C₂H₆O describe two different compounds, so you need to know which atom is bonded to which before you start. To go from the drawing to a shape, read why lone pairs bend molecules.

Try any formula in the Lewis structure generator.