molecalculator

Moles & Molar Mass

Electron Configuration n l ml ms Explained

Calculator No. 01-10305 · Updated · Formula and assumptions shown below

The calculator on this page is switched off while it is checked. The formula is below, and the worked example shows how to do the sum by hand.

For study and lab planning. The result follows from the numbers you enter and the formula shown. Check it against your method before you weigh, mix or dilute anything, follow the safety data sheet and your supervisor, and do not use it for clinical, dosing or medication work.

Electron configuration describes the arrangement of electrons in an atom using four quantum numbers: the principal quantum number (n), the azimuthal quantum number (l), the magnetic quantum number (ml), and the spin quantum number (ms). This page explains what each quantum number means, how they relate to the familiar 1s² 2s² 2p⁶ notation, and how to use them to determine the electron configuration of any element.

Formula

The electron configuration is built by filling orbitals in order of increasing energy (Aufbau principle). The order is determined by the (n + l) rule: lower (n + l) fills first; if two orbitals have the same (n + l), the one with lower n fills first. The sequence is: 1s, 2s, 2p, 3s, 3p, 4s, 3d, 4p, 5s, 4d, 5p, 6s, 4f, 5d, 6p, 7s, 5f, 6d, 7p. Each orbital type holds a maximum number of electrons: s = 2, p = 6, d = 10, f = 14. The total electrons equal the atomic number Z for a neutral atom.

Worked Example

Using the default atomic number Z = 26 (iron):

  1. Fill 1s: 2 electrons (total 2)
  2. Fill 2s: 2 electrons (total 4)
  3. Fill 2p: 6 electrons (total 10)
  4. Fill 3s: 2 electrons (total 12)
  5. Fill 3p: 6 electrons (total 18)
  6. Fill 4s: 2 electrons (total 20)
  7. Fill 3d: remaining 6 electrons (total 26)

Result: 1s² 2s² 2p⁶ 3s² 3p⁶ 4s² 3d⁶. The noble gas shorthand uses [Ar] for the first 18 electrons, giving [Ar] 4s² 3d⁶.

Assumptions

  • The atom is neutral (number of electrons = atomic number).
  • The Aufbau principle applies; exceptions for chromium and copper are noted in the text.
  • Orbitals fill singly before pairing (Hund’s rule) for ground-state atoms.

The Four Quantum Numbers

Each electron in an atom is uniquely identified by four quantum numbers:

  • Principal quantum number (n): positive integer (1, 2, 3, …) that defines the main energy level (shell) and roughly the distance from the nucleus. Higher n means higher energy and larger orbital.
  • Azimuthal quantum number (l): integer from 0 to n-1, defines the subshell shape. l = 0 is s (spherical), l = 1 is p (dumbbell), l = 2 is d (cloverleaf), l = 3 is f (complex).
  • Magnetic quantum number (ml): integer from -l to +l, defines the orientation of the orbital in space. For l = 1, ml can be -1, 0, +1 (three p orbitals).
  • Spin quantum number (ms): either +½ or -½, representing the electron’s intrinsic spin. Each orbital holds two electrons with opposite spins.

How to Write an Electron Configuration

To write a configuration for an element with atomic number Z:

  1. Start with the lowest energy orbital (1s) and fill in order of the Aufbau sequence.
  2. Fill each orbital with up to two electrons (Pauli exclusion principle).
  3. For degenerate orbitals (same subshell), place one electron in each before pairing (Hund’s rule).
  4. Stop when the total electrons equal Z.

For example, oxygen (Z = 8): 1s² 2s² 2p⁴. The 2p subshell has three orbitals; four electrons occupy them as ↑↓ ↑ ↑, not ↑↓ ↑↓.

Common Mistakes and Exceptions

Two frequent errors are misordering 4s and 3d, and forgetting exceptions. The 4s orbital fills before 3d because it has lower (n+l) = 4+0 = 4 vs 3+2 = 5, even though n is higher. However, chromium (Z = 24) and copper (Z = 29) are exceptions: chromium is [Ar] 4s¹ 3d⁵ (not 4s² 3d⁴) and copper is [Ar] 4s¹ 3d¹⁰ (not 4s² 3d⁹) because half-filled and fully-filled d subshells are more stable. Also, do not confuse the order of filling with the order of removal: when ionizing, electrons are removed from the highest n first (e.g., Fe²⁺ loses 4s electrons before 3d).

Reading the Result

The configuration shows the occupancy of each subshell. The superscript indicates the number of electrons in that subshell. The noble gas shorthand (e.g., [Ar]) represents the core electrons of the preceding noble gas, simplifying long configurations. For iron, [Ar] 4s² 3d⁶ tells you that iron has 8 valence electrons (2 in 4s and 6 in 3d), which explains its common +2 and +3 oxidation states.

Limits of the Aufbau Model

The Aufbau principle is a useful approximation but fails for some transition metals and heavier elements where orbital energies shift due to electron-electron repulsion and relativistic effects. For accurate ground-state configurations of all elements, quantum mechanical calculations or experimental spectroscopy are needed. This calculator follows the standard textbook order, which works for most elements up to Z = 118.

Frequently Asked Questions

What is the difference between n, l, ml, and ms?

n defines the energy level (shell), l defines the subshell shape (s, p, d, f), ml defines the orbital orientation in space, and ms defines the electron spin direction. Together they uniquely describe each electron’s state.

Why does 4s fill before 3d?

Because the (n+l) rule: 4s has (4+0)=4, while 3d has (3+2)=5. Lower (n+l) means lower energy, so 4s fills first. This is why potassium and calcium have 4s electrons before any 3d electrons.

How do I find the electron configuration of an ion?

Write the neutral atom configuration, then remove electrons from the highest n subshell first (not the last filled). For example, Fe (Z=26) is [Ar] 4s² 3d⁶; Fe³⁺ removes two 4s and one 3d electron to give [Ar] 3d⁵.

What are the exceptions to the Aufbau principle?

Chromium and copper are the most common exceptions. They adopt configurations with half-filled or fully-filled d subshells because that arrangement lowers the energy. Other exceptions occur in some lanthanides and actinides.

Can ml be negative?

Yes, ml ranges from -l to +l, so negative values are normal. For a p subshell (l=1), ml can be -1, 0, or +1, corresponding to the three p orbitals (px, py, pz).

What does the superscript in 2p⁶ mean?

The superscript is the number of electrons in that subshell. 2p⁶ means the 2p subshell contains six electrons, filling all three p orbitals completely.

Related

Formula used
in z | Atomic number Z | - | 26 | 1 | 118
out config | Electron configuration | - | order_aufbau(z) | 0
out noble | Noble gas shorthand | - | noble_notation(z) | 0

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation with the constants and conversion factors written on the page, rounded as each result states. See method and constants, the disclaimer or report an error.

More in this section

The whole Moles & Molar Mass section →