Lewis structure generator with steps

How to Draw Lewis Structures Step by Step

Use this method whenever you need to generate a Lewis structure by hand. It works for many neutral molecules and polyatomic ions, while the exception sections explain where resonance, incomplete octets and expanded valence shells require extra care.

Before you start

A Lewis structure accounts for valence electrons, not every core electron. Lines represent shared electron pairs and dots represent nonbonding electrons. The final drawing should use the correct total electron count and make formal charges as reasonable as possible.

Fast checklist: electrons → skeleton → single bonds → terminal octets → central atom → multiple bonds → formal charges → resonance.

The six-step method

  1. Count total valence electrons.
    Add the group valence of every atom. Add one electron for each negative charge and subtract one for each positive charge.
  2. Choose the atom arrangement.
    The least electronegative suitable atom is often central. Hydrogen is never central, and halogens are usually terminal.
  3. Connect atoms with single bonds.
    Each line uses two electrons. Subtract the bonding electrons from the total.
  4. Complete terminal octets.
    Give terminal atoms lone pairs until they reach an octet. Hydrogen needs only two electrons.
  5. Complete the central atom.
    Place remaining electrons on the central atom. If it lacks an octet, convert adjacent lone pairs into double or triple bonds when chemically reasonable.
  6. Verify charges and resonance.
    Calculate formal charges, check the total charge and draw equivalent contributors when electrons can be placed in more than one valid way.

Example: CO2

CO2 has 16 valence electrons. Begin with O–C–O, complete oxygen octets, then form two C=O double bonds so carbon reaches an octet and all formal charges become zero.

See the complete CO2 guide →

Example: NH3

NH3 has 8 valence electrons. Three N–H bonds use six electrons and the final pair remains on nitrogen, producing a trigonal pyramidal molecule.

See the complete NH3 guide →

How to handle charged ions

Include the charge when counting electrons, enclose the completed Lewis structure in brackets and place the overall charge outside. For example, NH4+ has one fewer electron than the neutral atom total, while NO3− has one additional electron.

Read the ions and ionic compounds guide →

Important octet-rule exceptions

Incomplete octets

Boron compounds such as BF3 can be most reasonable with six electrons around the central atom.

Odd-electron species

Radicals such as NO contain an unpaired electron and cannot give every atom an octet.

Expanded valence shells

Introductory structures for third-period central atoms may show more than eight electrons, as in PCl5 and SF6.

How to choose between possible structures

  • Prefer structures that satisfy octets for second-period atoms when possible.
  • Minimize the magnitude and separation of formal charges.
  • Place negative formal charge on the more electronegative atom when alternatives are comparable.
  • Do not change atom connectivity when drawing resonance contributors.
  • Use the bonding model required by your course for expanded-valence cases such as SO2.

Common drawing mistakes

  • Forgetting to adjust the electron count for an ion's charge.
  • Placing hydrogen or fluorine in the center.
  • Completing the central atom before terminal atoms.
  • Adding multiple bonds before checking whether they are needed.
  • Failing to label formal charges or resonance contributors.
  • Treating a molecular formula as a unique structure when isomers are possible.

Last reviewed: July 15, 2026.