Each electron shell around an atom holds a maximum number of electrons determined by a simple formula: 2n², where n is the shell number. The first shell holds 2, the second holds 8, the third holds 18, and the fourth holds 32. These capacities shape everything from the layout of the periodic table to why certain elements react eagerly while others sit inert, and the real-world filling pattern is less tidy than the formula alone suggests.
The Capacity of Each Shell
The shells are numbered outward from the nucleus, starting at 1. Plugging each shell number into 2n² gives you the maximum electron count:
- Shell 1 (n = 1): 2 × 1² = 2 electrons
- Shell 2 (n = 2): 2 × 2² = 8 electrons
- Shell 3 (n = 3): 2 × 3² = 18 electrons
- Shell 4 (n = 4): 2 × 4² = 32 electrons
- Shell 5 (n = 5): 2 × 5² = 50 electrons
In practice, no known element has enough electrons to completely fill shell 5 or beyond. The heaviest confirmed elements top out in the low 100s of electrons total, so the later shells are always partially occupied. Still, the formula describes the theoretical ceiling, and it holds because of the way electrons distribute themselves among subshells within each main shell.
Why Those Numbers and Not Others
Each shell is subdivided into subshells, labeled s, p, d, and f. These aren’t arbitrary categories; they reflect physically distinct shapes of the regions where electrons are likely to be found. Each subshell type has a fixed capacity: an s subshell holds up to 2 electrons, a p subshell holds up to 6, a d subshell holds up to 10, and an f subshell holds up to 14. The pattern behind those numbers is that each subshell contains a certain number of orientations (1, 3, 5, and 7 respectively), and each orientation holds exactly 2 electrons because two electrons can share the same spatial region as long as they spin in opposite directions.
Shell 1 contains only an s subshell, so its capacity is just 2. Shell 2 has an s and a p subshell, giving it 2 + 6 = 8. Shell 3 adds a d subshell: 2 + 6 + 10 = 18. Shell 4 adds an f subshell: 2 + 6 + 10 + 14 = 32. If you add up the subshell capacities for any shell, you always land on 2n². The formula is a shortcut for the total, but the subshells are the reason the shortcut works.
Why Shells Don’t Fill in the Order You’d Expect
If electrons simply filled shell 1, then shell 2, then shell 3 to its full 18-electron capacity before moving on, chemistry would be much simpler and the periodic table would look very different. What actually happens is that some subshells in a higher-numbered shell fill before certain subshells in a lower-numbered shell are complete. For example, the 4s subshell fills before the 3d subshell in most light atoms, even though 4s belongs to shell 4 and 3d belongs to shell 3. This is why the third row of the periodic table contains only 8 elements (sodium through argon) rather than 18: after the 3s and 3p subshells are full at argon, the next electrons go into 4s, not 3d.
This ordering is often taught as a fixed sequence using a diagonal-arrow diagram that walks through 1s, 2s, 2p, 3s, 3p, 4s, 3d, 4p, 5s, 4d, and so on. That diagram works reasonably well for predicting the ground-state configurations of lighter elements, but it starts to break down among the transition metals. Research into the actual energy ordering of orbitals in multi-electron atoms shows that the textbook rule of (n+1)s always lying below nd is true only for the very first elements in each long row of the periodic table. For most transition metals, the d subshell is actually lower in energy than the s subshell of the next shell, which is the opposite of what the simple mnemonic suggests.1Chemistry – A European Journal. The challenge of the so-called electron configurations of the transition metals
The practical result is that the electron configurations printed in most periodic tables are the configurations of free, isolated, ground-state atoms. They describe the lowest-energy arrangement for a lone atom floating in a vacuum. When those same atoms bond with other atoms or form ions, the electrons rearrange, and the filling order changes. Transition metals, for instance, lose their outermost s electrons first when they form positive ions, even though those s electrons supposedly went in last. The standard configurations are a useful filing system, but treating them as a rigid stacking rule can mislead you about how chemistry actually works.2Chemistry – A European Journal. The challenge of the so-called electron configurations of the transition metals
Why Eight Electrons Keeps Coming Up
If the third shell holds 18 electrons and the fourth holds 32, why does so much of introductory chemistry revolve around the number eight? The answer ties back to which subshells are actually accessible for bonding. For most of the lighter elements that dominate everyday chemistry (carbon, nitrogen, oxygen, fluorine, and their neighbors), the valence shell consists of one s and three p subshells, totaling a capacity of 8 electrons. The d subshell belonging to the same shell is too high in energy to participate in normal bonding for these elements.
This is the basis of the octet rule: atoms in molecules tend to share, gain, or lose electrons until they have eight electrons in their outermost shell, counting each shared pair as contributing to both atoms involved. The concept was formalized by Gilbert Lewis and remains one of the most useful rules of thumb in chemistry.3Coordination Chemistry Reviews. The octet rule and hypervalence: two misunderstood concepts Hydrogen is the obvious exception, since its first shell maxes out at 2. But for the vast majority of atoms you encounter in organic molecules, biological systems, and common materials, eight is the magic number for a stable outer shell.
The octet rule is not a law of physics, though, and it has well-known exceptions. Elements in the third row and below can sometimes accommodate more than eight electrons in their valence region because their d subshells become energetically accessible. Sulfur in sulfate, phosphorus in phosphate, and xenon in certain fluoride compounds all exceed eight valence electrons. These cases are sometimes called “hypervalent,” though there is ongoing debate about whether the extra electrons truly occupy d orbitals or whether the bonding is better described in other ways.4Coordination Chemistry Reviews. The octet rule and hypervalence: two misunderstood concepts For everyday chemistry involving the first two rows of the periodic table, though, eight is the number to remember.
How Electrons Arrange Themselves Within a Subshell
When a subshell is only partially filled, electrons don’t just pair up immediately. They spread out among the available orientations first, each one spinning in the same direction, before any of them doubles up with an opposite-spinning partner. This is known as Hund’s rule, and it reflects the fact that electrons carrying the same spin tend to stay farther apart from each other, which lowers their mutual repulsion and makes the arrangement more stable.
Hund’s rule holds reliably for the ground states of atoms across the periodic table. Interestingly, the reason it works is subtler than it first appears. You might assume that the configuration with the most spread-out, same-spin electrons simply has the lowest electron-electron repulsion, but detailed calculations show that the interelectronic repulsion can actually be higher in the same-spin state for some atoms. The stability instead comes from how the electrons interact with the nucleus in that arrangement. Research comparing atoms to artificial confined systems like quantum dots found that Hund’s rule holds in both cases, but the pattern of which configuration has lower repulsion can reverse depending on the system.5Chemical Physics Letters. Singlet vs. triplet interelectronic repulsion in confined atoms For the practical question of how electrons fill shells, the takeaway is straightforward: within any subshell, electrons spread out before they pair up, and that pattern determines the magnetic and chemical properties of the element.
What Changes for the Heaviest Elements
The 2n² formula doesn’t break down for superheavy elements, but the way electrons actually occupy those shells becomes far less predictable. In atoms with very high atomic numbers (roughly element 100 and beyond), the innermost electrons are moving at speeds that are a significant fraction of the speed of light. At those speeds, relativistic effects kick in and change the sizes and energies of the shells in ways that the simple model doesn’t anticipate.
The most dramatic effect is a strong contraction of s and p subshells. Calculations on superheavy elements like copernicium (element 112) show that the 7s orbital shrinks to about 69% of the size it would have without relativistic effects.6Nuclear Physics A. Relativistic and quantum electrodynamic effects in superheavy elements This contraction pulls those inner electrons closer to the nucleus, which in turn shields the nucleus more effectively from the outer d and f electrons. The d and f subshells, by contrast, expand and destabilize. The net result is that some subshells that are well-separated in lighter elements end up sitting at nearly the same energy in superheavy atoms. In copernicium, for instance, the contracted 7s shell ends up spatially close to the 6d shell, blurring the boundary between them.7Nuclear Physics A. Relativistic and quantum electrodynamic effects in superheavy elements
There is also a large spin-orbit splitting effect, where a single subshell splits into two sub-levels with meaningfully different energies. The 6d subshell in superheavy elements, for example, splits by over 5 electron-volts, which is a huge gap by atomic standards.8Nuclear Physics A. Relativistic and quantum electrodynamic effects in superheavy elements This splitting means that thinking of “the 6d shell” as a single container with a neat capacity of 10 becomes misleading; it behaves more like two separate containers with different energies and different filling behaviors.
These relativistic distortions are part of why predicting the chemistry of superheavy elements is so difficult. The periodic table’s structure relies on the assumption that elements in the same column share similar electron arrangements and therefore similar chemistry. For the heaviest known elements, that assumption is under serious strain. Whether element 120, for instance, behaves like the alkaline earth metals above it in the table depends on whether its 8s electrons behave as expected or are scrambled by relativistic effects. Experimental data are sparse because these elements are extremely short-lived and produced only a few atoms at a time, but theoretical work consistently shows that the neat shell model becomes more of an approximation and less of a description as you move to the bottom of the table.
Shell Structure in Artificial Atoms
One of the more unexpected confirmations that the shell model captures something genuinely fundamental, rather than just being a convenient simplification for atoms, comes from quantum dots. These are nanoscale semiconductor structures that trap a small number of electrons in a tiny space. Because the electrons are confined, they organize themselves into energy levels that closely mirror the shell structure of real atoms, which is why quantum dots are sometimes called “artificial atoms.”
Experiments and calculations on these systems have shown that the few-electron ground states in quantum dots display the same kind of shell-filling behavior seen in atoms, and they obey Hund’s rule just as real atoms do.9Physica E: Low-dimensional Systems and Nanostructures. Electronic states in quantum dot atoms and molecules When you add electrons to a quantum dot one by one, you see the same pattern: the first shell fills at 2 electrons, the second at 8, and so on. The energy to add the next electron jumps at these shell closures, just as ionization energies spike at noble gas configurations in real atoms.
The quantum dot case is useful because it strips away much of the complexity of real atoms. There is no nucleus made of protons and neutrons, no relativistic inner core, no complicated multi-electron screening. The confining potential is smooth and roughly uniform. Yet the shell structure emerges anyway, because it is a consequence of how quantum mechanics organizes confined particles into discrete energy levels. The 2n² pattern, at its root, is not a peculiarity of atomic physics. It is a mathematical inevitability that arises whenever quantum particles are confined in a roughly spherical potential and the exclusion principle prevents any two from occupying the same state. Quantum dots give us a clean demonstration that the same organizing principle operates across very different physical systems.10Physica E: Low-dimensional Systems and Nanostructures. Electronic states in quantum dot atoms and molecules
Where the Simple Picture Falls Short
For a quick mental model of atomic structure, the shell capacities of 2, 8, 18, and 32 are accurate and useful. They explain why the periodic table’s rows have the lengths they do (2, 8, 8, 18, 18, 32, 32 if you include the lanthanides and actinides), and they predict the broad outlines of chemical behavior remarkably well. But there are a few places where the simple picture can lead you astray if you take it too literally.
First, “maximum capacity” does not mean “usual occupancy.” No atom in its ground state has a shell sitting at exactly its 2n² limit beyond the first few elements. Argon has 18 electrons total, filling shells 1 and 2 completely and putting 8 into shell 3, but shell 3’s theoretical maximum is 18. The remaining 10 spots are left empty because, as discussed earlier, the 4s subshell fills before 3d.
Second, the idea of distinct, sharply bounded shells is itself an approximation. In a real atom with many electrons, the probability clouds of different shells overlap spatially. An electron officially in the 3d subshell spends some of its time closer to the nucleus than some electrons in the 3s subshell. These overlaps are what make the filling order deviate from the simple 1-2-3-4 sequence, and they become more pronounced for heavier elements where relativistic effects compress inner shells and expand outer ones.
Third, the shell model treats electrons as independent particles moving in the average field created by all the others, but electrons are mutually repulsive charged particles that are constantly influencing each other’s motion. The interelectronic repulsion effects studied in confined atoms show that even the rule governing how electrons arrange within a shell, Hund’s rule, works for subtler reasons than the simple “stay apart to reduce repulsion” explanation suggests.11Chemical Physics Letters. Singlet vs. triplet interelectronic repulsion in confined atoms The shell model is a first-pass framework. It captures the essential structure, but every detail beyond “how many can fit” requires peeling back another layer of physics.
None of this means the 2n² rule is wrong. It accurately describes the maximum occupancy of each shell, and that occupancy drives the periodic table, chemical bonding, and the properties of nearly every material you interact with. Just keep in mind that the number tells you the capacity of the container, not necessarily how many electrons are actually in it at any given time, or in what order they arrived.

