Lewis Structure Generator & VSEPR Calculator

Formula like H2O, CO2, NH3, or generic notation (ML2, AX3, MX4). Charge box is for ions: +1 NH₄⁺, −1 CN⁻, −2 CO₃²⁻.

Quick examples
H₂O CO₂ NH₃ CH₄ O₂ N₂ SO₂ HCN CCl₄ F₂ O₃ N₂O NO₂ PCl₃ PCl₅ SF₆ XeF₂ C₂H₆ C₂H₃F₃ C₃H₈ H₂SO₄ ML₂ AX₃ MX₄
Describe in plain English (AI)

Describe by name ("water"), common name ("baking soda"), or property ("no lone pairs", "expanded octet"). The engine verifies the chemistry — if AI picks a poor example, the drawing will show it.

Count each single, double, and triple bond as one bonding region.

Quick VSEPR examples
2B-0LP (Linear) 3B-0LP (Trig. Planar) 2B-1LP (Bent ~120°) 4B-0LP (Tetrahedral) 3B-1LP (Trig. Pyramidal) 2B-2LP (Bent ~104°) 5B-0LP (Trig. Bipyramidal) 4B-1LP (Seesaw) 3B-2LP (T-shaped) 2B-3LP (Linear, XeF₂) 6B-0LP (Octahedral) 5B-1LP (Square Pyramidal) 4B-2LP (Square Planar) 7B-0LP (Pent. Bipyramidal)
3D
3D Molecular Geometry Calculator

Interactive 3D models, PubChem coordinates, rotate & zoom molecules

⚒ Formal charge formula

Formal Charge = (Valence e⁻) − (Non-bonding e⁻) − (Bonding e⁻ ÷ 2)

Type an element and its valence e⁻ auto-fills. Bonding e⁻: single = 2, double = 4, triple = 6.

📋

Result

Molecular Diagram

Enter a molecular formula or set VSEPR parameters to visualize the structure.

Free Lewis Structure Practice Worksheet

Teachers and students: generate a printable practice worksheet with one click. Each click randomly picks 12 molecules from a pool of 80+ (H₂O, CO₂, NH₃, O₂, N₂, SO₂, XeF₂, IF₅, and more). Answer key with valence electrons, geometry, and bond angles included for teachers. Download as PDF—no signup required.

What Is a Lewis Structure?

A Lewis structure (also called a Lewis dot diagram or electron dot structure) is a 2D representation of a molecule that shows how valence electrons are arranged among the atoms. Invented by Gilbert N. Lewis in 1916, these diagrams are fundamental to understanding chemical bonding.

In a Lewis structure:

  • Lines represent covalent bonds (shared electron pairs) — a single line is a single bond (2 e⁻), a double line is a double bond (4 e⁻), and a triple line is a triple bond (6 e⁻)
  • Dots represent lone pairs (non-bonding electrons) that belong to a single atom
  • The octet rule states most atoms are stable with 8 electrons in their valence shell (hydrogen needs only 2)

How to Draw a Lewis Structure (Step-by-Step)

  1. Count total valence electrons. Add up the valence electrons for every atom. For ions, add electrons for negative charges or subtract for positive charges. Example: H₂O has 2(1) + 6 = 8 valence electrons.
  2. Identify the central atom. The least electronegative atom goes in the center. Hydrogen and fluorine are always terminal (outer) atoms. Carbon is almost always central.
  3. Draw single bonds from the central atom to each surrounding atom. Each bond uses 2 electrons.
  4. Distribute remaining electrons as lone pairs. Give outer atoms full octets first (start with the most electronegative), then place leftover electrons on the central atom.
  5. Form multiple bonds if needed. If the central atom has fewer than 8 electrons, convert lone pairs from adjacent atoms into double or triple bonds until the octet is satisfied.
  6. Check formal charges. The best Lewis structure minimizes formal charges, places negative charges on more electronegative atoms, and avoids same-sign charges on adjacent atoms.

Understanding Formal Charge

Formal charge (FC) is a bookkeeping tool that assigns an imaginary charge to each atom in a Lewis structure, assuming all bonding electrons are shared equally. It helps you determine which Lewis structure is the most stable representation of a molecule.

FC = (Valence e⁻) − (Lone pair e⁻) − (Bonding e⁻ ÷ 2)

Worked Examples

Oxygen in H₂O

Valence e⁻ = 6, Lone pair e⁻ = 4, Bonding e⁻ = 4

FC = 6 − 4 − (4÷2) = 0 (neutral, ideal)

Nitrogen in NH₄⁺

Valence e⁻ = 5, Lone pair e⁻ = 0, Bonding e⁻ = 8

FC = 5 − 0 − (8÷2) = +1 (matches ion charge)

Carbon in CO (carbon monoxide)

Valence e⁻ = 4, Lone pair e⁻ = 2, Bonding e⁻ = 6

FC = 4 − 2 − (6÷2) = −1

Rules for Choosing the Best Lewis Structure

  • The structure with formal charges closest to zero on all atoms is preferred
  • Negative formal charges should reside on the more electronegative atoms (O, F, N)
  • Avoid placing same-sign charges on adjacent atoms (like +1 next to +1)
  • Minimize the total number of atoms with non-zero formal charges
  • The sum of all formal charges must equal the overall molecular charge

VSEPR Theory — Predicting Molecular Shape

VSEPR (Valence Shell Electron Pair Repulsion) theory predicts the three-dimensional shape of molecules based on one simple principle: electron groups around a central atom arrange themselves as far apart as possible to minimize repulsion.

Key Concepts

  • Electron domains (or steric number) = bonding pairs + lone pairs around the central atom. A double or triple bond counts as one electron domain.
  • Electron geometry describes the arrangement of all electron domains (bonds + lone pairs)
  • Molecular geometry describes the arrangement of only the atoms (ignoring lone pairs)
  • Lone pairs occupy more space than bonding pairs, compressing bond angles below ideal values

Complete VSEPR Geometry Table

Steric # Bonds Lone Pairs Electron Geometry Molecular Geometry Bond Angle Example Polarity
220LinearLinear180°CO₂, BeCl₂Nonpolar
330Trigonal PlanarTrigonal Planar120°BF₃, SO₃Nonpolar
321Trigonal PlanarBent<120°SO₂, O₃Polar
440TetrahedralTetrahedral109.5°CH₄, CCl₄Nonpolar
431TetrahedralTrigonal Pyramidal~107°NH₃, PCl₃Polar
422TetrahedralBent~104.5°H₂O, H₂SPolar
550Trigonal BipyramidalTrigonal Bipyramidal90°, 120°PCl₅Nonpolar
541Trigonal BipyramidalSeesaw<90°, <120°SF₄Polar
532Trigonal BipyramidalT-shaped<90°ClF₃, BrF₃Polar
523Trigonal BipyramidalLinear180°XeF₂, I₃⁻Nonpolar*
660OctahedralOctahedral90°SF₆Nonpolar
651OctahedralSquare Pyramidal<90°BrF₅, IF₅Polar
642OctahedralSquare Planar90°XeF₄Nonpolar*
770Pentagonal BipyramidalPentagonal Bipyramidal72°, 90°IF₇Nonpolar

* Despite having lone pairs, XeF₂ (linear) and XeF₄ (square planar) are nonpolar because their molecular geometries are symmetric — dipole moments cancel out.

Polarity and Molecular Shape

A molecule is nonpolar when its molecular geometry is symmetric (with identical ligands) — the individual bond dipoles cancel. It is polar when the geometry is asymmetric, leaving a net dipole moment.

  • Always nonpolar (identical ligands): Linear (2 bonds), Trigonal Planar, Tetrahedral, Square Planar, Octahedral
  • Always polar: Bent, Trigonal Pyramidal, Seesaw, T-shaped, Square Pyramidal
  • Common misconception: “Lone pairs always make a molecule polar” — this is wrong. XeF₂ has 3 lone pairs but is nonpolar because the two Xe–F bonds point in opposite directions

Exceptions to the Octet Rule

While the octet rule works for most molecules, there are three important exceptions:

Incomplete Octets

Some atoms are stable with fewer than 8 electrons. Hydrogen needs only 2 (duet rule). Beryllium and boron commonly have 4 and 6 electrons respectively. Example: BF₃ has only 6 electrons around B.

Expanded Octets

Elements in Period 3 and beyond can hold more than 8 electrons by using d-orbitals. Examples: PCl₅ (10 e⁻), SF₆ (12 e⁻), XeF₂ (10 e⁻), XeF₄ (12 e⁻). Common elements: P, S, Cl, Br, I, Xe.

Odd-Electron (Free Radicals)

Molecules with an odd number of valence electrons cannot satisfy the octet rule on every atom. Examples: NO (11 e⁻), NO₂ (17 e⁻). The unpaired electron makes these species highly reactive.

Resonance Structures

When a molecule can be drawn with multiple valid Lewis structures that differ only in the placement of electrons (not atoms), these are called resonance structures. The true molecule is a weighted average (resonance hybrid) of all contributing structures.

  • O₃ (ozone): One O=O double bond and one O–O single bond. Two equivalent resonance structures exist where the double bond switches sides. The real bond order is 1.5.
  • NO₃⁻ (nitrate): Three equivalent resonance structures, each with one N=O double bond and two N–O single bonds. The real bond order is 1.33 for each N–O bond.
  • CO₃²⁻ (carbonate): Three equivalent resonance structures with a real bond order of 1.33 for each C–O bond.
  • Tip: This tool alerts you when resonance is likely — look for the “Resonance” badge in the results when identical atoms have different bond orders.

Frequently Asked Questions

A Lewis structure (or Lewis dot diagram) is a representation of a molecule showing all valence electrons as dots or lines (bonds). It helps visualize bonding patterns, lone pairs, and formal charges in molecules.
VSEPR (Valence Shell Electron Pair Repulsion) theory predicts molecular geometry based on electron pair repulsion. Electron domains (bonds and lone pairs) arrange themselves to minimize repulsion, determining the 3D shape of molecules.
Formal charge = (Valence electrons) − (Non-bonding electrons) − (Bonding electrons/2). The most stable Lewis structure has formal charges closest to zero, with negative charges on more electronegative atoms.
Click Practice Sheet on this page to generate a printable Lewis structure worksheet. Each click randomly selects 12 molecules from 80+ options. Answer key with valence electrons, geometry, and bond angles included for teachers. Download as PDF. No signup required.
Also try → Molecule Draw NEW 📐 3D Molecular Geometry

Practice NCERT Problems

Apply your Lewis structure knowledge to NCERT chemistry and physics problems:

About This AI Lewis Structure Tool & Methodology

This AI-powered Lewis Structure Generator lets you describe a molecule in plain English ("acetic acid", "a bent molecule", "expanded octet example") — AI handles the name-to-formula translation while our deterministic chemistry engine handles every bond, lone pair, formal charge, and geometry calculation. Built on valence electron counting and VSEPR (Valence Shell Electron Pair Repulsion) theory. AI never computes chemistry; it only suggests formulas that the engine then validates and draws.

How Lewis Structure Generation Works:

  1. Count Valence Electrons: Sum all valence electrons from each atom, adjusting for molecular charge
  2. Arrange Atoms: Place the least electronegative atom in the center (hydrogen is always terminal)
  3. Draw Bonds: Connect atoms with single bonds, then distribute remaining electrons as lone pairs
  4. Form Multiple Bonds: If the central atom lacks an octet, convert lone pairs to double or triple bonds
  5. Check Formal Charges: Calculate formal charges - the best structure minimizes charges

Authorship & Expertise

  • Author: Anish Nath
  • Background: Science and engineering education tools
  • Covers: 80+ elements, generic notation, VSEPR steric numbers 1-7

Tool Details

  • Visualization: Interactive 2D molecular diagrams with element coloring (CPK standard)
  • Privacy: All calculations run entirely in your browser — nothing is sent to a server
  • Chemistry Standards: VSEPR theory, formal charge rules, octet rule, expanded octet support
  • Support: @anish2good

Support This Free Tool

Every coffee helps keep the servers running. Every book sale funds the next tool I'm dreaming up. You're not just supporting a site — you're helping me build what developers actually need.

500K+ users
200+ tools
100% private
Privacy Guarantee: Private keys you enter or generate are never stored on our servers. All tools are served over HTTPS.