Lewis Structure Electron Calculator
Count valence electrons, bonding pairs, and lone pairs for a simple molecule.
Enter the central atom and surrounding atoms to see the electron accounting.
A Lewis structure shows how the valence electrons of all atoms in a molecule are arranged: which atoms are bonded, where the lone pairs sit, and where any formal charges live. Drawing a correct Lewis structure is the entry point to predicting molecular geometry, polarity, and reactivity.
The procedure (simplified):
-
Sum all valence electrons across all atoms. For ions, add electrons for each negative charge or subtract for each positive charge. The result is the total electron budget for the structure.
-
Place the least electronegative atom in the center (usually the unique atom in the formula). Surround it with the others.
-
Connect each surrounding atom to the central atom with a single bond (2 electrons each).
-
Distribute remaining electrons as lone pairs on outer atoms first (giving them octets), then on the central atom.
-
If the central atom does not have an octet, convert lone pairs from neighbors into double or triple bonds until it does.
This calculator does the electron accounting step. It tells you total valence electrons, how many electrons go to bonds (assuming all single bonds first), and how many remain as lone pairs.
Worked example: methane CH₄. Central C has 4 valence electrons. Four H atoms contribute 1 each, totaling 4 + 4 = 8 valence electrons. Four C-H single bonds use 8 electrons. Zero lone pairs. C now has an octet through bonding. Done.
Worked example: water H₂O. Central O has 6 valence electrons. Two H atoms contribute 2 more, total 8. Two O-H bonds use 4 electrons. Remaining 4 electrons become 2 lone pairs on O. O has the octet (4 bonding + 4 lone pair). Done.
Worked example: carbon dioxide CO₂. Central C has 4. Two oxygens contribute 12. Total 16. Single bonds use 4. The remaining 12 distribute as lone pairs but C lacks an octet — promote two lone pairs to a second bond on each oxygen. Result: O=C=O with two lone pairs on each O. C has 8 electrons through 4 bonding pairs, each O has 8 (4 bonding + 4 lone pair).
Limitations: this calculator assumes single bonds initially and reports the deficit. It does not draw the structure, predict resonance, or apply the octet expansion needed for elements past period 2 (S, P, halogens often violate the octet rule with expanded valence shells).
How we build and check this calculator
This calculator runs entirely in your browser, so the numbers you enter stay on your device. The math behind it is written by hand and tested against worked examples and standard references before the page goes live.
SuperGlobalCalculator is independently built and maintained. See how we build and verify our calculators.