Electron configuration calculator
Type an element, get its ground-state electron configuration.
Examples: Fe, copper, 79.
How do you write an electron configuration?
Fill the subshells in order of increasing energy — the Aufbau order 1s, 2s, 2p, 3s, 3p, 4s, 3d, 4p, 5s, 4d, 5p, 6s, 4f, 5d, 6p, 7s, 5f, 6d, 7p — putting up to 2 electrons in an s subshell, 6 in p, 10 in d and 14 in f (OpenStax Chemistry 2e, Section 6.4). Iron has 26 electrons: 1s² 2s² 2p⁶ 3s² 3p⁶ 4s² 3d⁶. Written by shell, as NIST does, that is [Ar] 3d⁶ 4s².
Which elements are exceptions?
Twenty elements up to hassium have a measured ground state that differs from the Aufbau order, according to the NIST Atomic Spectra Database: Cr, Cu, Nb, Mo, Ru, Rh, Pd, Ag, La, Ce, Gd, Pt, Au, Ac, Th, Pa, U, Np, Cm and Lr. Chromium is [Ar] 3d⁵ 4s¹ rather than 3d⁴ 4s², copper [Ar] 3d¹⁰ 4s¹, palladium [Kr] 4d¹⁰ with no 5s electrons, and gold [Xe] 4f¹⁴ 5d¹⁰ 6s¹. The calculator shows NIST’s configuration and, next to it, what the simple rule predicts.
What is noble-gas shorthand?
The inner (core) electrons match the configuration of the previous noble gas, so they are written as its symbol in brackets and only the outer electrons are listed: sodium 1s² 2s² 2p⁶ 3s¹ becomes [Ne] 3s¹, and uranium becomes [Rn] 5f³ 6d¹ 7s².
How many valence electrons does an element have?
OpenStax defines them by block. For main-group elements they are the electrons in the outermost shell: gallium [Ar] 3d¹⁰ 4s² 4p¹ has 3, because the filled 3d counts as core. For transition metals they are the ns and (n − 1)d electrons, and for the lanthanides and actinides the ns, (n − 1)d and (n − 2)f electrons. The table also shows the plain count in the outermost shell.
What about the heaviest elements?
NIST lists ground-state configurations up to hassium (Z = 108). For meitnerium through oganesson (Z = 109–118) no measured configuration exists, so the calculator shows the Aufbau prediction and marks it as predicted — oganesson comes out as [Rn] 5f¹⁴ 6d¹⁰ 7s² 7p⁶.
Worked example: iron, copper, phosphorus and gallium
Iron (Z = 26) fills as 1s² 2s² 2p⁶ 3s² 3p⁶ 4s² 3d⁶, and grouped by shell it is [Ar] 3d⁶ 4s², with 2, 8, 14, 2 electrons in shells 1 to 4. Copper is the first exception: the simple rule predicts [Ar] 3d⁹ 4s², but the measured ground state is [Ar] 3d¹⁰ 4s¹, a filled 3d subshell with one 4s electron. Phosphorus is [Ne] 3s² 3p³, so it has 5 valence electrons (the outer shell, n = 3). Gallium is [Ar] 3d¹⁰ 4s² 4p¹; its 3d subshell is full, so only the 3 electrons in 4s and 4p count as valence.
How do I write the configuration of an ion?
Write the neutral atom first, then change the electron count by the charge. Anions simply gain electrons in the usual order: P³⁻ is 1s² 2s² 2p⁶ 3s² 3p⁶. For cations of main-group elements, the electrons added last come off first. For transition metals the ns electrons leave before the (n − 1)d electrons, so Fe²⁺ is [Ar] 3d⁶ and not [Ar] 3d⁴ 4s², and Fe³⁺ is [Ar] 3d⁵. This is the OpenStax Chemistry 2e rule, and it is why the 4s electrons of iron are removed even though they were filled before 3d. The calculator handles neutral atoms; apply the charge by hand.
How do I count unpaired electrons?
Hund's rule says that the lowest-energy arrangement puts one electron in each orbital of a subshell before any orbital gets a second. A p subshell has 3 orbitals, a d subshell 5 and an f subshell 7. Phosphorus 3p³ therefore has 3 unpaired electrons, and iron's 3d⁶ has 4 (five orbitals take one electron each, and the sixth electron pairs up in one of them). Two electrons in the same orbital must have opposite spins, which is the Pauli exclusion principle.
Common mistakes with electron configurations
Putting 3d before 4s in the filling order. The order of filling puts 4s first, while the order of writing by shell puts 3d first: the calculator shows both. Counting the d electrons of a main-group element such as gallium as valence electrons. Using the configuration of the neutral atom for an ion. Forgetting that the exceptions listed above are measured values, so copper written as [Ar] 3d⁹ 4s² is the textbook prediction and not the real ground state. Adding electron totals wrongly: the superscripts must sum to the atomic number for a neutral atom, which is the quickest check.
Sources and related calculators
Sources: OpenStax Chemistry 2e, Section 6.4 “Electronic Structure of Atoms (Electron Configurations)” for the Aufbau order, Hund’s rule, ion configurations and valence electrons; NIST Atomic Spectra Database, “Ground Levels and Ionization Energies for the Neutral Atoms”, for the measured configurations. Related: average atomic mass calculator, molar mass calculator, Rydberg equation calculator and chemical equation balancer.