What Are Quantum Numbers? n, l, mₗ, mₛ Explained
If you have ever wondered what are quantum numbers, you are asking one of the most useful questions in atomic physics. Quantum numbers are four numbers that together describe a single electron inside an atom. They tell you which energy level the electron occupies, what shape of region it is most likely to be found in, how that region is oriented in space, and which way the electron is spinning. Taken together, the four numbers act like a complete address for one electron, and no two electrons in the same atom share exactly the same address.
This article explains each quantum number in plain English, gives you the allowed-value rules in a form you can use on any exam question, and works through two full examples step by step. By the end, you will be able to read a label such as 3p, list every quantum number that goes with it, test whether a proposed set of quantum numbers is possible, and count how many electrons fit in a shell.
Before we begin, one definition will make everything else easier. An orbital is a region of space around the nucleus where an electron is most likely to be found. An orbital is not a fixed path, and it is not a solid shell that an electron sits on. It is a probability cloud: a three-dimensional shape that shows where the electron spends most of its time. Quantum numbers describe that cloud, and then they pick out one electron inside it.
What Are Quantum Numbers, in Plain English?
The four quantum numbers are named with the symbols n, l, mₗ and mₛ. Each one answers a different question about the electron. The first three numbers together pick out one orbital. The fourth number then picks out one of the two electrons that can share that orbital.
Think of the address idea in stages. The principal quantum number, n, tells you the main energy level, or shell. The azimuthal quantum number, l, tells you the subshell and the shape of the orbital. The magnetic quantum number, mₗ, tells you the orientation of that orbital in space. Finally, the spin quantum number, mₛ, tells you whether the electron is spin up or spin down. Shell, subshell, orbital and spin: that sequence is the whole system.
This four-number system exists because electrons do not behave like tiny planets travelling on neat circular orbits. That older picture, associated with the Bohr model, worked well for the hydrogen atom but could not explain the finer details of atomic spectra or the structure of larger atoms. In quantum mechanics, an electron is described by a wave-like pattern around the nucleus, and that pattern can only take certain allowed forms. The quantum numbers are the labels for those allowed forms.
Why Electrons Need Four Quantum Numbers
The journey from orbits to orbitals is the key to understanding why four numbers are needed rather than one. In the old orbit picture, a single number would be enough: the electron is on orbit one, orbit two, or orbit three. In the quantum picture, the electron is spread out as a probability cloud, and a single number cannot describe that cloud fully. You need to know its size and energy, its shape, and its direction in space. That is three numbers, and they define the orbital.
Then one more fact forces a fourth number. Experiments show that each orbital can hold two electrons, not one. If the first three numbers only identified the orbital, two electrons in the same orbital would have identical descriptions, and that cannot be right, because the two electrons are distinct. The fourth number, spin, separates them: one electron is spin up and the other is spin down.
This leads to a rule that runs through the whole topic. One electron has one unique set of four quantum numbers. The first three quantum numbers pick an orbital, and the fourth picks the electron inside it. Two electrons may share the first three numbers, because they can share an orbital, but they must differ in the fourth number.
The formal statement of this idea is the Pauli exclusion principle. In one plain sentence, it says that no two electrons in the same atom can have the same set of all four quantum numbers. Every time you count electrons, assign orbitals, or test a set of quantum numbers, this principle is working in the background, and it is the reason the counting formulas in this article give the answers they do.
The Principal Quantum Number (n)
The principal quantum number is written as n, and it can take the values n = 1, 2, 3, and so on, with no upper limit in principle. It tells you the shell of the electron and its main energy level. The shell is the broad energy level that the electron belongs to. Shell n = 1 is the lowest energy level and the closest to the nucleus on average. Shell n = 2 is higher in energy, shell n = 3 is higher again, and so on.
A larger value of n means two things at once. First, the electron has higher energy. Second, the electron is found, on average, at a larger distance from the nucleus. The orbital becomes larger and more spread out as n increases. That is why electrons in higher shells are generally easier to remove from an atom than electrons in lower shells: they are held less tightly, on average, because they are further from the positive nucleus and shielded by the electrons below them.
The principal quantum number also controls how many electrons a shell can hold. The formula is simple and worth memorising:
Electrons per shell = 2n²
Let us work this out for the first four shells. For n = 1, the formula gives 2 × 1² = 2 electrons. For n = 2, it gives 2 × 2² = 2 × 4 = 8 electrons. For n = 3, it gives 2 × 3² = 2 × 9 = 18 electrons. For n = 4, it gives 2 × 4² = 2 × 16 = 32 electrons.
Later in this article, we will prove the n = 3 result a second way, by counting orbitals one subshell at a time, so that the formula feels like a result you can derive rather than a fact you must simply accept.
One more property of n matters for everything that follows. The value of n decides how many subshells the shell contains, and it sets the maximum value of the next quantum number, l. A shell with principal quantum number n contains exactly n subshells. Shell n = 1 has one subshell, shell n = 2 has two subshells, shell n = 3 has three subshells, and shell n = 4 has four subshells. Keep that pattern in mind, because it explains the structure of the periodic table and the order in which electrons fill atoms.
The Azimuthal Quantum Number (l)
The azimuthal quantum number is written as l, and it describes the subshell and the shape of the orbital. The word azimuthal sounds technical, but the idea is straightforward: while n tells you the size and energy of the electron’s region, l tells you its shape. The allowed values of l depend directly on n. For a given value of n, l can be any whole number from 0 up to n − 1. In symbols:
l = 0, 1, 2, …, n − 1
So for n = 1, the only allowed value is l = 0. For n = 2, l can be 0 or 1. For n = 3, l can be 0, 1 or 2. For n = 4, l can be 0, 1, 2 or 3. Notice the pattern: the number of allowed values of l is exactly n, which is why shell n contains exactly n subshells.
Each value of l is given a letter code, and these letters are used in every orbital label you will meet. The code is l = 0 for s, l = 1 for p, l = 2 for d, and l = 3 for f. The letters originally came from descriptions of spectral lines, but today you can simply learn them as a code: s, p, d, f for 0, 1, 2, 3.
The letter also tells you the shape of the orbital. An s orbital, with l = 0, is spherical. The electron is equally likely to be found in any direction from the nucleus, so the probability cloud is a ball centred on the nucleus. A p orbital, with l = 1, has a dumbbell shape, with two lobes pointing in opposite directions.
The d and f orbitals, with l = 2 and l = 3, have more complicated shapes with more lobes, but for most introductory questions you only need to know that they exist and how many orbitals each subshell contains, which is the job of the next quantum number.
The most common error with l is to allow it to equal n. That is never permitted. The rule says l goes from 0 up to n − 1, so l can never equal n. If n = 2, then l = 2 is impossible. If n = 3, then l = 3 is impossible. This single rule is the one that catches most students in validity-test questions, and worked example 2 below shows exactly how it is used.
Finally, notice how the orbital label combines n and l. The number in a label such as 3p is n, and the letter is l. So 3p means n = 3 and l = 1. The label 2s means n = 2 and l = 0. The label 4d means n = 4 and l = 2. Once you can read a label this way, you can start any quantum number question from the label alone, with no extra information needed.
The Magnetic Quantum Number (mₗ)
The magnetic quantum number is written as mₗ, and it describes the orientation of the orbital in space. If l tells you the shape of the orbital, mₗ tells you which way that shape points. The allowed values of mₗ depend directly on l. For a given value of l, mₗ can be any whole number from −l through 0 up to +l. In symbols:
mₗ = −l, …, 0, …, +l
So if l = 0, the only allowed value is mₗ = 0. If l = 1, then mₗ can be −1, 0 or +1. If l = 2, then mₗ can be −2, −1, 0, +1 or +2. If l = 3, then mₗ can be −3, −2, −1, 0, +1, +2 or +3. Each allowed value of mₗ corresponds to one orbital, so counting the allowed values of mₗ tells you how many orbitals a subshell contains.
The counting formula follows directly from that list. The number of orbitals per subshell is:
Orbitals per subshell = 2l + 1
For an s subshell, l = 0, so there is 2 × 0 + 1 = 1 orbital. For a p subshell, l = 1, so there are 2 × 1 + 1 = 3 orbitals. For a d subshell, l = 2, so there are 2 × 2 + 1 = 5 orbitals. For an f subshell, l = 3, so there are 2 × 3 + 1 = 7 orbitals.
Since each orbital holds at most two electrons, the number of electrons per subshell is twice that: 2, 6, 10 and 14 electrons for the s, p, d and f subshells respectively.
The p orbitals give the clearest picture of what orientation means. The three p orbitals point along the three axes of space, and they are named px, py and pz. One dumbbell points along the x direction, one along the y direction, and one along the z direction. They have the same shape and the same energy in the absence of a magnetic field, but they point in different directions, and mₗ is the number that distinguishes them.
The name magnetic comes from the fact that these orientations behave differently in a magnetic field. Without a magnetic field, the three p orbitals have equal energy. In a magnetic field, their energies split slightly, because each orientation interacts with the field differently. You do not need that detail for most introductory questions, but it explains the name, and it is a good reminder that mₗ is about direction in space, not about energy level or about counting electrons.
The Spin Quantum Number (mₛ)
The spin quantum number is written as mₛ, and it can take only two values:
mₛ = +1/2 or −1/2
These are usually described as spin up, for +1/2, and spin down, for −1/2. The value +1/2 means the electron is in one spin state, and the value −1/2 means it is in the opposite spin state. No other values are allowed. In particular, mₛ is never 0, never 1, and never −1. If you see any other value proposed for mₛ, the set of quantum numbers is invalid, however good the other three numbers look.
Spin is a property of the electron itself, not of its orbital. It is independent of n, l and mₗ. That means the spin of an electron does not depend on which shell, subshell or orbital it occupies. An electron in a 1s orbital can be spin up or spin down, and so can an electron in a 3d orbital. The spin number adds one final piece of information that the first three numbers cannot supply.
Spin is also the reason each orbital holds at most two electrons. One orbital is defined by one combination of n, l and mₗ. Within that orbital, the two electrons must differ in mₛ, because the Pauli exclusion principle forbids them from sharing all four numbers. So one electron takes mₛ = +1/2 and the other takes mₛ = −1/2, and the orbital is then full. A third electron cannot join them, because there is no third value of mₛ available, and it would have to share all four numbers with one of the electrons already there.
Students sometimes imagine spin as a tiny ball physically spinning on its axis. That picture can help at first, but it is not literally correct, because an electron is not a tiny solid ball, and its spin is a quantum property with no exact everyday equivalent. For exam purposes, the safe way to think about spin is simpler: it is a two-valued label that separates the two electrons in one orbital, and it always takes the value +1/2 or −1/2.
The Quantum Number Rules at a Glance
Here is the complete set of rules in one summary table. If you learn this table, you can answer almost any introductory question about quantum numbers without memorising separate facts for each case.
| Symbol | Name | What it tells you | Allowed values |
|---|---|---|---|
| n | Principal quantum number | Shell and main energy level | n = 1, 2, 3, … |
| l | Azimuthal quantum number | Subshell and orbital shape | l = 0, 1, …, n − 1 |
| mₗ | Magnetic quantum number | Orientation of the orbital in space | mₗ = −l, …, 0, …, +l |
| mₛ | Spin quantum number | Spin of the electron | mₛ = +1/2 or −1/2 |
Alongside the table, keep the counting formulas together, because exam questions often ask you to move from one count to another. The formulas are:
- Orbitals per subshell = 2l + 1
- Electrons per subshell = 2(2l + 1)
- Orbitals per shell = n²
- Electrons per shell = 2n²
The orbitals-per-shell formula deserves a quick check, because it ties the whole system together. Shell n = 3 contains the subshells 3s, 3p and 3d. Those subshells contain 1, 3 and 5 orbitals respectively, and 1 + 3 + 5 = 9, which equals 3². Shell n = 2 contains 2s and 2p, with 1 + 3 = 4 orbitals, which equals 2². The pattern holds for every shell, and doubling it for the two spins per orbital gives the electrons-per-shell formula, 2n².
It also helps to keep the four levels of description straight. The shell is given by n alone. The subshell is given by n and l together, for example 3p. The orbital is given by n, l and mₗ together. The electron is given by all four numbers, n, l, mₗ and mₛ, together. Many mistakes come from confusing these levels, so whenever a question asks about a subshell, an orbital or an electron, check which numbers it is really asking for before you start counting.
Worked Example 1: Quantum Numbers for an Electron in a 3p Orbital
Question: Give a valid set of quantum numbers for an electron in a 3p orbital, and explain what each value means.
Step 1: Read n and l from the label. The label 3p gives the shell number directly: the number 3 is n, so n = 3. The letter p is the code for l = 1, so l = 1. We now know that the electron is in shell 3, subshell p, which is the second subshell of that shell.
Step 2: List the allowed values of mₗ. The rule is mₗ = −l, …, 0, …, +l. With l = 1, the allowed values are mₗ = −1, 0, +1. These are the three p orbitals, pointing along the three directions in space. Any one of them is a valid choice for this electron, and choosing one of them picks out a single orbital.
Step 3: Choose one orbital and one spin. Let us pick mₗ = 0, which is the middle p orbital in the list. For the spin, we must choose either +1/2 or −1/2, so let us pick mₛ = +1/2, which is spin up. No other choices are needed, because the four numbers are now complete.
Step 4: Write the full set and check it. The full valid set is n = 3, l = 1, mₗ = 0, mₛ = +1/2.
Check each rule in turn. The value n = 3 is a positive whole number, so it is allowed. The value l = 1 is less than n = 3, and it lies in the range 0 to n − 1, so it is allowed. The value mₗ = 0 lies between −l = −1 and +l = +1, so it is allowed. The value mₛ = +1/2 is one of the only two allowed spin values, so it is allowed. Every rule passes, so the set is valid.
Step 5: Say what the set means in words. The number n = 3 means the electron is in the third shell, with the energy and average distance that go with that shell. The number l = 1 means the electron is in a p subshell, so its orbital has a dumbbell shape. The number mₗ = 0 means the electron occupies one particular p orbital, one of the three orientations in space.
The number mₛ = +1/2 means the electron is the spin-up electron in that orbital. Together, the four numbers identify one specific electron, and no other electron in the same atom has exactly this set.
Note that this is not the only valid answer. Choosing mₗ = −1 or mₗ = +1, or choosing mₛ = −1/2, would give a different but equally valid set, because each of those choices still obeys every rule. The other electron in the same orbital, for example, would have the set n = 3, l = 1, mₗ = 0, mₛ = −1/2, differing only in spin. That pair of sets is a good illustration of the Pauli exclusion principle in action: same orbital, different spin, and therefore different full sets.
Worked Example 2: Is This Set of Quantum Numbers Possible, and How Many Electrons Fit in Shell n = 3?
Question, part A: Is the set n = 2, l = 2, mₗ = 0, mₛ = +1/2 possible? Question, part B: How many electrons can shell n = 3 hold? Work out the answer from scratch by counting subshells and orbitals.
Part A, step 1: Check n. The value n = 2 is a positive whole number, so it passes the first check. Nothing is wrong with the shell itself.
Part A, step 2: Check l against n. The rule is that l must run from 0 to n − 1, so for n = 2, the allowed values of l are 0 and 1 only. The proposed value is l = 2, which equals n. That breaks the rule, because l can never equal n. This alone is enough to reject the set.
Part A, step 3: State the verdict clearly. The set n = 2, l = 2, mₗ = 0, mₛ = +1/2 is not possible, because l = 2 is not allowed when n = 2. The values of mₗ and mₛ do not rescue it: once one rule fails, the whole set fails, even if the other numbers look reasonable on their own. A useful habit is to check the rules in order, n first, then l against n, then mₗ against l, then mₛ, and to stop as soon as one rule fails.
Part A, step 4: Give a valid set for contrast. For comparison, the set n = 2, l = 1, mₗ = −1, mₛ = −1/2 is valid. Here l = 1 is less than n = 2, so it passes. The value mₗ = −1 lies between −l = −1 and +l = +1, so it passes. The value mₛ = −1/2 is an allowed spin value, so it passes.
This set describes a spin-down electron in one of the 2p orbitals, and it shows that changing only the value of l, from 2 to 1, turns an impossible set into a perfectly good one.
Part B, step 1: List the subshells in shell n = 3. For n = 3, the allowed values of l are 0, 1 and 2, which correspond to the subshells 3s, 3p and 3d. There are three subshells, which matches the rule that shell n contains n subshells.
Part B, step 2: Count the orbitals in each subshell. Use the formula orbitals per subshell = 2l + 1. For 3s, l = 0, so there is 2 × 0 + 1 = 1 orbital. For 3p, l = 1, so there are 2 × 1 + 1 = 3 orbitals. For 3d, l = 2, so there are 2 × 2 + 1 = 5 orbitals.
Part B, step 3: Add the orbitals. The total number of orbitals in shell n = 3 is 1 + 3 + 5 = 9 orbitals. This matches the formula orbitals per shell = n², since 3² = 9.
Part B, step 4: Count the electrons. Each orbital holds at most two electrons, one spin up and one spin down, so the total number of electrons is 9 orbitals × 2 electrons per orbital = 18 electrons. This matches the formula electrons per shell = 2n², since 2 × 3² = 2 × 9 = 18. The two methods agree, which is a good check that the counting is correct.
Part B, step 5: State the answer in one sentence. Shell n = 3 can hold 18 electrons, held in 9 orbitals across the 3s, 3p and 3d subshells. If an exam question asks only for the number, the formula 2n² gives it at once, but showing the subshell count proves that you understand where the number comes from.
Common Mistakes
The following mistakes appear again and again in quantum number questions. Reading through them before you practise will save you from most of the marks lost on this topic.
First, writing l = n. This is forbidden. The azimuthal quantum number l stops at n − 1, so l can never equal n. If n = 2, then l = 2 is impossible. If n = 3, then l = 3 is impossible. Always check l against n before you check anything else.
Second, confusing the subshell letter with the orbital count. The letter p does not mean one orbital, and the letter d does not mean one orbital. The letter tells you l, and the orbital count comes from 2l + 1. So a p subshell has three orbitals, a d subshell has five orbitals, and an f subshell has seven orbitals. Only an s subshell has one orbital.
Third, thinking that mₗ counts electrons instead of orbitals. The magnetic quantum number mₗ picks out one orbital, not one electron. Each value of mₗ is one orbital, and each orbital then holds two electrons, distinguished by mₛ. If you count mₗ values and call that the number of electrons, you will be short by a factor of two.
Fourth, allowing mₛ values other than +1/2 and −1/2. The spin quantum number has exactly two allowed values, +1/2 for spin up and −1/2 for spin down. Values such as 0, 1, −1 or +3/2 are never correct, whatever the other quantum numbers are.
Fifth, giving two electrons in the same atom the same four quantum numbers. The Pauli exclusion principle forbids this. Two electrons may share n, l and mₗ, because they may share an orbital, but they must then differ in mₛ. If your answer assigns the same full set to two electrons, one of the sets is wrong.
Sixth, mixing up shell, subshell and orbital. The shell is given by n alone. The subshell is given by n and l together, such as 3p. The orbital is given by n, l and mₗ together. The electron needs all four numbers. When a question asks how many orbitals are in a subshell, use 2l + 1. When it asks how many electrons are in a shell, use 2n². Matching the question to the right level is half the battle.
A final habit will catch most of these errors before they cost marks. For every set of quantum numbers you write or test, run the four checks in order: is n a positive whole number, is l between 0 and n − 1, is mₗ between −l and +l, and is mₛ either +1/2 or −1/2. If all four checks pass, the set is possible. If any one fails, the set is impossible, and the failed check tells you exactly why.
Conclusion
To sum up what are quantum numbers and how to use them, remember that the four numbers n, l, mₗ and mₛ together give the complete address of one electron in an atom. The principal quantum number n gives the shell and main energy level. The azimuthal quantum number l gives the subshell and the orbital shape. The magnetic quantum number mₗ gives the orientation of the orbital in space. The spin quantum number mₛ gives the spin of the electron, spin up or spin down.
Keep the key formulas together for revision. The azimuthal quantum number l ranges from 0 to n − 1. The magnetic quantum number mₗ ranges from −l to +l. The spin quantum number mₛ is +1/2 or −1/2. The number of orbitals per subshell is 2l + 1. The number of electrons per shell is 2n², with orbitals per shell given by n². And above all, no two electrons in one atom share all four quantum numbers, which is the Pauli exclusion principle.
With those rules, a label such as 3p becomes easy to read, a validity test becomes a short sequence of checks, and a counting question becomes a matter of adding orbitals and doubling for spin. Practise with a few sets of your own, testing each one against the four checks, and the system will quickly feel like a tool you own rather than a list you must memorise.
Frequently Asked Questions
What are quantum numbers, and why does each electron need four quantum numbers?
Quantum numbers are the four numbers n, l, mₗ and mₛ that together give the complete address of one electron in an atom. Three are needed because an electron occupies a probability cloud, not a fixed orbit: n gives its shell and energy level, l gives its subshell and orbital shape, and mₗ gives the orbital's orientation in space. The fourth, mₛ, is needed because each orbital holds two electrons, and spin up or spin down separates them.
What does the principal quantum number n tell you about an electron?
The principal quantum number n tells you the electron's shell and main energy level, with n = 1, 2, 3, … A larger n means higher energy and a larger average distance from the nucleus, so the orbital is bigger and more spread out. It also fixes how many electrons the shell holds, through the formula 2n²: shell n = 1 holds 2 electrons, n = 2 holds 8, n = 3 holds 18, and n = 4 holds 32.
How are the allowed values of the azimuthal quantum number l decided by the principal quantum number n?
The allowed values of l are decided by n through the rule l = 0, 1, 2, …, n − 1, so shell n contains exactly n subshells. For n = 2, l can be 0 or 1; for n = 3, l can be 0, 1 or 2. The letter codes are s for l = 0, p for l = 1, d for l = 2 and f for l = 3, and l can never equal n.
What does the magnetic quantum number mₗ tell you, and how many orbitals does mₗ give in a p subshell?
The magnetic quantum number mₗ tells you the orientation of an orbital in space, with allowed values mₗ = −l, …, 0, …, +l. Each allowed value of mₗ is one orbital, so a subshell contains 2l + 1 orbitals. In a p subshell, l = 1, so mₗ can be −1, 0 or +1, giving three orbitals: p_x, p_y and p_z, pointing along the three directions in space.
Why can the spin quantum number mₛ only be +1/2 or −1/2?
The spin quantum number mₛ can only be +1/2 or −1/2 because spin is a two-valued property of the electron itself, described as spin up for +1/2 and spin down for −1/2. No other values, such as 0, 1 or −1, are allowed. Spin is independent of n, l and mₗ, and it is what separates the two electrons sharing one orbital: one takes mₛ = +1/2 and the other takes mₛ = −1/2, as the Pauli exclusion principle requires.
How many electrons can shell n = 3 hold, and how do the quantum numbers prove it?
Shell n = 3 can hold 18 electrons, as the formula electrons per shell = 2n² gives 2 × 3² = 18. Counting orbitals proves it: for n = 3, l can be 0, 1 or 2, giving the subshells 3s, 3p and 3d, which contain 2l + 1 = 1, 3 and 5 orbitals respectively. That is 9 orbitals, matching n², and with two electrons per orbital, spin up and spin down, the total is 18.







