Electron configuration step by step (the Aufbau principle)
How to write the electron configuration of any element: shells, subshells, the filling order, noble-gas notation, ions and the chromium and copper exceptions.
By Felipe Perin·Updated October 8, 2026·4 min read
The electron configuration shows how an atom's electrons are arranged around the nucleus. It explains why an element sits where it does on the periodic table and why it reacts the way it does. In this guide you will learn to write the configuration of any element, understand the logic behind the filling diagram and avoid the most common exam mistakes.
Shells and subshells
In the model used in high school, electrons occupy shells (or energy levels), numbered 1 to 7 — sometimes labelled K, L, M, N, O, P and Q. Each shell is divided into subshells, labelled s, p, d and f. Each subshell holds a maximum number of electrons:
- s: up to 2 electrons.
- p: up to 6 electrons.
- d: up to 10 electrons.
- f: up to 14 electrons.
Shell 1 has only an s subshell; shell 2 has s and p; shell 3 has s, p and d; from shell 4 on, all four subshells appear. In practice, no known element occupies subshells beyond f.
The filling order and the diagram
Electrons fill the lowest-energy subshells first. The detail that confuses many people is that this order does not simply follow the shells: the 4s subshell, for example, is lower in energy than 3d and fills before it. The correct order is:
1s → 2s → 2p → 3s → 3p → 4s → 3d → 4p → 5s → 4d → 5p → 6s → 4f → 5d → 6p → 7s → 5f → 6d → 7p
This rule is known as the Aufbau principle ("building up" in German) or the Madelung rule; in Brazil, the diagram used to derive it is traditionally called the Linus Pauling diagram. The idea is simple: write the subshells in rows (1s; 2s 2p; 3s 3p 3d; 4s 4p 4d 4f...) and run parallel diagonal arrows through them, from top to bottom.
Step by step with examples
To write a configuration, take the element's atomic number (Z) — which, in a neutral atom, equals the number of electrons — and fill the subshells in diagram order until you run out of electrons.
- Oxygen (Z = 8): 1s² 2s² 2p⁴.
- Sodium (Z = 11): 1s² 2s² 2p⁶ 3s¹.
- Chlorine (Z = 17): 1s² 2s² 2p⁶ 3s² 3p⁵.
- Iron (Z = 26): 1s² 2s² 2p⁶ 3s² 3p⁶ 4s² 3d⁶.
Always check that the superscripts add up to the number of electrons. For iron: 2 + 2 + 6 + 2 + 6 + 2 + 6 = 26.
Electrons per shell
Many exercises ask for the number of electrons in each shell. Just add up the subshells with the same number. For iron: shell 1 = 2 (1s²), shell 2 = 8 (2s² 2p⁶), shell 3 = 14 (3s² 3p⁶ 3d⁶) and shell 4 = 2 (4s²). Shell 3 has 14 electrons because 3d was filled after 4s.
Valence shell vs. highest-energy subshell
Two expressions show up often in exams and are frequently confused:
- The valence shell is the outermost shell, the one with the highest number. In iron, it is shell 4 (4s²), with 2 electrons.
- The highest-energy subshell is the last one filled in diagram order. In iron, it is 3d⁶.
Noble-gas notation
To shorten the notation, the inner part of the configuration can be replaced by the symbol of the previous noble gas in brackets. Argon (Z = 18) has the configuration 1s² 2s² 2p⁶ 3s² 3p⁶; so iron can be written as [Ar] 4s² 3d⁶ and sodium as [Ne] 3s¹.
Configurations of ions
For anions, add the electrons gained: Cl⁻ has 18 electrons and becomes 1s² 2s² 2p⁶ 3s² 3p⁶, the same configuration as argon. For cations, remove electrons from the outermost shell — not necessarily from the last subshell filled. This is where many people slip: Fe²⁺ loses the two 4s electrons, becoming [Ar] 3d⁶, not [Ar] 4s² 3d⁴.
Exceptions: chromium and copper
Some elements do not follow the diagram exactly. The most frequently tested are chromium and copper, which are more stable with a half-filled or completely filled d subshell:
- Chromium (Z = 24): expected [Ar] 4s² 3d⁴, actual [Ar] 4s¹ 3d⁵.
- Copper (Z = 29): expected [Ar] 4s² 3d⁹, actual [Ar] 4s¹ 3d¹⁰.
The same happens with elements in the same groups, such as molybdenum, silver and gold. If the question does not mention exceptions, follow the diagram — but it is good to know they exist.
Link to the periodic table
The electron configuration and the position on the table tell the same story. The number of occupied shells is the period: iron has electrons up to shell 4 and is in period 4. The highest-energy subshell indicates the block: iron ends in 3d, so it is in the d-block, among the transition metals. For main-group elements, the valence electrons indicate the group: chlorine ends in 3s² 3p⁵, has 7 valence electrons and sits in group 17 (VIIA).
Want to practice? QuiBingo's element pages show each element's electron configuration, and teachers can set up Classic Bingo to display only the configuration of the drawn element — students must work out which element it is before marking their card.
Learn by playing
Put what you read into practice by playing QuiBingo.