Formula Bro

Math and physics formulas, explained like you are new.


Electron Shell Capacity

In one sentence: Each electron shell can hold a fixed maximum number of electrons: shell 1 holds 2, shell 2 holds 8, and shell 3 holds 18.

Nmax=2n2N_{\max} = 2 n^2

Read it out loud: “N max equals 2 times n squared. N max is the most electrons one shell can hold. n is the shell number, starting at 1 for the shell closest to the nucleus. n squared means n times n. For shell 2, n squared is 4, and two times 4 is 8, so shell 2 holds at most 8 electrons.”

Before you start

The ideas and signs this page uses, explained from zero. For powers of ten, Greek letters and other notation in general, see Math basics.

Squares, like n2n^2

A squared number is the number multiplied by itself. n2n^2 with n=3n = 3 is 3×3=93 \times 3 = 9. In the formula, n2n^2 counts the places, called orbitals, inside a shell. Squaring makes the counts grow fast: the square of 1, 2, 3 and 4 is 1, 4, 9 and 16. So the shell limits 2, 8, 18 and 32 grow faster and faster as you move out to bigger shells.

Shells, subshells and orbitals

An atom’s electrons sit in layers called shells, numbered n=1,2,3n = 1, 2, 3 and so on. Shell 1 is closest to the nucleus. Each shell is split into subshells, named s, p, d and f, which have different shapes. A subshell is made of orbitals, and an orbital is one place where an electron’s wave can sit. The s subshell has 1 orbital, the p subshell has 3, and the d subshell has 5.

Spin and why two electrons fit in one orbital

Electrons have a property called spin, which acts like a tiny built-in direction. It has only two possible values, often called up and down. The Pauli exclusion principle says that no two electrons in an atom can have the same full set of quantum labels. So each orbital holds at most two electrons, and the two must have opposite spins.

Electron configurations, like 1s21s^2 and 3p63p^6

Scientists write which subshells are filled with a short code. The number is the shell, the letter is the subshell, and the raised number is how many electrons it holds. So 1s21s^2 means two electrons in the s subshell of shell 1, and 3p63p^6 means six electrons in the p subshell of shell 3. A list such as 1s22s22p61s^2\ 2s^2\ 2p^6 is called an electron configuration.

The filling order and the Madelung rule

Electrons go into the lowest-energy subshell that still has room. The Madelung rule ranks subshells by n+ln + l, where ll is 0 for s, 1 for p, 2 for d and 3 for f. A smaller total fills first, and if two totals are equal, the smaller nn goes first. So 4s, with a total of 4+0=44 + 0 = 4, fills before 3d, with a total of 3+2=53 + 2 = 5.

Atomic number ZZ and neutral atoms

The number of protons in an atom’s nucleus is its atomic number, written ZZ. A neutral atom has the same number of electrons as protons, so potassium, with 19 protons, has 19 electrons. Electrons carry negative charge and protons carry positive charge, and the two balance in a neutral atom.

What each symbol means

SymbolMeaning

NmaxN_{\max}

The maximum number of electrons that the shell with number nn can hold. It is a count of electrons, so it has no unit, and it is always a whole number such as 2, 8, 18 or 32.

nn

The shell number, also called the principal quantum number, a whole number 1, 2, 3 and so on. Shell 1 is closest to the nucleus, and bigger numbers are farther out with more room. It has no unit.

The formula piece by piece

nn

Start with the shell number nn, a whole number that labels the layer. Shell 1 is closest to the nucleus. The bigger nn is, the farther out the shell sits and the more room it has inside.

n2n^2

Square it. n2n^2 counts the orbitals in shell nn, the places where an electron’s wave can sit. Shell 1 has 12=11^2 = 1 orbital. Shell 2 has 22=42^2 = 4, one s and three p. Shell 3 has 32=93^2 = 9, one s, three p and five d.

2n22 n^2

Multiply by 2. Each orbital holds two electrons, one with spin up and one with spin down. Shell 2 therefore holds 2×4=82 \times 4 = 8 electrons, and shell 3 holds 2×9=182 \times 9 = 18.

Nmax=2n2N_{\max} = 2 n^2

The whole formula in one sentence: the most electrons a shell can hold equals two times the shell number squared.

What the formula is doing, and why

Electrons in an atom sit in shells, labeled by the whole number nn. What goes in is the shell number nn. What comes out is the largest number of electrons that shell can hold. Shell 1 holds 2 electrons, shell 2 holds 8, shell 3 holds 18, and shell 4 holds 32.

Why n2n^2? Shell nn has n2n^2 orbitals, the places an electron’s wave can occupy. Shell 2 has four of them: one 2s orbital and three 2p orbitals. Shell 3 has nine: one 3s, three 3p and five 3d. The count of orbitals grows as squares, so the electron limit grows as squares too.

Why times two? Each orbital holds at most two electrons, and the two must have opposite spins. The Pauli exclusion principle is the rule behind this: no two electrons in an atom can share the same full set of labels. That is why the count doubles the orbital count. Two electrons in one orbital with opposite spins are called a pair.

Why is it a maximum? The formula counts the room in a shell, not the electrons actually there. Many atoms have fewer electrons in a shell than the limit, and the outer shell is often only partly full. Electrons fill the lowest-energy subshells first. The 4s subshell fills before the 3d subshell, even though 3d belongs to the third shell. So a shell can be partly filled while the next one has already started.

Where does it apply? The limit is an exact counting rule for each shell. The filling order is a helpful guide to the ground state of an atom, but it has exceptions. Chromium and copper are the classic examples, where one electron moves from 4s to 3d. Those exceptions show that the filling order is a guide and not an exact law.

An everyday picture

Think of a building with floors of apartments. Floor nn has n2n^2 rooms, and each room fits two people as long as they differ in one small way, their spin. Floor 1 has 1 room, floor 2 has 4 rooms and floor 3 has 9 rooms. A floor can hold twice as many people as it has rooms, which is 2n22n^2.

Worked example: Electrons in potassium, element 19

A neutral potassium atom has 19 protons in its nucleus, so it has 19 electrons. The shell limits are 2n22n^2: 2 for shell 1, 8 for shell 2, 18 for shell 3 and 32 for shell 4. We fill the shells from the bottom up and see where the 19 electrons end up.

  1. Count the electrons. Potassium has atomic number 19, and a neutral atom has as many electrons as protons, so we have 19 electrons to place. We start with shell 1, since it is closest to the nucleus and has the lowest energy.
  2. Fill shell 1. Shell 1 holds at most 2 electrons. Put 2 there, which leaves 19−2=1719 - 2 = 17 electrons. Shell 1 has one s orbital, so both electrons share that orbital, with opposite spins.
  3. Fill shell 2. Shell 2 holds at most 8 electrons. Put all 8 in, which leaves 17−8=917 - 8 = 9 electrons. Shell 2 is now full: 2 electrons fill its 2s orbital and 6 fill its three 2p orbitals.
  4. Fill shell 3, but only partly. Shell 3 could hold 18, but the 4s subshell has lower energy than the 3d subshell, so the next electrons go to 4s first. Put 8 electrons into shell 3, which fill 3s with 2 and 3p with 6. That leaves 9−8=19 - 8 = 1 electron.
  5. Place the last electron. One electron is left. It goes into the 4s subshell, which belongs to shell 4, because 4s is the next lowest-energy place. The 3d subshell stays empty, which is why shell 3 is not full.
  6. Check the total. Add the shells: 2+8+8+1=192 + 8 + 8 + 1 = 19. Every electron is placed, and no shell is over its limit. Shell 3 holds 8 of its possible 18 electrons, and shell 4 holds 1 of its possible 32.

Answer: Potassium’s 19 electrons sit in the shells as 2, 8, 8, 1. Shell 3 has room for 18 but holds only 8, because the last electron goes into 4s rather than 3d. The configuration is written 1s22s22p63s23p64s11s^2\ 2s^2\ 2p^6\ 3s^2\ 3p^6\ 4s^1, which means two electrons in 1s, two in 2s, six in 2p, two in 3s, six in 3p and one in 4s.

The numbers in this example are recomputed by script every time the site is built.

Common mistakes

Where you will meet it

Questions people ask

Why does a shell hold $2n^2$ and not $n$ electrons?

Each shell has n2n^2 orbitals, and each orbital holds two electrons with opposite spins. Shell 2 has four orbitals, so it holds eight electrons.

Why does 4s fill before 3d?

The Madelung rule ranks subshells by n+ln + l, where ll is 0 for s, 1 for p and 2 for d. For 4s, n+l=4+0=4n + l = 4 + 0 = 4, and for 3d, n+l=3+2=5n + l = 3 + 2 = 5. The smaller total fills first, so 4s comes before 3d in a neutral atom.

Are the numbers 2, 8, 18 and 32 exact?

They are the maximum counts given by the counting rule, so each maximum is exact. Real atoms can have fewer electrons in a shell than the maximum, and the exceptions to the filling order show that the simple order is only a guide.

Sources

  1. Electron shell, Wikipedia
  2. Aufbau principle, Wikipedia
  3. Electron configuration, Wikipedia

| All Quantum formulas |

Published 2026-10-22. Plain-text copy for AI agents and readers: quantum-mechanics/electron-shell-capacity.md.