Electron Configuration Calculator
Write the ground-state electron configuration of any element from hydrogen to oganesson, see how it changes for ions, identify an element or ion from a configuration you type in, find the four quantum numbers of any single electron, and see whether an atom or ion is magnetic — with orbital diagrams, a diagonal-rule fill map, shell rings, a periodic-table map, orbital shapes and d-orbital splitting diagrams to show what the notation means.
Background
An electron configuration lists which subshells an atom's electrons occupy, such as 1s² 2s² 2p⁶ 3s² 3p⁴ for sulfur. Electrons fill the lowest-energy subshells first (the Aufbau principle, ordered by the n + l rule), no orbital holds more than two electrons with opposite spins (Pauli exclusion), and electrons spread across a subshell's orbitals before pairing up (Hund's rule). Around twenty elements, including chromium and copper, bend the filling order because half-filled and filled subshells are unusually stable — and that is where students most often go wrong. The configuration explains an atom's position on the periodic table, its valence electrons, the ions it forms, and — through the number of unpaired electrons — whether it is magnetic and how strongly.
How to use this calculator
- Choose Configuration to get the full and noble-gas shorthand configuration of any element, with an orbital box diagram and a diagonal-rule map showing exactly which subshells are filled — and flagging the exceptions.
- Choose Ions to see which electrons an atom loses or gains. You can type the charge separately, or enter a whole ion like Fe3+ or O2- in the element box.
- Choose Decode a Configuration to type in a configuration and find out which atom or ion it describes — including every ion that shares it, and whether it is only an excited state.
- Choose Quantum Numbers to get (n, l, mₗ, mₛ) for the last electron, or any electron you number, with the orbital's shape drawn for you.
- Choose Magnetism to find an atom or ion's unpaired electrons and spin-only magnetic moment — and, for d-block ions, to compare high-spin and low-spin octahedral complexes.
- Click Calculate to see the result, a plain-English callout, the visuals, and the step-by-step working.
How electron configurations work
Electrons live in shells (n = 1, 2, 3 …) divided into subshells s, p, d and f. A subshell has 2l+1 orbitals — 1, 3, 5 and 7 — and each orbital holds at most two electrons, so the subshells hold 2, 6, 10 and 14 electrons.
Aufbau principle: electrons fill the lowest-energy subshell that still has room. The Madelung rule gives the order: sort subshells by n + l, and when two tie, the lower n goes first — 1s, 2s, 2p, 3s, 3p, 4s, 3d, 4p, 5s, 4d, 5p, 6s, 4f, 5d, 6p, 7s, 5f, 6d, 7p.
Pauli exclusion principle: no two electrons in an atom can have the same four quantum numbers, so an orbital holds at most two electrons, with opposite spins (↑↓).
Hund's rule: in a subshell with several orbitals, each orbital gets one electron (all spin-up) before any orbital gets a second. That is why nitrogen's 2p³ has three unpaired electrons and oxygen's 2p⁴ has two.
Exceptions: about twenty elements — Cr, Cu, Nb, Mo, Ru, Rh, Pd, Ag, La, Ce, Gd, Pt, Au, Ac, Th, Pa, U, Np, Cm and Lr — differ from the simple order, because neighbouring subshells are close in energy and half-filled or completely filled subshells are extra stable. This calculator uses the experimentally established ground states.
Noble-gas shorthand: the inner electrons that match the previous noble gas are replaced by its symbol in brackets, so sulfur's 1s² 2s² 2p⁶ 3s² 3p⁴ becomes [Ne] 3s² 3p⁴.
Ions: a cation loses its valence electrons in the order np, then ns, then (n−1)d, then (n−2)f — outermost first — and only then any inner-core electrons, so a transition metal loses its 4s electrons before its 3d electrons even though 4s filled first. An anion gains electrons in the next subshell with room, in filling order. Atoms and ions with the same number of electrons are called isoelectronic.
Valence electrons: the outer s and p electrons (plus the (n−1)d electrons for transition metals) take part in bonding, and they set an element's chemistry and its place in the periodic table.
Magnetism: any unpaired electron makes an atom or ion paramagnetic; if every electron is paired it is diamagnetic. The spin-only formula μₛ = √(n(n+2)) turns the number of unpaired electrons n into a magnetic moment in Bohr magnetons. In an octahedral complex a d⁴–d⁷ ion can be high spin or low spin, so the same configuration can be strongly magnetic or not magnetic at all.
Formulas & Equations Used
Orbitals in a subshell: number of orbitals = 2l + 1 (s: 1, p: 3, d: 5, f: 7)
Subshell capacity: max electrons = 2(2l + 1) (2, 6, 10, 14)
Shell capacity: max electrons in shell n = 2n²
Filling order (Madelung): rank = n + l; lower rank fills first, lower n breaks ties
Allowed quantum numbers: n = 1, 2, 3 …; l = 0 to n−1; mₗ = −l to +l; mₛ = ±½
Electrons in an ion: N = Z − charge
Order electrons leave a cation (period P): Pp → Ps → (P−1)d → (P−2)f, then the inner core
Unpaired electrons in a subshell with e electrons and k = 2l+1 orbitals: unpaired = e if e ≤ k, otherwise 2k − e
Nodes in an orbital: radial nodes = n − l − 1; angular nodes = l
Spin-only magnetic moment: μₛ = √(n(n+2)) Bohr magnetons, n = unpaired electrons
Total spin and multiplicity: S = n/2; spin multiplicity = 2S + 1 = n + 1
Unpaired electrons in an octahedral dk ion (k = 1 to 10): high spin: 1, 2, 3, 4, 5, 4, 3, 2, 1, 0 | low spin: 1, 2, 3, 2, 1, 0, 1, 2, 1, 0
Example Problems & Step-by-Step Solutions
Example 1 — Sulfur (Z = 16)
Write the configuration and count the unpaired electrons.
Step: Fill in order: 1s² (2), 2s² (4), 2p⁶ (10), 3s² (12), 3p⁴ (16). The 3p subshell has 3 orbitals: three ↑ first, then one ↓ pairs up.
Result: 1s² 2s² 2p⁶ 3s² 3p⁴ = [Ne] 3s² 3p⁴, with 2 unpaired electrons and 6 valence electrons.
Example 2 — Iron (Z = 26)
Why is 4s written before, or after, 3d?
Step: Fill in order: …3p⁶ (18), 4s² (20), 3d⁶ (26). The 3d subshell has 5 orbitals: five ↑ then one ↓.
Result: [Ar] 3d⁶ 4s² with 4 unpaired electrons — iron is strongly paramagnetic.
Example 3 — Chromium (Z = 24), an exception
The simple order predicts [Ar] 3d⁴ 4s².
Step: Moving one 4s electron into 3d makes 3d⁵, a half-filled subshell with five parallel spins, which is slightly more stable.
Result: [Ar] 3d⁵ 4s¹, with 6 unpaired electrons (five in 3d, one in 4s).
Example 4 — The ion Fe³⁺
Iron loses three electrons: 26 − 3 = 23 electrons remain.
Step: Iron is in period 4, so electrons leave in the order 4p → 4s → 3d: both 4s electrons go first, then one 3d electron.
Result: [Ar] 3d⁵, a half-filled subshell with 5 unpaired electrons — one reason Fe³⁺ is so common.
Example 5 — Mg²⁺ and O²⁻ are isoelectronic
Magnesium is [Ne] 3s²; oxygen is [He] 2s² 2p⁴.
Step: Mg loses its two 3s electrons; O gains two electrons in 2p, completing it to 2p⁶.
Result: Both become 1s² 2s² 2p⁶ — exactly neon's arrangement, 10 electrons each.
Example 6 — Decode [Ne] 3s² 3p⁵
Which atom has this configuration?
Step: [Ne] stands for 10 electrons; add 2 (3s²) and 5 (3p⁵): 10 + 2 + 5 = 17 electrons.
Result: The neutral atom with 17 electrons is chlorine (Z = 17), and its ground state matches exactly.
Example 7 — The last electron in iron
Find (n, l, mₗ, mₛ) for electron 26.
Step: Electron 26 is the 6th electron in 3d, so n = 3 and l = 2. The first five fill mₗ = −2 … +2 with spin ↑; the sixth returns to mₗ = −2 with spin ↓.
Result: (3, 2, −2, −½).
Example 8 — An excited state
Is 1s² 2s² 2p⁵ 3s¹ a ground state?
Step: Count: 2 + 2 + 5 + 1 = 10 electrons, the same as neon, whose ground state is 1s² 2s² 2p⁶.
Result: It is neon with one 2p electron promoted to 3s — a legal but excited state, which drops back and gives off light.
Example 9 — Fe²⁺: high spin or low spin?
Fe²⁺ is [Ar] 3d⁶, a d⁶ ion. Compare weak and strong octahedral fields.
Step: Weak field: five orbitals get one electron each, the sixth pairs up → t₂g⁴ e_g², 4 unpaired, μₛ = √(4×6) = √24. Strong field: all six pair in t₂g → t₂g⁶, 0 unpaired.
Result: 4.90 BM (paramagnetic) in a weak field, but 0 BM (diamagnetic) in a strong field.
Example 10 — Cu²⁺ and its single spin
Copper is [Ar] 3d¹⁰ 4s¹; Cu²⁺ has 27 electrons.
Step: Remove 4s¹ first, then one 3d electron → [Ar] 3d⁹. Nine electrons in five orbitals leave one orbital half-full: n = 1, so μₛ = √(1×3) = √3.
Result: 1 unpaired electron, μₛ = 1.73 BM, paramagnetic.
Frequently Asked Questions
Why does 4s fill before 3d?
In an atom with those subshells still empty, 4s has slightly lower energy than 3d, so it fills first. Once 3d holds electrons, 4s electrons sit farther out and are the first to be removed when the atom forms a cation.
Which elements are exceptions, and why?
Cr, Cu, Nb, Mo, Ru, Rh, Pd, Ag, La, Ce, Gd, Pt, Au, Ac, Th, Pa, U, Np, Cm and Lr. Their neighbouring subshells (3d/4s, 4d/5s, 4f/5d, 5f/6d) are very close in energy, and half-filled or completely filled subshells give a small extra stability.
What does [Ar] mean in a configuration?
It stands for argon's complete configuration, 1s² 2s² 2p⁶ 3s² 3p⁶ (18 electrons). Using the previous noble gas as shorthand keeps the focus on the outer electrons that decide chemical behaviour.
Is it wrong to write 3d before 4s?
No. Both orders describe the same atom. Writing by shell (1s 2s 2p 3s 3p 3d 4s) is the textbook convention; writing in filling order (… 3p 4s 3d) shows the sequence electrons were added. The calculator lets you choose.
What is an unpaired electron, and why does it matter?
An unpaired electron sits alone in an orbital. Its spin makes the atom paramagnetic — attracted into a magnetic field. Atoms with every electron paired are diamagnetic and are very weakly repelled.
How many valence electrons do transition metals have?
Usually the ns electrons plus the (n−1)d electrons, which is the group number for groups 3–12. Zinc, cadmium and mercury, whose d subshell is full and inert, are often treated as having only 2.
What do the four quantum numbers mean?
n is the shell (energy and size), l is the subshell shape (0 = s, 1 = p, 2 = d, 3 = f), mₗ chooses the orbital within the subshell (−l to +l), and mₛ is the spin (+½ or −½). No two electrons in an atom may share all four.
Why are the heaviest elements marked as predicted?
Elements above lawrencium (Z = 103) are made a few atoms at a time and are very short-lived, so their configurations come from relativistic calculations rather than direct measurement. The values shown are the best current predictions.
What is the spin-only magnetic moment?
It is the magnetic moment you would get if only electron spin mattered: μₛ = √(n(n+2)) in Bohr magnetons, where n is the number of unpaired electrons. It comes from μ = 2√(S(S+1)) with S = n/2, and it works well for first-row transition-metal ions.
Why can the same ion be magnetic or non-magnetic?
In an octahedral complex the ligands split the d orbitals into a lower t₂g set and an upper e_g set. With weak-field ligands the electrons spread out (high spin); with strong-field ligands they pair up in t₂g first (low spin). For d⁴ to d⁷ ions that changes the number of unpaired electrons — for example Fe²⁺ has 4 or 0.
Is the spin-only value always accurate?
No. Electrons moving in their orbitals add a contribution that spin-only ignores. It matters most for the heavier d-block and for lanthanide ions, whose measured moments can differ a lot from the formula. Gd³⁺ (seven parallel f spins, no orbital contribution) is the classic case where it works.
What does isoelectronic mean?
Species with the same number of electrons, and often the same arrangement, such as N³⁻, O²⁻, F⁻, Ne, Na⁺, Mg²⁺ and Al³⁺ (all 1s² 2s² 2p⁶). Within the series, the more protons, the smaller the species.