Lewis Structure Calculator

Calculate Lewis dot structures, valence electrons, formal charges, and resonance structures for molecules.

Molecule Setup

Common Molecules:

Total Valence Electrons

8

Bonds: 4 | Lone Pairs: 0

BOBond Order
1.0
LPCentral Lone Pairs
0
FCFormal Charge
4
RResonance
No

Electron Summary:

  • Bonding electrons: 8
  • Non-bonding electrons: 0
  • Total electrons: 8

Lewis Structure Rules

Octet Rule

Most atoms want 8 valence electrons (H wants 2).

Formal Charge

FC = Valence - Lone pair e- - Bonding e-/2

What Is a Lewis Structure?

A Lewis structure (also called a Lewis dot diagram or electron dot structure) is a graphical representation of the bonding between atoms in a molecule and the lone pairs of electrons on each atom. Developed by Gilbert N. Lewis in 1916, Lewis structures are the foundation for understanding chemical bonding, molecular geometry, and reactivity. They show how valence electrons are distributed among atoms in a molecule.

In a Lewis structure, each atom is represented by its chemical symbol, and valence electrons are shown as dots (lone pairs) or lines (bonding pairs). Each line represents two shared electrons in a covalent bond. The arrangement of electrons follows the octet rule: most atoms (except hydrogen) tend to be surrounded by eight valence electrons, giving them the electron configuration of a noble gas. Hydrogen follows the duet rule, needing only two electrons.

Lewis structures reveal important information about molecular bonding: the total number of valence electrons, the number of bonding and non-bonding electrons, formal charges on individual atoms, bond orders, and whether resonance structures exist. These properties determine molecular shape, polarity, and chemical reactivity. Drawing correct Lewis structures is the first step in predicting molecular properties using VSEPR theory and hybridization.

This calculator determines the Lewis structure parameters for any molecule by computing the total valence electrons, bonding electrons, lone pairs, formal charges, bond order, and the number of possible resonance structures. It supports molecules with up to three different outer atom types and includes presets for 10 common molecules.

Lewis Structure Calculations

The key calculations for Lewis structures involve counting valence electrons and distributing them according to bonding rules.

Formal Charge

FC = Valence e⁻ - Non-bonding e⁻ - Bonding e⁻/2

Where:

  • FC= Formal charge on the atom
  • Valence e⁻= Number of valence electrons in the free atom
  • Non-bonding e⁻= Number of lone pair electrons on the atom
  • Bonding e⁻= Number of electrons in bonds connected to the atom

How to Use This Calculator

Follow these steps to determine Lewis structure parameters:

  1. Select Central Atom: Choose the central atom from the dropdown (C, N, O, F, Cl, Br, S, P, B). The central atom is typically the least electronegative element (excluding hydrogen).
  2. Add Outer Atoms: For each type of outer atom, select the element and enter how many atoms of that type are bonded to the central atom. You can add multiple rows for different outer atom types.
  3. Set Molecular Charge: Enter the overall charge of the molecule or ion. Use 0 for neutral molecules, +1 for cations like NH₄⁺, and -1 for anions like NO₃⁻.
  4. View Results: The calculator displays total valence electrons, bonding electrons, lone pairs, bond order, formal charge on the central atom, whether resonance structures exist, and the number of resonance structures.

For quick setup, use the preset buttons for common molecules: H₂O, CO₂, NH₃, CH₄, SO₂, NO₂, CO₃²⁻, NO₃⁻, NH₄⁺, HCN.

Understanding the Results

The results provide a complete description of the molecule's electronic structure:

Total Valence Electrons: The sum of all valence electrons from all atoms, adjusted for molecular charge. This is the starting point for drawing the Lewis structure. For example, CO₂ has 4 (from C) + 2×6 (from O) = 16 valence electrons.

Bonding Electrons: The number of electrons shared in covalent bonds. Dividing by 2 gives the number of bonds. For CO₂ with two double bonds, there are 8 bonding electrons (4 bonds).

Non-bonding Electrons: The electrons remaining as lone pairs after bonding electrons are assigned. These are distributed to satisfy the octet rule on outer atoms first, then the central atom.

Bond Order: The average number of bonds per bonding atom. A bond order of 1.0 means all single bonds, 2.0 means all double bonds, and intermediate values indicate resonance averaging. For example, CO₃²⁻ has a bond order of 1.33 due to resonance between three equivalent structures.

Formal Charge: The charge assigned to the central atom based on electron ownership. In the Lewis structure model, bonding electrons are split equally between bonded atoms. Ideally, formal charges should be close to zero or match the actual charge distribution in the molecule.

Resonance Structures: When multiple equivalent arrangements of electrons exist, the molecule exhibits resonance. The actual structure is a hybrid of all resonance forms, with each bond having characteristics intermediate between the resonance forms.

Real-World Applications

Lewis structures are the essential first step in predicting molecular geometry using VSEPR theory. By counting bonding and lone pairs around the central atom, chemists predict whether a molecule is linear, trigonal planar, tetrahedral, or other shapes. This geometry determines physical properties like polarity, boiling point, and solubility. For example, the Lewis structure of water shows two bonds and two lone pairs, predicting a bent shape that makes water polar.

Organic chemistry relies heavily on Lewis structures for understanding reaction mechanisms. The movement of electron pairs (shown as curved arrows in mechanism diagrams) follows Lewis structure conventions. Organic chemists use Lewis structures to predict nucleophilic and electrophilic sites, design synthetic routes, and understand stereochemistry.

Biochemistry uses Lewis structures to understand enzyme-substrate interactions. The active sites of enzymes contain specific arrangements of lone pairs and partial charges that interact with substrate molecules. Understanding these electronic features through Lewis structures helps explain enzyme specificity and catalytic mechanisms.

Materials science uses Lewis structures to predict the properties of new compounds. The bonding patterns revealed by Lewis structures indicate whether a compound will form extended networks (like diamond), layered structures (like graphite), or molecular crystals (like ice). These structural features determine mechanical, electrical, and thermal properties.

Worked Examples

Carbon Dioxide (CO₂)

Problem:

Determine the Lewis structure parameters for CO₂.

Solution Steps:

  1. 1Central atom: C (valence = 4)
  2. 2Outer atoms: 2 × O (valence = 6 each)
  3. 3Total valence electrons = 4 + 2(6) = 16
  4. 4Bonding electrons = 8 (two C=O double bonds)
  5. 5Non-bonding electrons = 8 (two lone pairs on each O)
  6. 6Formal charge on C = 4 - 0 - 8/2 = 0

Result:

CO₂ has 16 valence electrons, two double bonds (bond order 2.0), no lone pairs on carbon, and formal charge 0 on the central atom. No resonance structures.

Carbonate Ion (CO₃²⁻)

Problem:

Determine the Lewis structure parameters for CO₃²⁻.

Solution Steps:

  1. 1Central atom: C (valence = 4)
  2. 2Outer atoms: 3 × O (valence = 6 each)
  3. 3Charge = -2, so total valence = 4 + 3(6) + 2 = 24
  4. 4Bonding electrons = 8 (distributed among three C-O bonds)
  5. 5Three equivalent resonance structures exist
  6. 6Bond order = (4 bonds) / (3 bonding atoms) = 1.33

Result:

CO₃²⁻ has 24 valence electrons, bond order 1.33, and 3 equivalent resonance structures with formal charge of 0 on carbon.

Water (H₂O)

Problem:

Determine the Lewis structure parameters for H₂O.

Solution Steps:

  1. 1Central atom: O (valence = 6)
  2. 2Outer atoms: 2 × H (valence = 1 each)
  3. 3Total valence electrons = 6 + 2(1) = 8
  4. 4Bonding electrons = 4 (two O-H single bonds)
  5. 5Non-bonding electrons = 4 (two lone pairs on O)
  6. 6Formal charge on O = 6 - 4 - 4/2 = 0

Result:

H₂O has 8 valence electrons, two single bonds, two lone pairs on oxygen, and formal charge 0. No resonance structures.

Tips & Best Practices

  • Start by counting all valence electrons — this is the budget you must account for.
  • Draw single bonds first, then distribute remaining electrons as lone pairs.
  • Check the octet rule for all atoms; expand to double/triple bonds if needed.
  • Calculate formal charges to verify your Lewis structure is reasonable.
  • Resonance structures have the same atoms in the same positions — only electrons move.
  • Negative formal charges should be on the most electronegative atoms.

Frequently Asked Questions

The central atom is typically the least electronegative element in the molecule. Hydrogen is never the central atom because it can only form one bond. For molecules with one type of each element, the central atom is usually the one with the lowest group number. For example, in CO₂, carbon (group 14) is the central atom, not oxygen (group 16).
The octet rule states that atoms tend to gain, lose, or share electrons to achieve a full outer shell of 8 electrons (like noble gases). Exceptions include: hydrogen (duet rule, 2 electrons), elements in period 3 and below can have expanded octets (more than 8 electrons using d-orbitals), and some molecules like BF₃ have incomplete octets (only 6 electrons on boron).
Formal charge = valence electrons - non-bonding electrons - bonding electrons/2. The formal charge represents the charge an atom would have if bonding electrons were shared equally. Ideally, formal charges in a Lewis structure should be as close to zero as possible. When formal charges must exist, negative charges should reside on the most electronegative atoms.
Resonance structures are multiple valid Lewis structures that differ only in the arrangement of electrons (not atoms). They occur when a single Lewis structure cannot fully represent the bonding. The actual molecule is a hybrid (average) of all resonance forms. For example, benzene has two equivalent resonance structures with alternating single and double bonds, but all C-C bonds are actually equal in length.
Resonance occurs when there are multiple equivalent ways to arrange double bonds and lone pairs. Look for patterns like: a central atom bonded to multiple identical outer atoms (CO₃²⁻, SO₄²⁻), conjugated systems with alternating single and double bonds (benzene), or molecules where the octet rule can be satisfied in multiple ways. If resonance exists, the calculator will indicate the number of equivalent structures.

Sources & References

Last updated: 2026-06-06

💡

Help us improve!

How would you rate the Lewis Structure Calculator?

<>

Editorial Note

MyCalcBuddy Editorial Team

This page is maintained as an educational calculator reference.

Source

Formula Source: Chemistry: The Central Science

by Brown, LeMay, Bursten

UpdatedLast reviewed: May 2026
CheckedFormula checks are based on standard references and internal QA review.