Guide
Valence Electrons and the Octet Rule
If you had to pick a single idea that explains why elements react the way they do, valence electrons would be a strong candidate. These are the electrons in an atom's outermost shell, and they are the ones that take part in bonding. Nearly everything about an element's chemistry — the compounds it forms, the charges of its ions, its place in a group — traces back to how many valence electrons it has.
Paired with valence electrons is the octet rule, a simple guideline that explains what atoms are trying to achieve when they bond. This guide shows how to count valence electrons straight from the periodic table, what the octet rule says, and how the two together let you predict how an atom will gain, lose, or share electrons to reach a stable arrangement.
What valence electrons are
Electrons occupy shells around the nucleus, filling from the inside out. The valence electrons are those in the highest-numbered occupied shell — the outermost layer — and they are the only ones that normally interact with other atoms. Inner electrons are held tightly and shielded, so they sit out the chemistry; the valence electrons do all the reacting.
This is why elements in the same vertical column of the periodic table behave alike: they share the same number of valence electrons. Sodium and potassium both have one, and both are soft, highly reactive metals that form +1 ions. The recurring pattern of valence-electron counts is what gives the table its periodic structure in the first place.
Counting them from the periodic table
For the main-group elements — the tall columns on the left and right — the periodic table hands you the valence count directly. The number of valence electrons matches the group's position among the main-group columns, and this simple correspondence lets you read the count off at a glance without any calculation.
The transition metals in the middle block are less tidy, because their inner d-electrons complicate the picture, so the neat group rule is reserved for the main-group elements. For those, though, the pattern below is dependable and worth committing to memory.
- Group 1 (alkali metals): 1 valence electron.
- Group 2 (alkaline earth metals): 2 valence electrons.
- Group 13: 3, Group 14: 4, Group 15: 5, Group 16: 6, Group 17 (halogens): 7.
- Group 18 (noble gases): 8 valence electrons — a full outer shell — except helium, which has 2.
- Hydrogen sits apart with a single valence electron and its own special behaviour.
What the octet rule says
The octet rule states that atoms tend to gain, lose, or share electrons until they are surrounded by eight valence electrons, matching the stable configuration of the nearest noble gas. Eight is the magic number because a full outer shell of s and p orbitals holds exactly eight electrons, and that arrangement is especially low in energy and unreactive — precisely the state the noble gases already enjoy.
The rule reframes bonding as a goal-directed process: atoms are not bonding at random but seeking the security of a filled outer shell. It explains why the noble gases rarely react at all — they already have their octet — and why the elements just before and after them are so reactive, being only one or two electrons away from that stability.
How atoms reach an octet
There are three routes to an octet, and which one an atom takes depends on how many valence electrons it starts with. Metals with just one or two valence electrons find it easiest to lose them, exposing a full shell underneath and becoming positive ions. Nonmetals close to a full shell find it easier to gain a few electrons, becoming negative ions. When two atoms both need electrons, they share, forming covalent bonds so that each can count the shared pairs toward its own octet.
Sodium and chlorine illustrate the first two routes at once: sodium loses its single valence electron to reach an octet, chlorine gains one to complete its own, and the resulting Na⁺ and Cl⁻ ions attract to form salt. Two chlorine atoms, by contrast, take the third route and share a pair of electrons, so each effectively has eight — this is the covalent bond in Cl₂.
- Lose electrons: metals with 1–3 valence electrons shed them to form positive ions.
- Gain electrons: nonmetals with 5–7 valence electrons pick up electrons to form negative ions.
- Share electrons: two nonmetals share pairs in covalent bonds so each reaches an octet.
Where the octet rule bends
The octet rule is a guideline, not an unbreakable law, and knowing its exceptions keeps you from misapplying it. The most important is that hydrogen and helium aim for a duet of two electrons rather than eight, because their outer shell is the small first shell that holds only two. Hydrogen therefore forms a single bond and helium is already full.
Some larger atoms in period three and beyond, such as sulfur and phosphorus, can accommodate more than eight electrons in an expanded shell, allowing compounds like sulfur hexafluoride. A few electron-deficient molecules, such as those of boron, settle for fewer than eight. These exceptions do not weaken the rule so much as mark its edges — for the vast majority of light main-group elements, aiming for eight is exactly the right instinct.
Frequently asked questions
What are valence electrons?
They are the electrons in an atom's outermost shell. Because they are the electrons that take part in bonding, they largely determine an element's chemical behaviour and the ions it forms.
How do I find the number of valence electrons?
For main-group elements, read it from the group position: Group 1 has one, Group 2 has two, and Groups 13 to 18 have three through eight. The transition metals in the middle do not follow this simple rule.
What is the octet rule?
It is the tendency of atoms to gain, lose, or share electrons until they have eight valence electrons, matching a stable noble-gas configuration. That filled outer shell is a low-energy, unreactive arrangement.
What are the main exceptions to the octet rule?
Hydrogen and helium aim for two electrons, not eight. Some period-three and heavier atoms such as sulfur can hold more than eight, and a few atoms such as boron are stable with fewer.