Skip to content
Other

Quantum Number Calculator

Enter the principal quantum number n to see every allowed combination of the four quantum numbers: n, l (azimuthal), ml (magnetic), and ms (spin). You also get the number of orbitals in the shell, the maximum electron capacity, and the orbital subshell names (s, p, d, f). Optionally enter l to focus on a single subshell.

Your details

The shell number: 1 = K, 2 = L, 3 = M, 4 = N, ... Must be a positive integer.
Choose whether to view all subshells for n or zoom in on one specific subshell.
Orbitals in shellValid quantum state
9

Total orbitals = n^2

Max electrons in shell18
Subshells in shell3
Subshell names3s, 3p, 3d
Azimuthal (l) range0 to 2
Spin (ms) values+1/2 (up), -1/2 (down)
Shell letterM
ValidationValid shell: n=3 (M shell). 3 subshells, 9 orbitals, up to 18 electrons.
Orbitals9
Max electrons18
Subshells3

Shell n=3: 9 orbitals, up to 18 electrons.

  • Shell n=3 (M shell) has 3 subshells, 9 orbitals, and can hold up to 18 electrons.
  • The subshells in this shell are: 3s (1 orbital), 3p (3 orbitals), 3d (5 orbitals).
  • Each orbital holds exactly 2 electrons with opposite spins (ms = +1/2 and ms = -1/2), as required by the Pauli Exclusion Principle.

Next stepShell n=3 corresponds to the M shell. Use the subshell mode above to explore a specific l value and see the ml combinations and angular momentum.

Formula

l=0,1,2,,n1ml=l,(l1),,0,,l1,lms=±12Orbitals=n2Max electrons=2n2l = 0, 1, 2, \ldots, n-1 \quad m_l = -l, -(l-1), \ldots, 0, \ldots, l-1, l \quad m_s = \pm\tfrac{1}{2} \quad \text{Orbitals} = n^2 \quad \text{Max electrons} = 2n^2

Worked example

For n=3 (M shell): l can be 0 (3s), 1 (3p), or 2 (3d). The 3p subshell (l=1) has 2(1)+1=3 orbitals and holds 6 electrons. The 3d subshell (l=2) has 2(2)+1=5 orbitals and holds 10 electrons. Total for the M shell: 9 orbitals, 18 electrons.

What are quantum numbers?

Quantum numbers are integer or half-integer values that completely describe the state of an electron in an atom. Four quantum numbers are needed: the principal quantum number n, the azimuthal (orbital angular momentum) quantum number l, the magnetic quantum number ml, and the spin quantum number ms. Together they act like an electron's address, and no two electrons in the same atom can have all four numbers identical (the Pauli Exclusion Principle). The principal quantum number n determines the energy level and the average distance of the electron from the nucleus. It takes positive integer values 1, 2, 3, and so on, and gives the shell names K, L, M, N, O, P, Q.

Azimuthal (l) and magnetic (ml) quantum numbers

The azimuthal quantum number l ranges from 0 to n-1 and defines the shape of the orbital: l=0 is a spherical s orbital, l=1 is a dumbbell-shaped p orbital, l=2 is a d orbital, and l=3 is an f orbital. Each l value gives a subshell containing 2l+1 orbitals. The magnetic quantum number ml ranges from -l to +l in integer steps and describes the orientation of the orbital in space. For example, the 3p subshell (n=3, l=1) has ml values of -1, 0, and +1, corresponding to three orbitals pointing along different axes.

Spin quantum number (ms) and electron capacity

The spin quantum number ms is always either +1/2 (spin up) or -1/2 (spin down). Because each orbital can hold two electrons with opposite spins, the number of electrons per subshell is 2(2l+1) and the total capacity of shell n is 2n^2. The 1s subshell holds 2 electrons (l=0), the 2p subshell holds 6 (l=1), the 3d subshell holds 10 (l=2), and the 4f subshell holds 14 (l=3). These numbers directly explain the lengths of the periods in the periodic table.

Orbital angular momentum

The orbital angular momentum magnitude is L = sqrt(l(l+1)) in units of hbar (reduced Planck constant). For an s electron (l=0) L is zero, for a p electron (l=1) L = sqrt(2) hbar, for a d electron (l=2) L = sqrt(6) hbar. This is a quantum-mechanical result: unlike the classical picture, the angular momentum is never exactly l*hbar. The z-component of the angular momentum is Lz = ml * hbar, which is why ml is called the magnetic quantum number - it splits energy levels in a magnetic field (the Zeeman effect).

Quantum number rules and allowed values

SymbolNameAllowed valuesDescribes
nPrincipal1, 2, 3, 4, 5, 6, 7...Energy level (shell size)
lAzimuthal0 to n-1Orbital shape (subshell)
mlMagnetic-l to +lOrbital orientation in space
msSpin+1/2 or -1/2Electron spin direction

The four quantum numbers and their constraints for electrons in hydrogen-like atoms.

Frequently asked questions

What are the four quantum numbers?

The four quantum numbers are: (1) principal quantum number n (energy level, n = 1, 2, 3...), (2) azimuthal quantum number l (orbital shape, 0 to n-1), (3) magnetic quantum number ml (orbital orientation, -l to +l), and (4) spin quantum number ms (+1/2 or -1/2). Together they uniquely identify the state of an electron in an atom.

Why can't two electrons have the same four quantum numbers?

The Pauli Exclusion Principle states that no two electrons in the same atom can occupy the same quantum state, meaning they cannot have identical values for all four quantum numbers. This is why each orbital (defined by n, l, ml) can hold at most two electrons, and those two must have opposite spins (ms = +1/2 and ms = -1/2).

How many orbitals and electrons does shell n have?

Shell n has n^2 orbitals and a maximum capacity of 2n^2 electrons. The first shell (n=1) has 1 orbital and holds 2 electrons, the second shell (n=2) has 4 orbitals and holds 8 electrons, the third shell (n=3) has 9 orbitals and holds 18 electrons, and the fourth shell (n=4) has 16 orbitals and holds 32 electrons.

What do the subshell letters s, p, d, f mean?

The letters come from spectroscopic terms for the types of lines seen in atomic spectra: s = sharp, p = principal, d = diffuse, f = fundamental. After f, the letters continue alphabetically (g, h, i...). Each letter corresponds to an l value: s is l=0, p is l=1, d is l=2, and f is l=3. The subshell notation combines the shell number and the letter, so "3p" means n=3, l=1.

How is the magnetic quantum number related to orbital orientation?

The magnetic quantum number ml tells you how many distinct orientations an orbital can have in space, and it ranges from -l to +l. An s orbital (l=0) has ml=0, one orientation. A p orbital (l=1) has ml = -1, 0, or +1, three orientations (px, py, pz). A d orbital (l=2) has ml = -2, -1, 0, 1, 2, five orientations. In the presence of an external magnetic field these orientations have slightly different energies, causing spectral lines to split (the Zeeman effect).

Sources

Written by Grace Mbeki, MSc Data Scientist & Educator · Nairobi, Kenya

Turning everyday numbers into clear, actionable answers for the decisions that matter most.

Search 3,500+ calculators

Loading search…