Foundations Section 1 of 123

Atomic structure

the why on every wrong step

14 min readfree

Quick answer

What are valence electrons and the octet rule?

Valence electrons are the electrons in an atom's outermost occupied shell, the only ones that take part in bonding: carbon has 4, nitrogen 5 and oxygen 6. The octet rule says an atom is most stable with a full outer shell, which is 8 electrons for carbon, nitrogen, oxygen and the halogens and 2 for hydrogen. An atom short of a full shell gains, loses or shares electrons to reach one.

Video lesson · 19 min

Atomic Structure for Organic Chemistry (Valence Electrons, Octet Rule)

Posted 7 Oct 2026 on our YouTube channel. The player loads from YouTube only when you press play.

Chapters 11
  1. 0:00 Start here
  2. 0:52 The three particles
  3. 2:17 Isotopes and mass number
  4. 3:41 Shells and valence electrons
  5. 6:49 The octet rule
  6. 9:45 Ions: cations and anions
  7. 10:56 Transfer or share
  8. 14:10 Carbocations and carbanions
  9. 16:24 Recap
  10. 17:02 Practice problems
  11. 18:56 Next: orbitals

Every reaction in this course moves electrons from one place to another. Where they go depends on how atoms hold them. This page takes an atom apart, counts the electrons that take part in bonding, and shows why atoms bond at all.

The three particles

Take a carbon atom. At its center is the nucleus, a tiny, dense core holding 6 protons and 6 neutrons. Around the nucleus move 6 electrons. Those three particles build every atom.

ParticleChargeMass (amu)Where it is
proton+1about 1in the nucleus
neutron0about 1in the nucleus
electron−1about 1/1800around the nucleus

An atomic mass unit (amu) is a unit sized so that a proton weighs about 1. An electron weighs so little that, for most purposes, an atom's mass is just its protons and neutrons.

The number of protons is the element's atomic number (Z), and it defines the element. Carbon has Z = 6. Every carbon atom has 6 protons, and an atom with 7 protons is nitrogen, not carbon.

An atom's charge, mass (the next section shows how) and reactivity can all change while it stays the same element. Organic chemistry moves electrons on and off carbon all the time. None of that changes what the atom is, because none of it touches the protons.

Isotopes and mass number

Most carbon atoms have 6 neutrons. About one carbon atom in a hundred has 7. Both are carbon, because both have 6 protons. Atoms of the same element with different numbers of neutrons are isotopes.

The mass number (A) is protons plus neutrons, written as a superscript before the symbol. Carbon-12 (¹²C) has 6 protons and 6 neutrons, so A = 12, while carbon-13 (¹³C) has 6 protons and 7 neutrons, so A = 13. Every organic sample you handle holds both: about 98.9% ¹²C and 1.1% ¹³C.

carbon-12 (¹²C)C6 p + 6 nmass number 1298.9% of carboncarbon-13 (¹³C)C6 p + 7 nmass number 131.1% of carbonsame 6 electrons in both
Compare the nucleus labels under each atom: only the neutron count differs. The rings of electrons are identical, including the four outer ones in teal that form bonds.

The extra neutron changes the mass. It does not change the proton count, so the element stays the same. It does not change the electron count either, so ¹²C and ¹³C form the same bonds, in the same places, at essentially the same rates.

That is strong evidence that bonding is the business of electrons. ¹³C is about 8% heavier than ¹²C, yet the two behave almost identically. The nucleus matters to chemistry because its protons set how many electrons the atom has.

"Essentially the same", not exactly. A bond to a heavier atom vibrates more slowly and sits slightly lower in energy, so it takes slightly more energy to break. For ¹²C against ¹³C the difference is tiny. For ordinary hydrogen against deuterium (D, a hydrogen atom with one neutron) the mass doubles, and the difference in rate is large enough to measure. This is the kinetic isotope effect, and chemists use it to find out which bond breaks during a reaction.

The extra neutron is useful in the lab. ¹H and ¹³C are the two isotopes that NMR spectroscopy detects in this course (NMR Spectroscopy). Mass spectrometry weighs molecules, which helps work out a molecule's formula. It even tells a molecule that contains one ¹³C from the same molecule made only of ¹²C.

Shells and valence electrons

Carbon's 6 electrons are not all alike. Two sit close to the nucleus. The other four sit farther out. Chemists describe this with shells: layers of electrons at increasing distance from the nucleus.

The innermost shell, called K, holds at most 2 electrons. The next, called L, holds at most 8. Atoms in the third row of the periodic table, such as sodium and chlorine, go on to fill a third shell, M.

A neutral atom has exactly as many electrons as protons. The electrons fill the inner shell first, because it is closer to the nucleus and lower in energy. Carbon's 6 go 2 into K, then 4 into L. Chemists write that as 2, 4.

The electrons in the outermost occupied shell are the valence electrons. They are the only ones that take part in bonding. Carbon has 4. The electrons in the filled inner shells are core electrons. They sit close to the nucleus, which holds them far too tightly for them to take part in chemistry.

Worked example — building nitrogen (Z = 7)

Nitrogen has 7 protons, so a neutral nitrogen atom has 7 electrons. Fill from the inside out: 2 complete the K shell, and the other 5 go into the L shell. Those 5 are nitrogen's valence electrons.

NK shell: 2 coreelectrons (gray)L shell: 5 valenceelectrons (teal)7 protons, so 7 electrons: 2 + 5
Nitrogen, Z = 7, filled from the inside out. The L shell has room for 8 and holds 5.

The L shell holds 8, so nitrogen is 3 electrons short of a full shell. That one number predicts how nitrogen bonds, as the next section shows. Nitrogen's group number, 15, gives the same count of 5, by a shortcut described below.

You rarely need to fill shells by hand, because the periodic table does the count for you. Its columns are called groups, numbered 1 to 18. In groups 1, 2 and 13 to 18, the main groups, every element in a group has the same number of valence electrons, with one exception: helium, in group 18, has 2. The groups in between, 3 to 12, hold the transition metals (metals such as iron and copper), and they do not follow this rule. Organic chemistry rarely needs them.

In groups 1 and 2, the group number is the count: hydrogen and sodium have 1. In groups 13 to 18, subtract 10. Carbon is in group 14, so it has 14 − 10 = 4. The ten comes from those ten transition-metal columns, which begin in the fourth row.

group12131415161718row 1HHe*row 2LiBeBCNOFNerow 3NaMgAlSiPSClArgroups 3–12:ten columns oftransition metals,from row 4 downvalence e⁻12345678*older labelIAIIAIIIAIVAVAVIAVIIAVIIIAsubtract 10 →* He is the one exception: group 18, but only 2 valence electrons (its one shell is full at 2)shaded: the elements organic chemistry uses most
Read down a column: every element in it has the same number of valence electrons. Across the gap, the group number jumps by ten, so subtract ten. The older labels give the count directly.

So hydrogen has 1 valence electron, carbon 4, nitrogen 5 and oxygen 6. The halogens, the group 17 elements fluorine, chlorine, bromine and iodine, have 7. Older books and many wall charts number the columns IA to VIIIA instead. With those labels, the Roman numeral is the valence count (helium again aside), and no subtraction is needed.

Why valence electrons matter: the octet rule

Start with neon (Z = 10). Its electrons go 2, 8, so its outer shell is full. Neon forms no compounds under ordinary conditions, and neither does helium, whose one shell is full at 2.

Nitrogen is 3 short. In ammonia, NH₃, it shares one pair of electrons with each of three hydrogens. Each shared pair holds one electron from nitrogen and one from hydrogen, and both atoms count the whole pair. Each shared pair is one bond between the two atoms. Nitrogen also keeps a lone pair: a pair of its own electrons that it does not share with any neighbor. Around the nitrogen, 3 shared pairs plus 1 lone pair make 8 electrons. The nitrogen in amines and amides, which later chapters cover, follows the same count: 3 bonds and 1 lone pair.

methane, CH₄HHHHC4 shared pairs= 8 around CH: 2ammonia, NH₃HHHlone pairN3 shared + 1 lone pair= 8 around Nethene, C₂H₄ (a double bond)HHHHCC2 C–H pairs + 2 C=C pairs= 8 around each C
Each pair of dots between two atoms is a shared pair, and the atoms on both sides count it. Count the dots inside each dashed ring.

Carbon in methane, CH₄, reaches 8 with four shared pairs. Each hydrogen counts one shared pair, 2 electrons, which fills its only shell.

That pattern is the octet rule. An atom is most stable, meaning lowest in energy, with a full outer shell. For carbon, nitrogen, oxygen and the halogens, a full outer shell is 8 electrons, an octet. (The outer shell of chlorine and the heavier halogens can hold more than 8, but 8 is what counts as full for bonding.) For hydrogen it is 2. An atom short of a full shell gains, loses or shares electrons to reach one.

Counting to eight tells you how many bonds an atom forms when it shares. Carbon has 4 valence electrons and needs 4 more, so it forms 4 bonds. Nitrogen forms 3, oxygen 2 and a halogen 1. Hydrogen needs 1 more to reach 2, so it forms 1.

Sometimes a structure breaks one of these counts: a carbon with only three bonds, or an oxygen with three. That is not a typo. That atom is the interesting part of the molecule, and it usually carries a charge. (The other possibility, a radical, an atom with a single unpaired electron, comes later in the course.) The last section of this page works through the carbon case.

Common slip: the octet rule counts electrons, not neighbors. Each carbon in ethene, C₂H₄, has only three neighbors: two hydrogens and the other carbon. It still has 8 electrons around it, because the two carbons share two pairs, a double bond. Count the dots in the ethene drawing above. Count neighbors instead, and the first double bond you meet will fool you.

Ions: what "cation" and "anion" mean

Sodium (Z = 11) has 2, 8, 1. Its single outer electron is far from the nucleus and loosely held. Losing it leaves 2, 8, a full outer shell. That is why sodium gives the electron up so readily, and why Na⁺ is the form of sodium you actually meet. Get the electron picture right, and the reactivity follows.

After losing the electron, sodium still has 11 protons but only 10 electrons, so it carries a charge of +1. An atom or group of atoms with more protons than electrons is positively charged and is called a cation. A memory aid: a cation is "pawsitive."

Fluorine (Z = 9) goes the other way. It has 2, 7 and gains one electron to reach 2, 8. With 9 protons and 10 electrons, it carries a charge of −1. An atom or group of atoms with more electrons than protons is an anion.

Naloses 1 e⁻Na+Na: 2, 8, 1Na⁺: 2, 8cation: 11 p⁺, 10 e⁻Fgains 1 e⁻F−F: 2, 7F⁻: 2, 8anion: 9 p⁺, 10 e⁻
Both ions end with a full outer shell of 8. The nucleus does not change, so the charge is protons minus electrons.

Transfer or share: the two ways to satisfy an octet

Put sodium beside chlorine, which has 2, 8, 7 and is one electron short of a full shell. Sodium's outer electron moves across to chlorine completely, and the two become Na⁺ and Cl⁻, as in the section above. The opposite charges attract, and that attraction is an ionic bond. No electrons are shared in it.

Two hydrogen atoms cannot do that. Each has 1 electron and needs 2, and neither gives its electron away. So they share. The two electrons sit between the nuclei as one pair, and each atom counts both. A shared pair that holds two atoms together is a covalent bond.

TRANSFER: an ionic bondNaClNa → Na⁺Cl → Cl⁻arrow: Na's one outer electron moves to ClSHARING: a covalent bondHHone shared pair; each H counts it: 2 each
Top: only the outer shells are drawn. Sodium's one outer electron fills the gap in chlorine's outer shell, and nothing is shared. Bottom: one pair between two hydrogens, counted by both.

Which route an atom takes depends on how far it is from a full shell. An atom with one or two electrons beyond a full shell, such as sodium or magnesium, can hand them over. An atom one or two short, such as chlorine or oxygen, can take them. An ionic bond needs one of each: a giver and a taker.

Carbon is neither. It has 4 valence electrons and needs 8. Giving up four would leave C⁴⁺: four electrons stripped from a small atom that holds them tightly, at a huge energy cost. Taking on four would leave C⁴⁻: four extra negative charges crowded onto one small atom, just as costly. So carbon shares. Each shared pair counts toward the octet of both partners, so both reach 8 and neither takes on a full charge.

Nitrogen, oxygen and the halogens hold their own electrons tightly, so they are not givers. Oxygen and the halogens are takers when a giver is present: sodium and fluorine form the ionic solid sodium fluoride, NaF. Carbon and hydrogen, though, do not hand electrons over to form ionic solids. So when nitrogen, oxygen or a halogen bonds to carbon, to hydrogen or to each other, the pair has no giver, and the atoms share.

That is why organic molecules are held together by covalent bonds. Ions do appear, but at the edges: a Na⁺ sitting beside a negatively charged oxygen at the end of a molecule, for example. The molecule itself is held together by shared pairs.

A bond need not be purely one kind or the other. When two different atoms share a pair, one usually pulls on it harder, and the pair sits closer to that atom. That is a polar covalent bond: shared, but unequally. How hard an atom pulls on shared electrons is its electronegativity, which Electronegativity puts numbers on. Many bonds in this course are polar covalent: every bond from carbon to oxygen, nitrogen or a halogen, for example. C–C and C–H bonds are close to nonpolar.

Carbocations and carbanions: the same words on carbon

Take a carbon bonded to three carbon-based groups of atoms and a chlorine. Chemists write any such carbon-based group as R, so the molecule is R₃C–Cl. Suppose the C–Cl bond breaks and the chlorine takes both electrons of the shared pair with it. The chlorine leaves as Cl⁻. The carbon is left with three bonds and a positive charge. A carbon that carries a positive charge is a carbocation.

before: R₃C–ClRRRCClaround C: 8C owns: 4charge: 0the arrow: both bond electrons go to Clafter: R₃C⁺ + Cl⁻RRRC+Cl−around C: 6C owns: 3charge: +1around C: 2 short of an octetC's own count: 1 short of neutral
Each line is one shared pair. Follow the two electrons of the C–Cl bond: both end up on chlorine. Then compare the two counts for carbon before and after.

The carbon is now short of electrons in two different ways. Each count answers a different question, and both are right.

Around carbon, for the octet. Before, carbon had 4 shared pairs around it: 8 electrons. After, it has 3 pairs: 6 electrons. The chlorine took both electrons of its bond, so the carbon is two electrons short of an octet. Where that pair was, it now has an empty orbital: a space that could hold one pair, but holds no electrons. Both electrons of the bond left with the chlorine, so that space on carbon is empty, not half-full. Orbitals, the next page, explains what an orbital is.

Carbon's own electrons, for the charge. In a shared pair, one electron counts as each atom's own. Before, carbon owned one electron from each of its 4 bonds: 4, the same as a lone neutral carbon atom. After, it owns 3. It is one electron short of neutral, so its charge is +1. This way of counting is the idea behind Formal charge.

Compare sodium. Na⁺ also lost one of its own electrons and also carries +1. But Na⁺ is left with a full 2, 8. A carbocation is left with 6 electrons around its carbon, not 8. That gap is why a carbocation reacts so readily with anything that can give it a pair. You meet carbocations in Substitution & Elimination, in the reactions called SN1 and E1.

Now let an atom leave without the pair. Suppose a strong base, a molecule or ion that pulls protons off other molecules, removes the hydrogen of a C–H bond as H⁺, a bare proton with no electrons. The pair stays on the carbon as a lone pair. The carbon keeps 8 electrons around it, now as three bonds and a lone pair. It owns 5, one more than a neutral carbon, so its charge is −1. A carbon that carries a negative charge is a carbanion. It has a full octet and a spare pair to give, so it seeks out anything short of electrons. You meet carbanions in Enolate Chemistry.

carbanionRRRC−8 around Cowns 5charge −1neutralRRRHC8 around Cowns 4charge 0carbocationRRRC+6 around Cowns 3charge +1R = any carbon-based group
Only the carbocation falls short of 8. Its carbon has an empty orbital, room for one pair, and that is where an incoming pair goes.

What carries forward

Three ideas from this page carry through the course. First, valence electron counts from the group number. You use them to draw every Lewis structure (a drawing that shows every bond and lone pair) and to work out every formal charge in Foundations. Second, the octet rule as an electron count. It tests whether a structure you have drawn is plausible. Third, the cation and anion vocabulary, with both ways of counting a carbon. The charged intermediates from Substitution & Elimination through Enolate Chemistry are all described in these terms.

The next page, Orbitals, replaces the tidy picture of shells with a truer one: where the valence electrons actually are.