Saved

Press the star next to a tool's name to save it.

All my tools

Quantum Number Calculator

Use this quantum number calculator to list the allowed values of l, mℓ and mₛ for a principal quantum number n, with the orbital and electron counts of each subshell.

Restored your last values ·

Enter n to list the allowed values of l, mℓ and mₛ with the number of orbitals and electrons in the shell. Add l if you also want the magnetic quantum numbers of one subshell.

Everything is worked out in your browser. Nothing you type is sent anywhere.

–

–

Enter the principal quantum number n, then press Calculate.

See full result

A quantum number calculator lists every allowed set of quantum numbers for an electron shell. Enter the principal quantum number n, and it gives the allowed angular momentum values l, the magnetic values mℓ, the two spin values mₛ, and the number of orbitals and electrons the shell can hold.

How to use the quantum number calculator

  1. Enter the principal quantum number n, a whole number from 1 to 20.
  2. Optionally enter l to see the magnetic quantum numbers of one subshell.
  3. Press Calculate and read the allowed values and the counts.

The four quantum numbers

An electron in an atom is described by four quantum numbers. The principal number n sets the shell and the main energy level, the angular momentum number l sets the subshell, the magnetic number mℓ sets the orbital within the subshell, and the spin number mₛ gives the electron's spin [2]. The calculator lists the allowed combinations for the n that you choose.

The allowed values of l

For a given n, the possible values of l are the whole numbers from 0 to n − 1 [1]. So the first shell has only l = 0, the second has l = 0 and 1, and the third has l = 0, 1 and 2. Each value of l is named by a letter, and the calculator prints the shell and the letter together, as in 3d.

Subshell letters

The subshells are named s for l = 0, p for 1, d for 2 and f for 3. After that the letters run on from g for l = 4, h for 5 and i for 6, in alphabetical order and skipping the letters already used and the letter j [1]. Wikipedia notes that no known atom has an electron with l higher than 3 (f) in its ground state [1]. The calculator uses these names up to i and gives the plain number of l beyond that.

The magnetic and spin numbers

For a given l, the magnetic number mℓ takes every whole value from −l to +l, including 0, which gives 2l + 1 possible states [1]. The spin number takes only the values +1/2 and −1/2 [2]. Each orbital holds two electrons with opposing spins [1]. Together these rules mean that no two electrons in an atom can share the same four numbers.

Counting orbitals and electrons

A subshell with the number l has 2l + 1 orbitals and can hold 2 × (2l + 1) electrons, since each orbital takes two electrons with opposing spins [1]. A whole shell can hold up to 2n² electrons, which is 18 for n = 3 [3]. Adding 2l + 1 over l = 0 to n − 1 gives n², so a shell has n² orbitals, with two electrons in each. The n² orbital count is our own step. For n = 3 it gives 9 orbitals and 18 electrons.

A worked example

Take n = 3. The allowed values of l are 0, 1 and 2, the subshells 3s, 3p and 3d. They hold 1, 3 and 5 orbitals, so 2, 6 and 10 electrons, and the shell has 9 orbitals and 18 electrons in total. Add l = 1 and the calculator shows mℓ = −1, 0 and 1 for the 3p subshell, three orbitals that can take six electrons between them.

How the shells grow

The shell table on Wikipedia lists maximum counts of 2, 8, 18 and 32 electrons for the first four shells, and 50 for the fifth [3]. These all follow the 2n² pattern. In real atoms these upper subshells are not filled in the order of n, because the energy of the subshells overlaps. The calculator shows the capacity allowed by the rules, not the electron configuration of an element.

What the calculator does not do

The calculator lists the allowed quantum numbers. It does not find the ground-state electron configuration of an atom, and it does not tell you the energy of a level. For those jobs you need an electron configuration tool or the periodic table. It also limits n to 20, a limit of our own, because the lists become very long and no real atom uses such a shell in its ground state.

Where it is used

Chemistry and physics students use the allowed sets of quantum numbers to check homework, to see why the periodic table has rows of 2, 8, 18 and 32 elements, and to decide whether a given set such as n = 2, l = 2 is possible. It is not, because l must be less than n. The calculator's error message says so when you try it.

Reading the table of states

If you list every state of the third shell, you get 18 rows: for each of the nine orbitals there are two spins. Counting them by subshell gives 2 in 3s, 6 in 3p and 10 in 3d, and these add up to the shell's capacity [3]. The calculator prints this breakdown on one line, so it is easy to copy into notes or an answer sheet. It is a quick way to check a hand count.

Why the numbers are limited

The limits on the quantum numbers come from the mathematics of the electron's wave in an atom, and they are the reason that atoms have a shell structure. Since l cannot reach n, the first shell has only an s subshell, and since mℓ is limited to the range of l, a p subshell has three orbitals. The periodic table's block layout reflects these rules, though that link is our own remark.

Common mistakes

  • Choosing l equal to n. l can be at most n − 1, so n = 2 cannot have l = 2.
  • Forgetting the spin. Each orbital holds two electrons, so the electron count is twice the orbital count.
  • Reading the capacity as the configuration. The shell capacity is not the number of electrons in a real atom.
  • Entering a fraction for n. n is a whole number starting from 1.

What next

Use this often? Add Quantum Numb to your Home screen.

Frequently asked questions

What is a quantum number calculator?

It lists the allowed quantum numbers for an electron shell and counts its orbitals and electrons.

What are the allowed values of l for a given n?

The whole numbers from 0 to n − 1.

How many orbitals does a subshell have?

A subshell with the number l has 2l + 1 orbitals.

How many electrons can a shell hold?

A shell holds 2n² electrons, for example 18 when n = 3, two per orbital.

What values can the spin quantum number take?

Only +1/2 or −1/2.

What went wrong?

We only receive the reason you pick, never what you typed into the tool.

Thanks for your feedback.

More Physics & Science Tools