This quantum number calculator takes a set of four quantum numbers and tells you whether it describes a state an electron can actually occupy. If it does not, it names the rule that fails rather than just refusing. Alongside that it works out the structural consequences of your principal quantum number: how many subshells the shell contains, how many orbitals, and how many electrons can fit.
Arb Digital publishes free physics and chemistry calculators that each own one job. This page works at the level of an individual electron state. The electron configuration calculator works at the level of a whole atom, filling subshells in order to produce a configuration and an orbital diagram; it deliberately reports subshell occupancy rather than the four numbers of any one electron. Between them you can go from an element to its subshells and from a subshell to its individual states.
What This Quantum Number Calculator Does
Four numbers describe an electron in an atom completely. The principal quantum number n fixes the shell and the main energy region. The angular momentum quantum number l fixes the subshell and the orbital shape. The magnetic quantum number ml picks one orbital out of that subshell by its spatial orientation. The spin quantum number ms distinguishes the two electrons that can share an orbital.
The calculator checks each against its allowed range and reports the subshell in the usual notation — 3d, 4f, 2p and so on — when the set is valid. It also reports four counts that follow directly: 2l + 1 orbitals in the subshell, twice that many electrons, n² orbitals in the shell and 2n² electrons in it.
The detail panel underneath switches between three listings: the subshells the shell contains, the ml values that exist inside the subshell you chose, and a count of distinct electron states. That last one is the Pauli exclusion principle made concrete — each allowed set of four numbers is one and only one electron.
How to Use It
- Enter the principal quantum number n. It must be a positive whole number. Everything else is bounded by it.
- Enter l. If it is not between 0 and n − 1 the calculator will say so and name the range that would work.
- Enter ml. Allowed values run in whole-number steps from −l to +l inclusive, so a d subshell has five and an f subshell has seven.
- Pick a spin. Only plus or minus one half exists for an electron; there is no third option.
- Read the failure message if there is one. It tells you which rule was broken, which is more useful than a bare rejection.
The Rules: How Quantum Numbers Are Constrained
The allowed ranges are not conventions but consequences of solving the Schrödinger equation for a central potential and requiring the solutions to be single-valued and finite. OpenStax Chemistry 2e, section 6.3 on the development of quantum theory states them directly: an electron in an atom is completely described by four quantum numbers, n takes values 1, 2, 3 and upward, l satisfies 0 ≤ l ≤ n − 1, ml satisfies −l ≤ ml ≤ l giving 2l + 1 orbitals per subshell, and ms is restricted to plus or minus one half.
Those constraints come from the separated solutions of the hydrogen problem. The hydrogen wavefunctions page at Georgia State University's HyperPhysics tabulates the normalised wavefunctions themselves, each labelled by n, l and ml, which is where the labels physically come from: they are the indices of the solutions, not tags attached afterwards.
The counting then follows arithmetically. A subshell with angular momentum quantum number l has 2l + 1 orbitals, each holding two electrons of opposite spin, so 2(2l + 1) electrons. Summing 2l + 1 over l from 0 to n − 1 gives n² orbitals in the shell, and doubling gives the familiar 2n².
Work the defaults by hand. With n = 3, l can be 0, 1 or 2, so the shell holds the 3s, 3p and 3d subshells. Choosing l = 2 gives a d subshell with 2(2) + 1 = 5 orbitals and room for 10 electrons, and ml may be −2, −1, 0, +1 or +2. The value −1 is inside that range, so the set (3, 2, −1, +½) is allowed and names one specific electron in a 3d orbital. The shell as a whole has 3² = 9 orbitals and holds 2 × 9 = 18 electrons.
What Each Number Physically Means
n sets the size and the energy scale. In hydrogen it alone determines the energy, which is why hydrogen's 2s and 2p levels are degenerate. In any atom with more than one electron that degeneracy is broken, because electrons screen one another unevenly depending on how much time they spend near the nucleus.
l sets the magnitude of orbital angular momentum, √[l(l+1)]ℏ, and with it the shape. An s orbital with l = 0 has no angular nodes and is spherically symmetric. A p orbital has one angular node and a dumbbell shape. Higher l means more angular structure and less electron density right at the nucleus, which is exactly why penetration and screening depend on l.
ml sets the component of that angular momentum along a chosen axis, mlℏ. With no external field the 2l + 1 orientations have identical energy. Apply a magnetic field and they separate, which is the Zeeman effect and the reason ml is called the magnetic quantum number in the first place.
ms is intrinsic and has no classical picture behind it. It is not the electron spinning; a point particle has nothing to spin. It is an internal angular momentum of magnitude √(3)ℏ÷2 with only two measurable projections, and its existence is what allows two electrons in one orbital.
Why the Sets Must Be Unique
The Pauli exclusion principle says no two electrons in an atom may share all four quantum numbers. That single statement does an enormous amount of work. It is why electrons stack into successive shells instead of all collapsing into the 1s orbital, why the periodic table has rows of length 2, 8, 8, 18 and 18, and ultimately why matter occupies volume at all.
The counting on this page is a direct expression of it. A subshell has 2l + 1 orbitals and each orbital admits exactly two sets of four numbers, differing only in ms. There is no third spin state, so there is no third electron. The capacity of every subshell in chemistry — 2 for s, 6 for p, 10 for d, 14 for f — is nothing more than that arithmetic.
It also explains a common source of confusion about the periodic table. Row four has 18 elements even though the fourth shell can hold 32, because the 4f subshell lies above the 5s and 6s in energy and does not fill until later. Capacity and filling order are separate questions: this page answers the first, and the electron configuration calculator answers the second.
Where the Simple Picture Runs Out
These four numbers describe a one-electron atom exactly and every other atom approximately. In a multi-electron atom the electrons interact, and the true state is not a simple product of individual orbitals. The hydrogen-like labels survive because the approximation is a good one, not because it is exact.
For heavier elements, spin-orbit coupling mixes l and ms, and the useful labels become the total angular momentum j and its projection mj instead. That is why atomic spectroscopy quotes term symbols rather than four separate numbers, and why relativistic effects matter for the chemistry of gold, mercury and lead.
None of that makes the four-number scheme wrong for teaching or for ordinary chemistry. It just marks where it stops being the natural description. If you want the energy levels themselves rather than the labels, the Bohr model calculator gives the hydrogen-like energies and radii, and the photon energy calculator converts a transition energy into a wavelength.
Arb Digital builds free tools like this one because useful pages earn attention. If you want tools, calculators or content built for your own audience, we can help.
Browse All Free Tools Talk to Arb DigitalCommon Mistakes to Avoid
- Letting l equal n — the ceiling is n − 1, so there is no 2d, no 3f and no 1p. This is the most frequent error by a wide margin.
- Giving ml a value outside −l to +l — a p subshell has only three orbitals, so ml = 2 does not exist there no matter how large n is.
- Using non-integer values — n, l and ml are all integers. Only ms is a half-integer.
- Confusing shell capacity with filling order — the fourth shell holds 32 electrons, but row four of the periodic table has 18 elements because 4f fills much later.
- Reading spin as rotation — ms is an intrinsic property with two allowed projections and no classical analogue.
Related Free Tools From Arb Digital
Take a whole atom to the electron configuration calculator for its filled subshells and orbital diagram, and use the effective nuclear charge calculator to see why subshells within a shell separate in energy. The Bohr model calculator gives hydrogen-like energies and radii, the photon energy calculator converts transition energies to wavelengths, and the de Broglie wavelength calculator covers the wave picture that makes quantisation inevitable. For isotope arithmetic use the average atomic mass calculator. Everything Arb Digital publishes is listed on the free online tools hub.
Frequently Asked Questions
They are n, the principal quantum number setting the shell; l, the angular momentum quantum number setting the subshell and orbital shape; m sub l, the magnetic quantum number picking one orbital by orientation; and m sub s, the spin quantum number, which is plus or minus one half.
Because the allowed range is zero up to n minus one, which falls out of solving the Schrödinger equation for a central potential. That is why a 2d orbital and a 3f orbital do not exist: the angular momentum would exceed what the shell permits.
There are 2l plus 1 of them, so one for s, three for p, five for d and seven for f. Each holds two electrons of opposite spin, giving the familiar capacities of 2, 6, 10 and 14.
Two times n squared. Shell one holds 2, shell two holds 8, shell three holds 18 and shell four holds 32. That is the sum of the subshell capacities within the shell, and it comes straight from counting allowed quantum number sets.
It forbids two electrons in the same atom from sharing all four quantum numbers. Two electrons may share an orbital only if their spin quantum numbers differ, which is why every orbital holds exactly two.
Because shell capacity and filling order are different questions. The fourth shell can hold 32 electrons, but the 4f subshell sits above 5s and 6s in energy and does not begin filling until the lanthanides, so row four ends after 18.
No. Spin is an intrinsic angular momentum with no classical counterpart, and a point particle has nothing to rotate. It has a fixed magnitude and only two measurable projections along any chosen axis, which is what allows two electrons per orbital.
This tool is provided for educational and study use. It applies the standard hydrogen-like quantum number rules and the Pauli exclusion principle, which describe a one-electron atom exactly and multi-electron atoms approximately. It does not account for spin-orbit coupling, electron correlation or relativistic effects, which become significant for heavier elements.