On this page
When you write an electron configuration for a multi-electron atom, you cannot simply fill shells by their principal quantum number n (1, 2, 3, 4...). Early models of the atom assumed that all subshells within the same principal shell had the same energy. However, in multi-electron atoms, electron-electron repulsions cause subshells to overlap in energy. The s, p, d, and f subshells experience different degrees of shielding from the inner core electrons. To predict the correct sequence of increasing energy, chemists use the n + l rule, also called the Madelung or Klechkowski rule [[1]](https://en.wikipedia.org/wiki/Aufbau_principle).
What is the n + l rule?
The n + l rule has two parts that dictate how electrons fill subshells [[1]](https://en.wikipedia.org/wiki/Aufbau_principle):
Lowest n + l first: Subshells are filled in increasing order of the sum n + l, where n is the principal quantum number and l is the azimuthal (angular momentum) quantum number.
Lower n breaks the tie: If two subshells have the same n + l value, the one with the lower n fills first.
Before applying the rule, you need the values for the angular momentum quantum number l:
s orbital: l = 0
p orbital: l = 1
d orbital: l = 2
f orbital: l = 3
Why does 4s fill before 3d?
This is the most common place students get stuck. Let's compare the 4s and 3d subshells using the rule:
4s subshell: n = 4 and l = 0. The sum n + l = 4 + 0 = 4.
3d subshell: n = 3 and l = 2. The sum n + l = 3 + 2 = 5.
Since 4 < 5, the 4s orbital has a lower energy than the 3d orbital and fills first [[1]](https://en.wikipedia.org/wiki/Aufbau_principle). This is why Potassium (atomic number 19) places its final electron in the 4s orbital rather than the 3d.
How do you use the tie-breaker for 3p vs 4s?
What happens when the sums are identical? Compare the 3p and 4s subshells:
3p subshell: n = 3 and l = 1. The sum is n + l = 3 + 1 = 4.
4s subshell: n = 4 and l = 0. The sum is n + l = 4 + 0 = 4.
Both have an n + l value of 4. According to the tie-breaker rule, you look at the principal quantum number n. The 3p subshell has a lower n (3 < 4), so it fills before the 4s subshell [[1]](https://en.wikipedia.org/wiki/Aufbau_principle).
Let's look at another example of a tie to reinforce the rule. Consider the 4d and 5p subshells.
4d subshell: n = 4 and l = 2. The sum is n + l = 4 + 2 = 6.
5p subshell: n = 5 and l = 1. The sum is n + l = 5 + 1 = 6.
Both sum to 6. Applying the tie-breaker, the 4d subshell has the lower principal quantum number (4 < 5). Therefore, the 4d subshell is lower in energy and will fill with electrons before the 5p subshell [[1]](https://en.wikipedia.org/wiki/Aufbau_principle).
If you are confused by which orbital fills next, the Fermi Problem Library has worked problems with a step-by-step solver that explains the reasoning rather than printing an answer.
Are there exceptions to the n + l rule?
Yes. The rule is an approximation, and there are about 20 known exceptions among the elements [[1]](https://en.wikipedia.org/wiki/Aufbau_principle).
Two common exceptions you will see in exams are Chromium (Cr) and Copper (Cu). The n + l rule predicts an outer configuration of 4s² 3d⁴ for Chromium (atomic number 24) and 4s² 3d⁹ for Copper (atomic number 29). However, their actual experimental configurations are 4s¹ 3d⁵ and 4s¹ 3d¹⁰. Why does this happen? In these cases, moving an electron from the 4s subshell into the 3d subshell results in a half-filled (3d⁵) or fully-filled (3d¹⁰) d-subshell. This arrangement provides extra stability due to greater exchange energy and a more symmetrical distribution of electron charge, which lowers the overall energy of the atom and overrides the standard n + l energy ordering [[1]](https://en.wikipedia.org/wiki/Aufbau_principle).
When atoms become ions, electrons are removed from the highest n shell first, which is not necessarily the reverse of the filling order. You can read how to handle this in our guide on the electronic configuration of ions like Fe³⁺ and Cu⁺. If you want to explore the atomic physics behind these rules and exceptions, the Fermi Concept Library has every concept in physics, chemistry, biology, mathematics and computing, each with its own lesson and its place in the map.
Once you understand individual atoms, you can see how large collections of atoms interact in our guide on energy bands: conductors, semiconductors and insulators compared.



