My Calculator

Quantum Numbers Calculator

Find the quantum numbers of the last electron in any element or ion, or check whether a set of n, l, mₗ, mₛ values is a valid, allowed combination.

Quantum Structure

Leave at 0 for a neutral atom. Use 2 for Fe²⁺, or -2 for O²⁻.

Result

Oxygen (O) — last electron added

n=2, l=1, mₗ=-1, mₛ=−1/2

Subshell 2p (4 of 6 electrons)

Subshell type

principal (p)

Orbitals in subshell

3

Subshell capacity

6 e⁻

Shell n=2 capacity

8 e⁻

Orbital Diagram

The highlighted box shows where the last electron sits, with mₗ values labeled underneath each orbital.

↑↓
-1
0
1

Subshell 2p — each box is one orbital, labeled with its mₗ value underneath.

Every Electron in the 2p Subshell

Full (n, l, mₗ, mₛ) set for each electron currently in this subshell, in filling order.

#nlmₗmₛ
121-1+1/2
2210+1/2
3211+1/2
421-1−1/2

Step-by-Step Solution

Exactly how these quantum numbers were worked out, one rule at a time.

  1. Step 1: Find the electron configuration

    Oxygen (O) has 8 electrons. Electrons fill orbitals from lowest to highest energy following the Aufbau order.

    1s2 2s2 2p4
  2. Step 2: Identify the last (differentiating) subshell

    The most recently added electron sits in the 2p subshell, which holds 4 of its 6 possible electrons. This subshell fixes n = 2 and l = 1.

    2p4
  3. Step 3: Fill the orbitals using Hund's rule

    Every orbital in a subshell receives one spin-up electron before any orbital receives a second, spin-paired electron. Orbitals are filled in order from mₗ = −l up to mₗ = +l.

    Orbitals in 2p: mₗ = -1, 0, 1
  4. Step 4: Read off the last electron's quantum numbers

    This orbital already held one spin-up electron, so the new electron pairs up with mₛ = −1/2.

    n = 2, l = 1, mₗ = -1, mₛ = −1/2

Quantum Numbers Calculator

This quantum numbers calculator helps you find the four quantum numbers of an electron in seconds. Type in any element or ion, and it works out the principal quantum number, the azimuthal quantum number, the magnetic quantum number, and the spin quantum number of the last electron added to that atom. You also get a full electron configuration, an orbital box diagram, and a written, step-by-step explanation.

There is a second mode too. If your teacher or textbook has already given you a set of numbers for n, l, mₗ, and mₛ, you can type them in and the calculator will tell you right away whether that combination is actually allowed, and explain exactly which rule is broken if it is not. This makes the tool useful both for looking up quantum numbers and for checking homework answers.

What Are Quantum Numbers?

Quantum numbers are a set of four values that describe the exact state of an electron inside an atom. No two electrons in the same atom can share all four numbers at once. This rule is called the Pauli exclusion principle, and it is the reason electrons fill up in shells and subshells the way they do, instead of all crowding into the lowest energy level.

The four quantum numbers are the principal quantum number (n), the azimuthal or angular momentum quantum number (l), the magnetic quantum number (mₗ), and the spin quantum number (mₛ). Together they act like an address for an electron, telling you which shell it is in, which shape of subshell it occupies, which specific orbital within that subshell, and which way it is spinning.

The Principal Quantum Number (n)

The principal quantum number, written as n, tells you the main energy level or shell an electron belongs to. It can only be a positive whole number: 1, 2, 3, and so on. A higher value of n means the electron is, on average, further from the nucleus and has more energy. The first shell (n = 1) is closest to the nucleus and can hold the fewest electrons.

Each shell has room for a fixed number of electrons, given by the formula 2n². Shell 1 holds up to 2 electrons, shell 2 holds up to 8, shell 3 holds up to 18, and shell 4 holds up to 32. This calculator shows you this shell capacity automatically whenever you enter a value for n, so you do not need to memorize the pattern.

The Azimuthal Quantum Number (l)

The azimuthal quantum number, l, describes the shape of an electron's subshell. For a given shell n, l can take any whole number value from 0 up to n − 1. So shell 1 only allows l = 0, shell 2 allows l = 0 or 1, shell 3 allows l = 0, 1, or 2, and so on. Each value of l corresponds to a letter used in chemistry: l = 0 is an s subshell, l = 1 is a p subshell, l = 2 is a d subshell, and l = 3 is an f subshell.

This is why you see labels like 1s, 2p, 3d, and 4f in electron configurations. The number in front is the shell (n), and the letter tells you the subshell shape (l). This calculator turns any n and l pair you type in straight into that familiar subshell label, so it is easy to connect the abstract numbers with the notation used in class.

The Magnetic Quantum Number (mₗ)

The magnetic quantum number, mₗ, tells you which specific orbital within a subshell an electron occupies. Its allowed values run from −l to +l in whole number steps, including zero. An s subshell (l = 0) has only one possible value, mₗ = 0, matching the single s orbital. A p subshell (l = 1) allows mₗ = −1, 0, or +1, matching the three p orbitals you may have seen drawn along the x, y, and z axes.

A d subshell (l = 2) allows five values of mₗ, from −2 to +2, matching five d orbitals. An f subshell (l = 3) allows seven values, from −3 to +3, matching seven f orbitals. This calculator lists every allowed mₗ value the moment you enter l, and shows each orbital as its own box in the diagram so you can see exactly where an electron sits.

The Spin Quantum Number (mₛ)

The spin quantum number, mₛ, describes the intrinsic spin of an electron, which behaves like a tiny magnetic property. It can only take one of two values: +1/2 or −1/2, usually drawn as an up arrow or a down arrow in orbital diagrams. Since only two electrons can occupy any single orbital, and they must have opposite spin, this is the quantum number that ultimately limits every orbital to a maximum of two electrons.

In orbital diagrams, this rule shows up as Hund's rule: every orbital in a subshell gets one spin-up electron before any orbital gets a second, paired, spin-down electron. This calculator applies that exact rule when it works out the last electron of an atom, and it shows the resulting spin directly in the results and in the orbital diagram.

How the Element Lookup Works

In the By Element mode, type in an element symbol, name, or atomic number, and optionally a charge for an ion. The calculator first builds the full electron configuration using the standard Aufbau filling order, the same order used by the Electron Configuration Finder on this site. It then looks at the last subshell to receive an electron and works out exactly which orbital within that subshell holds the most recently added electron.

The written steps show the full configuration, name the last subshell, list its allowed mₗ values, and explain whether the final electron was the first electron in its orbital (spin up) or the second, paired electron (spin down). A table below the orbital diagram lists the quantum numbers of every electron currently in that subshell, which is especially useful for revising subshells like 2p, 3d, or 4f that hold several electrons at once.

How the Quantum Number Checker Works

In the Check n, l, mₗ, mₛ mode, you type in your own values and the calculator checks each one against the rule that governs it, in order. First it checks that n is a positive whole number. Then it checks that l is a whole number between 0 and n − 1. Then it checks that mₗ is a whole number between −l and +l. Finally it checks that mₛ is either +1/2 or −1/2.

If every rule passes, the combination is valid and describes a real, physically possible electron. If any rule fails, the calculator marks that specific rule as not allowed and explains in plain language why, so you can see exactly where the mistake is instead of just getting a single pass or fail answer.

Worked Example: Quantum Numbers of the Last Electron in Oxygen

Oxygen has atomic number 8, so a neutral oxygen atom has 8 electrons. Filling orbitals in order gives the configuration 1s² 2s² 2p⁴. The last subshell to receive electrons is 2p, which holds 4 of its possible 6 electrons. The 2p subshell has three orbitals, with mₗ values of −1, 0, and +1.

Following Hund's rule, the first three electrons each go into a separate orbital with spin up: mₗ = −1, 0, and +1. The fourth electron has nowhere new to go, so it pairs up with the first orbital, mₗ = −1, and takes the opposite spin. That makes the last electron's quantum numbers n = 2, l = 1, mₗ = −1, and mₛ = −1/2, which is exactly what this calculator returns for oxygen.

Worked Example: Checking an Invalid Combination

Suppose someone gives you the set n = 3, l = 3, mₗ = 0, mₛ = +1/2 and asks if it is valid. Checking rule by rule: n = 3 is a positive whole number, so that part passes. Next, l must be between 0 and n − 1, which is 0 to 2 for n = 3. Since l = 3 is outside that range, this combination fails at the second rule.

The calculator would flag this immediately and explain that for n = 3, l can only be 0, 1, or 2, so l = 3 is not allowed no matter what mₗ and mₛ are. This kind of check is a common source of exam mistakes, since it is easy to forget that l always tops out one less than n.

Quantum Numbers and Electron Configuration

Quantum numbers are the mathematical foundation behind electron configuration. Every subshell label like 2p or 3d is really just a shorthand for a pair of quantum numbers, n and l. When you write an electron configuration, you are really describing how many electrons sit in each n, l combination, and the orbital diagram breaks that down one step further into individual mₗ and mₛ values.

This is why quantum numbers show up right after electron configuration in most chemistry courses. Once you can build a configuration like 1s² 2s² 2p⁶ 3s² 3p⁴, the natural next question is which exact orbital and spin the last electron has, and that is precisely what this calculator answers automatically.

Common Mistakes with Quantum Numbers

A very common mistake is assuming l can equal n. In reality, l only ranges up to n − 1, so a 2d or 1p subshell can never exist, since l = 2 needs n of at least 3, and l = 1 needs n of at least 2. Another frequent error is choosing an mₗ value outside the −l to +l range, such as mₗ = 2 for a p subshell, where the largest allowed value is only 1.

Students also sometimes forget that mₛ has only two allowed values. Any number other than +1/2 or −1/2, including 0 or 1, is not a valid spin quantum number. Working through the checker mode a few times with both valid and invalid examples is a fast way to build confidence with these limits before an exam.

Why Quantum Numbers Matter in Chemistry

Quantum numbers explain the structure of the periodic table itself. Elements in the same column share the same number of valence electrons and a similar outer subshell type, which is why they behave in chemically similar ways. The block an element sits in, s, p, d, or f, is decided directly by the l value of its last electron, which this calculator reports for every lookup.

Beyond the periodic table, quantum numbers underpin ideas like paramagnetism, bonding theory, and spectroscopy. Whether an atom has unpaired electrons, which is decided by how orbitals fill according to Hund's rule, affects how it interacts with a magnetic field. Even the colors and light patterns given off by excited atoms trace back to electrons moving between states defined by these same four numbers.

Tips for Using This Quantum Numbers Calculator

For fast lookups, use By Element mode and just type a symbol like Fe, N, or Cl, or an atomic number from 1 to 118. Add a charge if you are working with an ion, such as 2 for Fe²⁺ or -1 for Cl⁻. The orbital diagram and the table of every electron in the last subshell make it easy to double check paired versus unpaired electrons, which matters for magnetism questions.

For homework checking, switch to Check n, l, mₗ, mₛ mode and enter the exact values you were given. Watch the pass or fail marks next to each rule rather than only the final answer, since seeing which single rule fails is usually the fastest way to understand a mistake and fix it before resubmitting an assignment.

Quantum Numbers Calculator FAQ

What are the four quantum numbers? They are the principal quantum number (n), the azimuthal quantum number (l), the magnetic quantum number (mₗ), and the spin quantum number (mₛ). Can two electrons share the same four quantum numbers? No, the Pauli exclusion principle forbids it. Why does l stop at n − 1? Because of how the mathematics of atomic orbitals works out; it is an observed and proven quantum mechanical rule, not an approximation.

This quantum numbers calculator combines a direct element lookup, a full validity checker, a clear orbital diagram, and complete step-by-step working, so you can look up an answer quickly and still understand exactly how it was reached.

Frequently Asked Questions

What are the four quantum numbers?

The principal quantum number (n), the azimuthal quantum number (l), the magnetic quantum number (mₗ), and the spin quantum number (mₛ). Together they describe the exact state of one electron.

What values can n, l, mₗ, and mₛ take?

n is a positive whole number (1, 2, 3, ...). l is a whole number from 0 to n − 1. mₗ is a whole number from −l to +l. mₛ is either +1/2 or −1/2.

How do I find the quantum numbers of an element's last electron?

Build the electron configuration, find the last subshell filled, then apply Hund's rule to see which orbital and spin the final electron takes. This calculator does that automatically for any element or ion.

Can l ever equal n?

No. l can only range from 0 up to n − 1, so l is always at least one less than n.

Why can an orbital hold only two electrons?

Because mₛ has only two allowed values, +1/2 and −1/2. Once both spin states in one orbital (one fixed n, l, mₗ) are filled, the Pauli exclusion principle blocks any further electrons from that orbital.