Lewis Structure & VSEPR Shape Calculator
Draw the Lewis structure of a molecule or ion with one central atom. Type a formula such as H₂O, SF₆ or SO₄²⁻ to get the valence-electron count, bonds, lone pairs, formal charges and resonance structures, then the VSEPR electron geometry, molecular shape, bond angle, hybridisation and polarity.
How to Use
- Type a formula with one central atom, such as H2O, CO2, NH4+, NO3- or SO4^2- (a caret is never ambiguous for charges; triiodide is I3^- or I3-).
- Choose Lewis structure to see the electron count, bonds, lone pairs, formal charges and how many resonance structures there are.
- Choose VSEPR shape to see the electron geometry, molecular shape, ideal bond angle, hybridisation and polarity, drawn with wedges and dashes.
- Read Show Work for every step: the valence count, why that atom is central, the octet check, each formal charge, the steric number and the polarity reasoning.
- Use the presets for the classic textbook cases, from bent water to T-shaped ClF₃ and square planar XeF₄.
NH4+ NO3- SO4^2- I3^- · main-group elements, up to 7 atoms around the centreWorked Example
Water, H₂O. Valence electrons: 6 from oxygen + 2 × 1 from hydrogen = 8. Oxygen is central, because hydrogen can only form one bond. Two O–H bonds use 4 electrons; hydrogen is full with 2, so the other 4 go on oxygen as 2 lone pairs, giving oxygen its octet. Every formal charge is 0 (oxygen: 6 − 4 − 2). Two bonds plus two lone pairs is a steric number of 4 (AX₂E₂): tetrahedral electron geometry, a bent molecule with an angle below the ideal 109.5° (measured at 104.5°), sp³ oxygen, and polar.
Nitrate, NO₃⁻. 5 + 3 × 6 + 1 = 24 electrons. Three N–O bonds and full octets on the three oxygens use all 24, leaving nitrogen with only 6, so one oxygen lone pair becomes a second bond: N=O. Nitrogen then has formal charge 5 − 0 − 4 = +1 and each N–O oxygen 6 − 6 − 1 = −1, adding up to the ion’s −1. The double bond can sit on any of the three oxygens, so there are 3 resonance structures; three domains and no lone pair make it trigonal planar, 120°, sp².
The common mistake: ignoring lone pairs. XeF₄ has four atoms around xenon, so it is tempting to call it tetrahedral at 109.5°. Count the electrons: 8 + 4 × 7 = 36; the four bonds and the fluorine lone pairs use 32, so 4 electrons, 2 lone pairs, stay on xenon. The steric number is 6, not 4: the electron geometry is octahedral, the lone pairs sit opposite each other, and the molecule is square planar with 90° angles and sp³d² xenon.
Show Work
Formulas
From Lewis Dots to VSEPR
Gilbert N. Lewis proposed in his 1916 paper “The Atom and the Molecule” that a chemical bond is a pair of electrons shared between two atoms, and drew atoms with their outer electrons as dots. Irving Langmuir took up the idea in 1919, named the stable group of eight the octet, and made the dot structures widely known. Linus Pauling added hybrid orbitals in 1931 and his electronegativity scale in 1932; the electronegativities used here are Pauling values from the PubChem periodic table.
The shapes came later. Nevil Sidgwick and Herbert Powell noticed in 1940 that the arrangement of bonds follows the number of electron pairs around the central atom, and Ronald Gillespie and Ronald Nyholm turned that into valence-shell electron-pair repulsion (VSEPR) theory in 1957, including the rule that lone pairs push harder than bonding pairs. Labels such as sp³d² for SF₆ are the traditional textbook description; modern calculations show that d orbitals contribute little and that “expanded octets” are better described by charge separation, which is why sulfate is drawn both with two S=O bonds (smallest formal charges) and with four S–O bonds (octet rule).
About This Tool
This calculator draws the Lewis structure of any molecule or ion with a single central atom made of main-group elements. It counts the valence electrons including the charge, puts the least electronegative non-hydrogen atom in the centre, then tries every arrangement of single, double and triple bonds and keeps the one that gives the centre its octet and the smallest formal charges, with negative charge on the most electronegative atoms. Atoms from period 3 down may hold more than 8 electrons; boron, beryllium and aluminium may hold fewer. Equally good arrangements are reported as resonance structures, and when an expanded octet is chosen, the octet-rule alternative is shown in Show Work.
From the steric number it gives the electron geometry, molecular shape, ideal bond angle and hybridisation, and it judges polarity from the vector sum of the electronegativity differences along the ideal bond directions together with any lopsidedness caused by lone pairs. Molecules with several central atoms (ethane, methanol, oxyacids such as H₂SO₄), ionic compounds and transition-metal compounds get a clear message instead of a wrong picture. Everything runs in your browser; nothing is sent anywhere.
Related tools: Oxidation Number Calculator, Bond Enthalpy Calculator, and Interactive Periodic Table.
Frequently Asked Questions
How do you count the valence electrons for a Lewis structure?
Add the valence electrons of every atom (its group number, minus 10 for groups 13 to 18), then add one electron for each negative charge and take one away for each positive charge. Sulfate, SO₄²⁻, has 6 + 4 × 6 + 2 = 32; the ammonium ion, NH₄⁺, has 5 + 4 × 1 − 1 = 8. Forgetting the charge gives 30 for sulfate, which cannot give every oxygen an octet.
Which atom goes in the middle?
The least electronegative atom that is not hydrogen; hydrogen forms only one bond, so it is always on the outside. In ClF₃, chlorine (3.16 on the Pauling scale) is central and the three fluorines (3.98) surround it. In SO₄²⁻ sulfur (2.58) is central, not oxygen (3.44). The exception is an oxyacid, where hydrogen bonds to oxygen: HOCl is H–O–Cl.
What is a formal charge and why minimise it?
Formal charge = valence electrons − lone-pair electrons − bonds. In the nitrate ion each of the 3 resonance structures has one N=O and two N–O: nitrogen is 5 − 0 − 4 = +1 and each singly bonded oxygen is 6 − 6 − 1 = −1, so the charges add up to −1, the charge of the ion. The best structure has the smallest formal charges, with any negative charge on the more electronegative atoms.
Why is XeF₄ square planar and not tetrahedral?
Because the lone pairs count. XeF₄ has 8 + 4 × 7 = 36 valence electrons; four Xe–F bonds and twelve fluorine lone pairs use 32, leaving 2 lone pairs on xenon. That is 6 electron domains (AX₄E₂), so the electron geometry is octahedral; the lone pairs sit opposite each other and the four fluorines form a square with 90° angles.
How can CO₂ be nonpolar when its bonds are polar?
Each C=O bond is polar, with an electronegativity difference of 3.44 − 2.55 = 0.89, but CO₂ is linear, so the two bond dipoles point in opposite directions and cancel. Water’s O–H bonds (difference 1.24) sit in a bent shape, so they add up instead: along the ideal tetrahedral directions their vector sum is 1.43, and water is polar.
How do I use the Lewis Structure & VSEPR Shape Calculator?
Simply type your numbers and read the result, which refreshes the instant you change something. There is nothing to submit and nothing to wait for.
Does it cost anything or need an account?
No. The tool is completely free, there is no account to create, and it keeps working offline after the page first loads.
Is anything I type uploaded?
No. The tool works entirely on your device, so the values you enter never leave your browser.
Common Use Cases
Homework and exam practice
Check a Lewis structure step by step: 24 valence electrons for NO₃⁻, formal charges +1 and −1, 3 resonance structures.
Predicting shapes
Go from formula to VSEPR shape: ClF₃ has 28 electrons, 3 bonds and 2 lone pairs on Cl, so it is T-shaped with angles just under 90°.
Hybridisation
Read the hybridisation from the steric number: 2 is sp (CO₂), 4 is sp³ (CH₄, H₂O), 6 is sp³d² (SF₆, XeF₄).
Polarity and solubility
Tell polar from nonpolar: NH₃ (trigonal pyramidal) is polar, while BF₃ (trigonal planar) and SF₆ (octahedral) are not.
Ions and expanded octets
Draw polyatomic ions with brackets and charges, such as SO₄²⁻ with 32 electrons and I₃⁻ with 22, including atoms that hold more than 8 electrons.
Last updated: