Lewis Structure Generator
Enter a molecular formula and this Lewis structure calculator draws the Lewis dot structure with bonds, lone pairs, and VSEPR geometry. See step-by-step valence electron counting and shape classification for any molecule.
Lewis Structure
Molecular Formula
Results
Step-by-Step
1. Count total valence electrons
2. Draw single bonds to each outer atom
3. Remaining electrons
4. Distribute lone pairs to outer atoms (satisfy octets)
5. Place remaining electrons on central atom
6. VSEPR geometry
7. Molecular shape
Reference Guide
Valence Electrons
Valence electrons are the outer-shell electrons that participate in bonding. The group number in the periodic table tells you how many each element has.
The Octet Rule
Most atoms seek 8 electrons in their valence shell (2 for hydrogen). Bonds and lone pairs are arranged to satisfy this rule.
VSEPR Theory
Valence Shell Electron Pair Repulsion theory predicts molecular geometry. Electron pairs around the central atom spread out to minimize repulsion.
Bond Angles
Common geometries and their ideal bond angles include tetrahedral (109.5), trigonal planar (120), and linear (180). Lone pairs compress bond angles slightly.
How to draw a Lewis structure step by step
The five steps
1. Count valence electrons. Add up the valence electrons for every atom in the formula.
2. Pick the central atom. Choose the least electronegative atom that is not hydrogen.
3. Connect with single bonds. Join each outer atom to the central atom with one bond.
4. Add lone pairs. Place the remaining electrons on the outer atoms first, then the central atom, to complete octets.
5. Make multiple bonds. If the central atom is short of an octet, convert lone pairs into double or triple bonds.
Worked example for CO2
Carbon dioxide has 4 + 6 + 6 = 16 valence electrons. Carbon is the central atom.
Two single bonds use 4 electrons and leave 12. Placing three lone pairs on each oxygen uses all 12, but carbon then has only 4 electrons around it.
Converting one lone pair from each oxygen into a second bond gives the linear structure below, where carbon and both oxygen atoms reach a full octet.
Lewis structures, dot structures, and formal charge
A Lewis structure and a Lewis dot structure are the same diagram. Bonding pairs are shown as lines and non-bonding electrons as dots. The generator above produces either view from a formula.
To check a structure, calculate the formal charge on each atom. Formal charge equals the valence electrons minus the lone-pair electrons minus half the bonding electrons. The best structure keeps formal charges closest to zero.