⚛️ Lewis Structure Generator – Visualise Electron Dot Diagrams
A Lewis structure (also called a Lewis dot diagram or electron-dot structure) is a two-dimensional representation of a molecule or ion that shows every valence electron — both bonding pairs (shared between two atoms) and lone pairs (non-bonding electrons on a single atom). Proposed by Gilbert N. Lewis in 1916, these diagrams remain the most widely taught first-step tool for predicting molecular geometry, polarity, and reactivity.
What Are Valence Electrons?
Only the outermost electrons (valence electrons) participate in bonding. The number of valence electrons an atom contributes equals its group number on the periodic table — carbon (Group 14) contributes 4, oxygen (Group 16) contributes 6, and so on. For ions, you add one electron per unit of negative charge and remove one per unit of positive charge.
| Period / Group | 1 (H, Li, Na…) | 2 (Be, Mg…) | 13 (B, Al…) | 14 (C, Si…) | 15 (N, P…) | 16 (O, S…) | 17 (F, Cl…) | 18 (Ne, Ar…) |
|---|---|---|---|---|---|---|---|---|
| Valence e⁻ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
The Octet Rule
Most main-group elements achieve maximum stability when they are surrounded by 8 valence electrons — the same configuration as the nearest noble gas. Hydrogen is the exception: it needs only 2 electrons (duet rule) to mimic helium. Atoms share electrons through covalent bonds to satisfy this rule.
How to Draw a Lewis Structure — 8-Step Method
Count total valence electrons
Add up valence electrons from all atoms. For ions: subtract 1 e⁻ per +1 charge; add 1 e⁻ per −1 charge.
Identify the central atom
The central atom is typically the one with the lowest electronegativity (least tendency to attract electrons). Hydrogen is NEVER central.
Place single bonds
Connect the central atom to every terminal atom with a single bond (2 electrons each). This forms the skeleton.
Distribute remaining electrons to terminal atoms
Assign lone pairs to terminal atoms first, giving each (except H) enough electrons to complete its octet.
Assign leftover electrons to the central atom
Any electrons still unused go to the central atom as lone pairs.
Check the central atom's octet
If the central atom still has fewer than 8 electrons, convert lone pairs on terminal atoms into double or triple bonds.
Calculate formal charges
FC = Valence electrons − Non-bonding electrons − (Bonding electrons ÷ 2). The best structure minimises all formal charges.
Draw resonance structures if needed
If electrons can be delocalised (moved without changing atomic positions), draw all resonance contributors.
Bond Types and Bond Order
A single bond (—) consists of 1 shared electron pair (2 electrons). A double bond (=) consists of 2 shared pairs (4 electrons), and a triple bond (≡) consists of 3 shared pairs (6 electrons). Higher bond order means a shorter, stronger bond. For example, the C≡N bond in HCN is much shorter and stronger than the C—N bond in methylamine.
| Bond Type | Symbol | Electron Pairs | Example | Bond Strength |
|---|---|---|---|---|
| Single | — | 1 pair (2 e⁻) | H—Cl | Weakest |
| Double | = | 2 pairs (4 e⁻) | :O=C=O: | Intermediate |
| Triple | ≡ | 3 pairs (6 e⁻) | :N≡N: | Strongest |
Formal Charge vs. Oxidation State
Formal charge assumes electrons in bonds are split equally between the two atoms. The formula is:
FC = Valence electrons − Non-bonding electrons − (Bonding electrons ÷ 2)Oxidation state assumes the more electronegative atom gets all shared electrons. Both are useful bookkeeping tools, but they give different numbers for the same molecule. The ideal Lewis structure is the one where all formal charges are zero or minimised.
Exceptions to the Octet Rule
Resonance Structures
When two or more equivalent Lewis structures can be drawn by moving only electrons (not atoms), the molecule is said to have resonance. Common examples include ozone (O₃), nitrate (NO₃⁻), carbonate (CO₃²⁻), and sulfate (SO₄²⁻). The actual electron distribution is a resonance hybrid — an average of all contributors. Resonance structures are shown with a double-headed arrow (↔) between them, and all equivalent bonds in the hybrid have the same bond length and order.
Molecular Geometry from Lewis Structures
Once you have a Lewis structure, you can predict the 3-D shape of the molecule using VSEPR theory (Valence Shell Electron Pair Repulsion). Both bonding and lone pairs repel each other and arrange themselves as far apart as possible. Lone pairs exert stronger repulsion than bonding pairs, which is why water (2 bonds + 2 lone pairs) has a bent shape at 104.5° rather than the ideal tetrahedral 109.5°.
| Bonding Pairs | Lone Pairs on Central | Geometry | Bond Angle | Example |
|---|---|---|---|---|
| 2 | 0 | Linear | 180° | CO₂, BeCl₂ |
| 3 | 0 | Trigonal planar | 120° | BF₃, SO₃ |
| 4 | 0 | Tetrahedral | 109.5° | CH₄, CCl₄ |
| 3 | 1 | Trigonal pyramidal | 107° | NH₃, PCl₃ |
| 2 | 2 | Bent (V-shape) | 104.5° | H₂O, SO₂ |
| 5 | 0 | Trigonal bipyramidal | 90°/120° | PCl₅ |
| 6 | 0 | Octahedral | 90° | SF₆ |
Polarity and Lewis Structures
A molecule is polar if it has an overall non-zero dipole moment. This depends on two factors: (1) individual bond polarity (from electronegativity difference) and (2) geometry. CO₂ has two polar C=O bonds, but they point in opposite directions and cancel out — making CO₂ nonpolar. H₂O has two polar O—H bonds that do not cancel (bent geometry) — making H₂O highly polar.
Lewis structures are the foundation of all molecular chemistry. Mastering them unlocks the ability to predict reactivity, draw reaction mechanisms, understand spectroscopic data, and apply VSEPR theory to real-world problems from drug design to materials science.