Article — Electron Configuration Calculator
The electron configuration calculator, explained
An electron configuration lists how the electrons of an atom occupy its subshells, written as terms like 1s² 2s² 2p⁶. The calculator accepts any element from hydrogen (Z = 1) to oganesson (Z = 118) and returns both the full spdf form and the noble-gas shorthand, with anomalies for Cr, Cu, Mo, Ag, Au, Pt and others handled.
What is an electron configuration?
An electron configuration lists every occupied subshell of an atom together with how many electrons sit in each. It uses three pieces: the principal quantum number n (the shell), the orbital letter l (s, p, d, or f), and a superscript giving the electron count in that subshell. Carbon (Z = 6) is 1s² 2s² 2p². Iron (Z = 26) is 1s² 2s² 2p⁶ 3s² 3p⁶ 3d⁶ 4s².
The configuration is governed by three physical constraints. The Pauli exclusion principle caps any orbital at two electrons with opposite spins. The Aufbau principle says electrons enter the lowest-energy subshell available. Hund's rule arranges electrons inside a subshell to maximize parallel spins. Together they reproduce nearly every ground-state configuration measured in atomic spectroscopy.
The terms s, p, d, and f are historical spectroscopic abbreviations for "sharp," "principal," "diffuse," and "fundamental" — names given to line series in the 1880s, decades before quantum mechanics gave them meaning as orbital angular momentum labels.
Aufbau order and the Madelung rule
The Madelung rule, also called the n + l rule, gives the standard filling order. Subshells fill from lowest n + l upward; when two share the same n + l, the one with lower n fills first. So 3d (n + l = 5) fills after 4s (n + l = 4), but before 4p. The full sequence runs 1s, 2s, 2p, 3s, 3p, 4s, 3d, 4p, 5s, 4d, 5p, 6s, 4f, 5d, 6p, 7s, 5f, 6d, 7p.
The rule is a useful approximation, not a law of physics. Real orbital energies depend on nuclear charge and the partial screening of inner electrons. Past Z = 20, two named subshells often sit close enough in energy that the strict order breaks down, which is where anomalies appear.
1s 2s 2p 3s 3p 4s 3d4p 5s 4d 5p 6s 4f 5d6p 7s 5f 6d 7pReading spdf notation
The format n lx tells you three things at once. The leading digit (n) is the shell number, the letter is the subshell type, and the superscript is the electron count. Sulfur is 1s² 2s² 2p⁶ 3s² 3p⁴ — the superscripts sum to 16, matching Z.
Each subshell has a fixed capacity from 2(2l + 1): one orbital with two spins for s, three for p, five for d, seven for f. The caps are 2, 6, 10, and 14. A configuration that exceeds those numbers (3p⁷, 3d¹¹) is wrong by construction.
- 1s = 2 electrons max (1 orbital)
- 2p = 6 electrons max (3 orbitals: 2px, 2py, 2pz)
- 3d = 10 electrons max (5 orbitals)
- 4f = 14 electrons max (7 orbitals)
- Total electrons in the configuration must equal the atomic number Z
- Order follows Madelung n + l, but the written form is conventionally sorted by shell
Noble-gas shorthand explained
The noble-gas shorthand condenses an atom's filled inner shells into the symbol of the previous noble gas, in square brackets. Sodium (Z = 11) compresses from 1s² 2s² 2p⁶ 3s¹ to [Ne] 3s¹. Iron is [Ar] 3d⁶ 4s². The bracketed part stands for the full configuration of the noble gas, so [Ar] = 1s² 2s² 2p⁶ 3s² 3p⁶.
Six noble-gas cores are in regular use: [He], [Ne], [Ar], [Kr], [Xe], and [Rn]. The shorthand never changes the physics, but for a transition metal or a lanthanide it cuts the written length by roughly two thirds and makes the valence electrons jump out of the formula.
When the calculator gives you a shorthand like [Xe] 4f⁷ 6s², everything outside the bracket is the valence shell — those are the electrons that interact with neighbouring atoms in bonding and reactions.
Electron configuration anomalies
Roughly twenty elements have ground states that disagree with strict Madelung filling. The textbook cases are chromium (Z = 24) and copper (Z = 29). Naive Aufbau predicts [Ar] 3d⁴ 4s² and [Ar] 3d⁹ 4s². The measured ground states are [Ar] 3d⁵ 4s¹ and [Ar] 3d¹⁰ 4s¹. A half-filled 3d⁵ or full 3d¹⁰ gains enough exchange-energy stabilization to overcome the small 4s–3d gap.
The same pattern repeats one row down. Molybdenum mirrors chromium with [Kr] 4d⁵ 5s¹, and silver mirrors copper with [Kr] 4d¹⁰ 5s¹. Palladium goes further, putting both 5s electrons into 4d for [Kr] 4d¹⁰ with no 5s occupancy at all.
Anomalies in the f-block follow the same logic. Gadolinium (Z = 64) shows [Xe] 4f⁷ 5d¹ 6s², parking the eighth f-block electron in 5d. Platinum, gold, lanthanum, thorium, uranium, curium, and lawrencium each have documented exceptions, applied here from the NIST spectra database.
Introductory texts often mention only Cr and Cu. A few add Mo, Ag, and Au. The full count past Z = 40 is closer to twenty, and the gas-phase ground states for the heaviest actinides are still being refined experimentally. If a homework key disagrees with this calculator, it is usually the textbook leaning on the simplified rule.
Hund's rule and the Pauli principle
The Pauli exclusion principle says no two electrons in an atom can share all four quantum numbers (n, l, ml, ms). Practically that caps each orbital at two electrons with opposite spins. Hund's rule then says that within a single subshell, electrons spread out singly with parallel spins before any of them pair up.
Nitrogen (Z = 7) is the classic example. Its 2p subshell has three electrons, and Hund places each in a different p orbital with the same spin: 2px¹ 2py¹ 2pz¹. That gives nitrogen its unpaired electrons and its paramagnetism — the same exchange-energy effect that drives the d-block anomalies.
Electron configuration of ions
To write an ion's configuration, start from the neutral atom and adjust. Cations lose electrons from the highest-n s subshell first, then from d or p as needed. Fe is [Ar] 3d⁶ 4s², but Fe²⁺ is [Ar] 3d⁶ — the two 4s electrons leave before any 3d ones. Fe³⁺ is [Ar] 3d⁵, a stable half-filled d⁵.
Anions add electrons into the next available subshell. Chloride (Cl⁻) gains one electron to fill 3p⁶, becoming isoelectronic with argon: [Ne] 3s² 3p⁶. Oxide (O²⁻) gains two to reach the neon configuration. Isoelectronic species share configurations despite having different nuclear charges.
Common electron configuration mistakes
The most frequent error is forgetting that 4s fills before 3d but is removed before 3d during ionization. The order reflects a real shift: in a neutral potassium atom, 4s is the lowest available orbital, while in a transition-metal cation 3d has dropped below 4s in energy.
Other recurring mistakes: writing 2d (d starts at n = 3); writing 3f (f starts at n = 4); exceeding subshell capacity; or missing the Cr/Cu/Mo/Ag/Au/Pt anomalies. Check the totals — superscripts always sum to Z.