TL;DR:
Count the total valence electrons, connect atoms with single bonds, fill octets on the outer atoms, put leftovers on the centre, then make multiple bonds if the centre is short.
Carbon dioxide has
4 + 6 + 6 = 16valence electrons and the structureO=C=O.Check that the electron count matches and every atom has its octet (hydrogen has 2).
A Lewis structure is a bookkeeping diagram for a molecule's valence electrons. Dots show lone pairs and lines show bonds. It looks like an art task, but it is really counting, and the same few steps work for most small molecules.
The method
Count valence electrons: Add the outer-shell electrons of every atom. For a negative ion add one per charge, and for a positive ion subtract one per charge.
Choose the central atom: Usually the least electronegative atom, and never hydrogen. It is often the one written first in the formula, like C in CO₂.
Join atoms with single bonds: Draw one line between the central atom and each outer atom. Each line uses 2 electrons.
Fill octets on the outer atoms: Add lone pairs until each outer atom has 8 electrons around it (2 for hydrogen).
Place leftovers on the centre: Any electrons still unused go on the central atom as lone pairs.
Fix a short centre with multiple bonds: If the centre has fewer than 8, move a lone pair from an outer atom into a bond, making it double or triple.
Worked example: carbon dioxide
Valence electrons: carbon has 4 and each oxygen has 6, so
4 + 6 + 6 = 16.Central atom: carbon, which is less electronegative than oxygen. Skeleton:
O-C-O.Single bonds use
2 × 2 = 4electrons, leaving16 − 4 = 12.Fill the octets of the oxygens: 6 electrons (3 lone pairs) each, using 12. Nothing is left over.
Count carbon: it has only 2 bonds, so 4 electrons around it. It is short by 4.
Move one lone pair from each oxygen into a bond with carbon. Now each oxygen has a double bond and 2 lone pairs, and carbon has two double bonds.
The result is O=C=O, with two lone pairs on each oxygen.
Now check it. Count electrons: four bonding pairs and four lone pairs make 8 pairs × 2 = 16 electrons, matching step 1. Count octets: carbon has 2 × 4 = 8 electrons around it. Each oxygen has 4 from the double bond plus 4 from two lone pairs, which is 8.
Formal charge as a second check
Formal charge is valence electrons − lone pair electrons − bonds. For carbon: 4 − 0 − 4 = 0. For each oxygen: 6 − 4 − 2 = 0. All zero is the kind of arrangement chemists prefer, which supports this structure over O-C-O with fewer bonds.
Two more quick examples
Water, H₂O. Valence electrons: 2 × 1 + 6 = 8. Oxygen in the centre with 2 single bonds uses 4 electrons. The remaining 4 go on oxygen as two lone pairs. Oxygen has 4 + 4 = 8, and each hydrogen has 2.
Nitrogen, N₂. Valence electrons: 5 + 5 = 10. One single bond uses 2, leaving 8. Give each nitrogen two lone pairs (4 electrons each), so each has 2 + 4 = 6 around it, which is 2 short. Move one lone pair from each atom into the bond between them, making a triple bond. Now each nitrogen has 3 bonds and 1 lone pair: 6 + 2 = 8. Total: 3 × 2 + 2 × 2 = 10, as counted.
Here is an ion for practice. For the ammonium ion, NH₄⁺: valence electrons are 5 + 4 × 1 − 1 = 8, the minus 1 being for the positive charge. Nitrogen is central with four single bonds, which uses all 8 electrons. Nitrogen has 8 around it and each hydrogen has 2. Formal charge on nitrogen: 5 − 0 − 4 = +1, matching the ion's charge.
Notice how the method scales. Larger molecules just repeat the same steps around several central atoms. Always start with the electron count, since every other check depends on it.
How to check your answer
Total electrons. Bonding electrons plus lone pair electrons must equal your total from step 1.
Octets. Every atom has 8, except hydrogen with 2.
Formal charges. They should add up to the charge of the molecule or ion, and as many as possible should be zero.
Common patterns. Carbon makes 4 bonds, nitrogen 3, oxygen 2 and hydrogen 1 in neutral molecules.
Mistakes that cost marks
Miscounting the total, which makes every later step wrong.
Counting a bond as 1 electron instead of 2.
Putting hydrogen in the centre.
Forgetting to add or remove electrons for an ion.
Stopping at single bonds when the centre atom is still short of an octet.
Real exceptions: The octet rule has exceptions. Some molecules have an odd number of electrons, some atoms (like boron) are content with fewer than eight, and elements from the third row down can hold more than eight. Check with your course notes for which exceptions you are expected to know.
Where you will use it next
A Lewis structure is the starting point for working out a molecule's shape in predicting molecule shapes with VSEPR. It builds on the idea of sharing in ionic and covalent bonds.
Frequently asked questions
Can there be more than one correct Lewis structure?
Sometimes. Ozone and the carbonate ion have several equivalent arrangements (resonance), and the real molecule is a blend of them.
Why do we use eight electrons?
A full outer shell of one s and three p orbitals holds eight electrons, which is a particularly stable arrangement for the elements in the first two rows.
