Electron configuration calculator
This electron configuration calculator writes the ground-state electron configuration of any element from hydrogen to oganesson, or of an ion such as Fe³⁺, in full Aufbau order and in noble-gas notation, draws the orbital box diagram and counts the valence and unpaired electrons.
Electron configuration calculator
How to use the electron configuration calculator
Type an element symbol (Fe), an English name (iron) or an atomic number (26). For an ion, add the charge after the symbol: Fe3+, Fe+3, Fe³⁺, Fe(III), O2− or Cl- all work, or keep the symbol and put the charge in the second field. The electron configuration calculator then shows the configuration in full, in the order the subshells fill, and in noble-gas (condensed) notation, draws an orbital box diagram with arrows for the subshells outside the noble-gas core, and counts the electrons per shell, the valence electrons and the unpaired electrons. It also names the block, period and group. Open “Show the working” to see the filling order, any exception and, for ions, which electrons were removed or added.
What does an electron configuration calculator show?
An electron configuration lists how many electrons occupy each subshell of an atom in its lowest-energy (ground) state. A subshell is written as its shell number n and its letter s, p, d or f, with the number of electrons as a superscript: 1s² 2s² 2p⁴ is oxygen. The four subshell types hold 2, 6, 10 and 14 electrons because they contain 1, 3, 5 and 7 orbitals, each taking two electrons of opposite spin (the Pauli principle). Inside a subshell, as the electron configuration calculator draws it, electrons first occupy separate orbitals with parallel spins before they pair up (Hund’s rule); that is what the arrows in the orbital diagram show.
The Aufbau principle and the Madelung (n + l) rule in the electron configuration calculator
Electrons fill subshells from the lowest energy upwards (the Aufbau, or building-up, principle). For neutral atoms the order follows the Madelung rule: subshells fill in order of increasing n + l (l = 0, 1, 2, 3 for s, p, d, f), and for equal n + l the one with the smaller n fills first. This is why 4s (n + l = 4) fills before 3d (n + l = 5), the order given in OpenStax Chemistry 2e, section 6.4. The electron configuration calculator uses this order and then applies the measured exceptions.
| n + l | Subshells in filling order | Electrons added | Running total (element reached) |
|---|---|---|---|
| 1 | 1s | 2 | 2 (He) |
| 2 | 2s | 2 | 4 (Be) |
| 3 | 2p, 3s | 6 + 2 | 12 (Mg) |
| 4 | 3p, 4s | 6 + 2 | 20 (Ca) |
| 5 | 3d, 4p, 5s | 10 + 6 + 2 | 38 (Sr) |
| 6 | 4d, 5p, 6s | 10 + 6 + 2 | 56 (Ba) |
| 7 | 4f, 5d, 6p, 7s | 14 + 10 + 6 + 2 | 88 (Ra) |
| 8 | 5f, 6d, 7p | 14 + 10 + 6 | 118 (Og) |
Exceptions the electron configuration calculator handles
For 20 of the elements up to hassium (Z = 108) the measured ground state is not the simple Aufbau filling. The electron configuration calculator follows the NIST table of ground levels and ionization energies for the neutral atoms, from which the list below is taken. Above Z = 108 no configuration has been measured, so the calculator shows the Aufbau prediction, which matches the predicted values usually quoted for them, for example [Rn] 5f¹⁴ 6d⁸ 7s² for darmstadtium and [Rn] 5f¹⁴ 6d⁹ 7s² for roentgenium.
| Element | Aufbau prediction | Measured ground state (NIST) |
|---|---|---|
| Cr (24) | [Ar] 3d⁴ 4s² | [Ar] 3d⁵ 4s¹ |
| Cu (29) | [Ar] 3d⁹ 4s² | [Ar] 3d¹⁰ 4s¹ |
| Nb (41) | [Kr] 4d³ 5s² | [Kr] 4d⁴ 5s¹ |
| Mo (42) | [Kr] 4d⁴ 5s² | [Kr] 4d⁵ 5s¹ |
| Ru (44) | [Kr] 4d⁶ 5s² | [Kr] 4d⁷ 5s¹ |
| Rh (45) | [Kr] 4d⁷ 5s² | [Kr] 4d⁸ 5s¹ |
| Pd (46) | [Kr] 4d⁸ 5s² | [Kr] 4d¹⁰ |
| Ag (47) | [Kr] 4d⁹ 5s² | [Kr] 4d¹⁰ 5s¹ |
| La (57) | [Xe] 4f¹ 6s² | [Xe] 5d¹ 6s² |
| Ce (58) | [Xe] 4f² 6s² | [Xe] 4f¹ 5d¹ 6s² |
| Gd (64) | [Xe] 4f⁸ 6s² | [Xe] 4f⁷ 5d¹ 6s² |
| Pt (78) | [Xe] 4f¹⁴ 5d⁸ 6s² | [Xe] 4f¹⁴ 5d⁹ 6s¹ |
| Au (79) | [Xe] 4f¹⁴ 5d⁹ 6s² | [Xe] 4f¹⁴ 5d¹⁰ 6s¹ |
| Ac (89) | [Rn] 5f¹ 7s² | [Rn] 6d¹ 7s² |
| Th (90) | [Rn] 5f² 7s² | [Rn] 6d² 7s² |
| Pa (91) | [Rn] 5f³ 7s² | [Rn] 5f² 6d¹ 7s² |
| U (92) | [Rn] 5f⁴ 7s² | [Rn] 5f³ 6d¹ 7s² |
| Np (93) | [Rn] 5f⁵ 7s² | [Rn] 5f⁴ 6d¹ 7s² |
| Cm (96) | [Rn] 5f⁸ 7s² | [Rn] 5f⁷ 6d¹ 7s² |
| Lr (103) | [Rn] 5f¹⁴ 6d¹ 7s² | [Rn] 5f¹⁴ 7s² 7p¹ |
In the electron configuration calculator these 20 cases are stored explicitly. Exceptions appear where two subshells have almost the same energy, such as ns and (n − 1)d, or 4f and 5d. Half-filled and filled d subshells (Cr, Mo, Cu, Ag, Au) are especially favorable, but no simple rule predicts all cases: tungsten, below chromium, keeps 5d⁴ 6s², and niobium has 4d⁴ 5s¹ although vanadium above it is regular.
Worked examples with the electron configuration calculator
Oxygen (Z = 8). Type O into the electron configuration calculator. Fill 1s², 2s², then the remaining 4 electrons go into 2p: 1s² 2s² 2p⁴, or [He] 2s² 2p⁴. In the orbital diagram the first three 2p electrons occupy separate boxes and the fourth pairs up, leaving 2 unpaired electrons, so an isolated oxygen atom is paramagnetic. Valence electrons: 2 + 4 = 6 (group 16).
Iron (Z = 26), the default of the electron configuration calculator. Aufbau order: 1s² 2s² 2p⁶ 3s² 3p⁶ 4s² 3d⁶; noble-gas notation [Ar] 3d⁶ 4s². The six 3d electrons fill five boxes singly and pair once, so iron has 4 unpaired electrons. As a d-block element in group 8 it has 8 electrons in 4s + 3d.
Iron(II), Fe²⁺. Remove two electrons. They come from 4s, the subshell with the highest n, not from 3d, even though 4s filled first: Fe²⁺ = [Ar] 3d⁶, with 4 unpaired electrons. For Fe³⁺ one more electron leaves 3d, giving [Ar] 3d⁵ with 5 unpaired electrons, a half-filled d subshell.
Copper (Z = 29). Aufbau predicts [Ar] 3d⁹ 4s², but the measured ground state is [Ar] 3d¹⁰ 4s¹, with one unpaired electron. Cu⁺ is then [Ar] 3d¹⁰ and Cu²⁺ is [Ar] 3d⁹. Type Cu, Cu+ and Cu2+ into the electron configuration calculator to see the three diagrams side by side.
Electron configuration of ions with the electron configuration calculator
The electron configuration calculator handles ions with two simple rules. For anions, add electrons in the normal Aufbau order: Cl⁻ is [Ne] 3s² 3p⁶, the same as argon. For cations, remove electrons from the subshell with the highest principal quantum number first, and within the same n from the highest l (p before s): Sn²⁺ is [Kr] 4d¹⁰ 5s² and Sn⁴⁺ is [Kr] 4d¹⁰. For transition metals this means the ns electrons leave before the (n − 1)d electrons, as OpenStax explains for Fe²⁺. The same rule gives the familiar lanthanide ions: Ce³⁺ = [Xe] 4f¹, Gd³⁺ = [Xe] 4f⁷, Eu³⁺ = [Xe] 4f⁶.
Valence electrons, unpaired electrons and blocks
The electron configuration calculator counts valence electrons as the electrons of the outer shell (ns + np) for s- and p-block elements, as ns + (n − 1)d for the d block (equal to the group number for groups 3 to 12) and as ns + (n − 1)d + (n − 2)f for the f block. For group 12 (Zn, Cd, Hg) the filled d¹⁰ subshell usually behaves as part of the core, so chemists often say these elements have 2 valence electrons. Unpaired electrons are counted with Hund’s rule; atoms with at least one are paramagnetic. Cerium is the one case up to Z = 108 where Hund’s rule disagrees with the NIST ground level: its 4f and 5d electrons are paired. The block is the subshell the last electron enters in the Aufbau order, which puts La–Yb and Ac–No in the f block and Lu and Lr in group 3.
Common mistakes an electron configuration calculator catches
Removing 3d electrons before 4s in transition-metal cations. Fe²⁺ is [Ar] 3d⁶, not [Ar] 3d⁴ 4s². Forgetting the exceptions. Cr and Cu appear in almost every exam. Pairing too early. Nitrogen’s three 2p electrons are all unpaired. Using the wrong noble gas. The core is the noble gas of the previous period: [Ar] for potassium, not [Kr]. Counting filled d electrons as valence electrons in the p block. Gallium has 3 valence electrons (4s² 4p¹), not 13. The electron configuration calculator lists every one of these points in its working, so you can compare it with your own answer.
Related calculators
Atomic structure links to many other topics: find atomic weights with the Average Atomic Mass Calculator, assign oxidation states with the Oxidation Number Calculator and compute formula masses with the Molar Mass Calculator.
- Average Atomic Mass Calculator
- Oxidation Number Calculator
- Molar Mass Calculator
- Nuclear Binding Energy Calculator
- Half-Life Calculator
- All chemistry calculators
Frequently asked questions
Why is chromium 3d⁵ 4s¹ and not 3d⁴ 4s²?
The 4s and 3d subshells are very close in energy in chromium. Moving one electron from 4s into 3d gives two half-filled subshells with six parallel spins, which lowers the electron–electron repulsion and gains exchange energy. The measured ground state ([Ar] 3d⁵ 4s¹, NIST) confirms it; copper ([Ar] 3d¹⁰ 4s¹) is the same effect with a filled d subshell.
How do you write the electron configuration of an ion?
Start from the neutral atom. For a cation remove electrons from the highest n first (4s before 3d), for an anion add them in Aufbau order. Fe³⁺: [Ar] 3d⁶ 4s² minus 4s² minus one 3d electron = [Ar] 3d⁵. O²⁻: 1s² 2s² 2p⁴ plus two = 1s² 2s² 2p⁶.
What is the noble gas configuration?
A short form that replaces the inner electrons by the symbol of the previous noble gas in brackets: iron, 1s² 2s² 2p⁶ 3s² 3p⁶ 3d⁶ 4s², becomes [Ar] 3d⁶ 4s².
Can the electron configuration calculator handle all 118 elements?
Yes. Elements 1 to 108 follow the measured NIST ground states, including all 20 exceptions; for 109 to 118, where no measurement exists, the electron configuration calculator shows the predicted Aufbau configuration and marks it as predicted.
Does 4s or 3d come first?
In the filling (Aufbau) order 4s comes before 3d, so potassium and calcium put their outer electrons in 4s. In the written configuration of transition metals many books list 3d before 4s (shell order), and in ions the 4s electrons are removed first. The electron configuration calculator shows both orders.
Is this electron configuration calculator free?
Yes. It runs in your browser, needs no sign-up and keeps no record of what you enter.