Skip to content

Quantum Number Calculator

Find the electron configuration of any element with the quantum numbers of its last electron, check whether n, l, mₗ and mₛ are allowed, and list orbitals per shell.

Calculator Details

Iron (Z = 26):[Ar] 3d⁶ 4s²See results ↓

An element’s configuration and last electron, check a set of quantum numbers, or list a shell

Pick by symbol (atomic number shown)

Textbooks differ: the first electron in a subshell goes to mₗ = +l (default) or mₗ = −l. Only the sign of the last electron’s mₗ changes.

Your Results

Iron (Z = 26): [Ar] 3d⁶ 4s²

Iron (Z = 26)

[Ar] 3d⁶ 4s²

1s² 2s² 2p⁶ 3s² 3p⁶ 3d⁶ 4s²

Last electron

n = 3, l = 2, mₗ = 2, mₛ = −½

In the 3d subshell

Unpaired electrons

4

Paramagnetic (attracted by a magnet)

Iron (Z = 26) is [Ar] 3d⁶ 4s², with 4 unpaired electrons; its last electron has n = 3, l = 2, mₗ = 2, mₛ = −½.

Compare scenarios

Save these inputs as a scenario, change them, and compare the results side by side.

Loading, available in a moment

Detailed Breakdown

Orbital diagram of Iron
SubshellElectronsOrbitals (↑ spin up, ↓ spin down, · empty)Unpaired
1s2 of 2↑↓0
2s2 of 2↑↓0
2p6 of 6↑↓ ↑↓ ↑↓0
3s2 of 2↑↓0
3p6 of 6↑↓ ↑↓ ↑↓0
3d (last filled)6 of 10↑↓ ↑ ↑ ↑ ↑4
4s2 of 2↑↓0

How This Calculator Works

How It’s Calculated

n = 1, 2, 3… · l = 0 … n − 1 · mₗ = −l … +l · mₛ = +½ or −½
Orbitals: 2l + 1 per subshell, n² per shell · Electrons: 2(2l + 1) per subshell, 2n² per shell
Filling order (Madelung): 1s 2s 2p 3s 3p 4s 3d 4p 5s 4d 5p 6s 4f 5d 6p 7s 5f 6d 7p

Your result: 26 electrons fill the subshells in Madelung order, giving 1s² 2s² 2p⁶ 3s² 3p⁶ 3d⁶ 4s². The last electron goes into 3d: n = 3, l = 2, and by Hund’s rule (orbitals filled singly from mₗ = +l before pairing) mₗ = 2, mₛ = −½.

Some books fill orbitals from mₗ = −l instead of +l, which changes the sign of the last electron’s mₗ but not the configuration; choose either under “Fill orbitals from”.

Frequently Asked Questions

What are the four quantum numbers?

The principal quantum number n (the shell, 1, 2, 3…), the angular momentum quantum number l (the subshell shape, 0 to n − 1: s, p, d, f), the magnetic quantum number mₗ (which orbital in the subshell, −l to +l) and the spin quantum number mₛ (+½ or −½). Together they identify one electron in an atom.

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

The Pauli exclusion principle forbids it. Each orbital (a set of n, l and mₗ) can therefore hold at most two electrons, one with mₛ = +½ and one with mₛ = −½. That is where the subshell capacities of 2, 6, 10 and 14 for s, p, d and f come from.

How many electrons fit in a shell?

2n². Shell n = 3 has subshells 3s, 3p and 3d with 9 orbitals and room for 18 electrons. In real atoms 3d fills after 4s, so the third shell isn’t full until zinc.

Why is chromium 3d⁵ 4s¹ and not 3d⁴ 4s²?

The 3d and 4s subshells are very close in energy, and a half-filled d subshell lowers the energy through exchange stabilisation, so one 4s electron moves to 3d. NIST’s measured ground states give chromium [Ar] 3d⁵ 4s¹ and copper [Ar] 3d¹⁰ 4s¹. The calculator uses the measured exceptions for every element up to lawrencium.

What is Hund’s rule?

Electrons fill the orbitals of a subshell one at a time with parallel spins before any pairs up. Oxygen’s four 2p electrons go into three orbitals as ↑↓ ↑ ↑, leaving 2 unpaired electrons, which is why liquid oxygen is attracted to a magnet.

What are the quantum numbers of the last electron in iron?

Iron is [Ar] 3d⁶ 4s². Its last electron is the sixth in the 3d subshell, so n = 3 and l = 2; it pairs with the first, giving mₗ = 2 and mₛ = −½ when orbitals are filled from mₗ = +l (or mₗ = -2 if your textbook fills from −l; the page offers both). Iron has 4 unpaired electrons, which underlies its magnetism.

What does the noble gas shorthand mean?

It replaces the inner, filled electrons with the symbol of the previous noble gas in brackets. Iron’s full configuration starts 1s² 2s² 2p⁶ 3s² 3p⁶, exactly argon’s, so it is written [Ar] 3d⁶ 4s². The electrons after the core are the ones that take part in bonding.

Are configurations of the heaviest elements known?

Measured ground states exist up to lawrencium (Z = 103). For elements 104 to 118 only a few atoms have ever been made, so their configurations come from theory; the calculator gives the simple filling order and marks it as predicted. Relativistic effects may change some of them.

Ground-state configurations follow the Madelung filling order with the exceptions measured by NIST (Atomic Spectra Database, ground levels of the neutral atoms, Z = 1–103); elements 104–118 use the filling order and are marked as predicted. The last electron’s mₗ and mₛ follow the textbook convention you choose (fill from mₗ = +l, the default, or from mₗ = −l; spin up first). It covers neutral atoms in their ground state only: it leaves out ions, excited states, term symbols and relativistic j–j coupling.

Quantum Number Calculator: Electron Configurations, Orbitals and the Last Electron

By FindMySum · Last reviewed

Every electron in an atom is described by four quantum numbers. Together they say which shell it is in, the shape and orientation of its orbital, and its spin. This quantum number calculator does three jobs: it writes the ground-state electron configuration of any element with an orbital diagram and the quantum numbers of the last electron added, it checks whether a set of n, l, mₗ and mₛ is allowed, and it lists the subshells, orbitals and electron capacity of any shell.

The four quantum numbers

  • Principal, n = 1, 2, 3… The shell. Larger n means a bigger orbital with an electron that is, on average, farther from the nucleus and higher in energy.
  • Angular momentum, l = 0 to n − 1. The subshell and the orbital's shape: l = 0 is s (spherical), 1 is p (dumbbell), 2 is d and 3 is f.
  • Magnetic, mₗ = −l to +l. The orientation of the orbital. A subshell has 2l + 1 orbitals: one s, three p, five d, seven f.
  • Spin, mₛ = +½ or −½. The electron's intrinsic angular momentum, spin up or spin down.

The Pauli exclusion principle says no two electrons in an atom share all four, so each orbital holds two electrons of opposite spin. That fixes the capacities: 2(2l + 1) electrons per subshell (2, 6, 10, 14) and 2n² per shell (2, 8, 18, 32).

Checking a set of quantum numbers

In the check mode, enter n, l, mₗ and mₛ. The calculator tests the two rules that sets most often break, that l must be less than n and that mₗ must lie between −l and +l, and names the orbital when the set is allowed. The default, n = 3, l = 2, mₗ = −1, is one of the five 3d orbitals; n = 2, l = 2 is not allowed because the second shell has no d subshell.

Electron configurations: the filling order

Electrons occupy the lowest-energy subshells first (the Aufbau principle). For most atoms the order follows the Madelung rule: increasing n + l, and for equal n + l, increasing n. That gives 1s, 2s, 2p, 3s, 3p, 4s, 3d, 4p, 5s, 4d, 5p, 6s, 4f, 5d, 6p, 7s, 5f, 6d, 7p. Within a subshell, Hund's rule spreads the electrons across the orbitals with parallel spins before any pair up.

The rule is not perfect. Twenty elements up to lawrencium have measured ground states that differ from it, because nearly equal subshells can trade electrons when a half-filled or filled subshell lowers the energy. Chromium is [Ar] 3d⁵ 4s¹ rather than 3d⁴ 4s², copper [Ar] 3d¹⁰ 4s¹, palladium [Kr] 4d¹⁰ with an empty 5s, and gold [Xe] 4f¹⁴ 5d¹⁰ 6s¹. The calculator takes every exception from NIST's table of measured ground levels, so its answers match the spectroscopic data rather than the simple rule.

Worked example: iron

The calculator opens with iron, Z = 26.

  • The first 18 electrons fill 1s² 2s² 2p⁶ 3s² 3p⁶, the same as argon.
  • The next two go into 4s, which comes before 3d in the Madelung order.
  • The last six go into 3d.

Written in shell order, as NIST writes it, that is 1s² 2s² 2p⁶ 3s² 3p⁶ 3d⁶ 4s², or [Ar] 3d⁶ 4s² in noble-gas shorthand. In the 3d subshell, Hund's rule puts one electron in each of the five orbitals first and then pairs the sixth: ↑↓ ↑ ↑ ↑ ↑. Iron therefore has four unpaired electrons. The last electron added is that sixth 3d electron: n = 3, l = 2, and filling from mₗ = +2 downward, it pairs in the mₗ = +2 orbital with mₛ = −½.

Reading the orbital diagram

The table lists every occupied subshell in shell order with its electrons, its orbitals drawn as ↑↓ (paired), ↑ (single) or · (empty), and its unpaired electrons. The subshell filled last is marked. Unpaired electrons make an atom paramagnetic, attracted by a magnet; an atom with none, such as zinc or neon, is diamagnetic.

Conventions and limits

Textbooks disagree on one detail: whether the first electron in a subshell gets mₗ = +l or mₗ = −l. This calculator starts at +l with spin up by default; switch "Fill orbitals from" to −l to match a book that starts there. The configuration is the same either way, and only the sign of the last electron's mₗ changes. The configurations are for neutral atoms in their ground state. Ions, excited states and term symbols are not covered, and for elements beyond lawrencium, where no ground state has been measured, the calculator gives the Madelung prediction and labels it as such.

More questions

Where do quantum numbers come from?

From solving the Schrödinger equation for an electron bound to a nucleus. The wave function only fits certain shapes and energies, labelled by whole numbers n, l and mₗ, much as a guitar string only vibrates at certain harmonics. Spin, the fourth quantum number, came from experiments such as Stern–Gerlach and from Dirac's relativistic theory.

Why are the subshells called s, p, d and f?

The letters come from 19th-century descriptions of spectral lines: sharp, principal, diffuse and fundamental. After f the letters continue alphabetically (g, h, i…), skipping j. No ground-state atom uses a g subshell, though excited states do.

Does the 4s subshell really fill before 3d?

In neutral atoms from potassium to calcium, yes: 4s is lower in energy when 3d is empty. Once 3d electrons are present, 3d drops below 4s, which is why transition metals lose their 4s electrons first when they form ions: Fe²⁺ is [Ar] 3d⁶, not [Ar] 3d⁴ 4s².

What is the difference between an orbital and a shell?

A shell is all the orbitals with the same n. A subshell groups those with the same n and l (for example 3p). An orbital is one specific n, l and mₗ, a region holding up to two electrons. Shell 3 has three subshells (3s, 3p, 3d) and nine orbitals.

How do quantum numbers explain the periodic table?

The table's blocks follow the subshell being filled: the s block (groups 1–2), the p block (groups 13–18), the d block (transition metals) and the f block (lanthanides and actinides). Each period starts a new shell, and elements in the same group have the same outer configuration, which is why they behave alike.

What is a paramagnetic atom?

One with unpaired electrons. Their spins act like tiny magnets that line up with an applied field, so the substance is weakly attracted to a magnet. Atoms with every electron paired are diamagnetic and are weakly repelled. Counting unpaired electrons with Hund's rule predicts which is which.

Sources

This article explains how the calculator works and is general information, not financial, tax, legal or medical advice. Rules change; check the sources above or a qualified professional before you act.

Spotted a wrong result or a bug? Report a problem

May we count your visits with Invoker Analytics? It keeps a random visitor number in your browser. Your calculator inputs are never sent. Privacy policy