Electron Configuration, Explained

After reading this you can write the ground-state electron configuration of any element from the filling order, condense it to noble-gas shorthand, and count the valence electrons that drive its chemistry.

What an electron configuration tells you

An electron configuration is a map of where an atom's electrons sit. It lists the subshells they occupy and how many electrons are in each. For iron, the tool's default, the answer is 1s2 2s2 2p6 3s2 3p6 4s2 3d6. That string accounts for all 26 electrons of a neutral iron atom.

Read it as a running total. The superscripts add up: 2+2+6+2+6+2+6 = 26. Each label names a shell (the number) and a subshell (the letter s, p, d or f). The configuration explains why iron forms \text{Fe}^{2+} and \text{Fe}^{3+} ions, why it is magnetic, and where it sits in the periodic table.

The whole scheme rests on one fact: electrons in a bound atom occupy discrete energy levels, and in the ground state they fill the lowest available levels first. No electron sits higher than it must.

When this model works and when it does not

The filling rules give the correct ground-state configuration for most neutral atoms, and they are the right starting point for every element. Use them when you need valence-electron counts, when you are predicting ion charges, or when you are placing an element in the table.

Do not treat the simple order as exact truth. It is an ordering of average energies, not a law. Real subshell energies depend on nuclear charge and on how electrons shield each other, so the order shifts from element to element. Around twenty elements break the plain rule, and for ions you should remove electrons from the highest principal shell first, not simply reverse the filling order.

Filling order and removal order are not mirror images. Neutral iron fills 4s before 3d, but when iron ionizes it loses the 4s electrons first. So \text{Fe}^{2+} is [Ar] 3d6, not [Ar] 4s2 3d4.

The filling rule and the intuition behind it

Electrons enter subshells in order of increasing energy. A useful bookkeeping tool is the Madelung rule, which ranks subshells by the sum of the principal quantum number n and the azimuthal quantum number \ell.

\text{fill order by increasing } (n + \ell), \text{ ties broken by smaller } n

Here n is the shell number (1, 2, 3, ...) and \ell labels the subshell: \ell = 0 for s, 1 for p, 2 for d, 3 for f. Compare 4s and 3d. For 4s, n+\ell = 4+0 = 4. For 3d, n+\ell = 3+2 = 5. The smaller sum fills first, so 4s comes before 3d. That single result explains the shape of the fourth row of the periodic table.

Two more rules complete the picture. The Pauli exclusion principle caps each subshell: s holds 2 electrons, p holds 6, d holds 10, f holds 14. Hund's rule says that within a subshell electrons spread out singly, with parallel spins, before pairing up. Hund's rule is why half-filled and filled subshells are unusually stable, and that stability is what drives the exceptions.

Each subshell type holds a fixed maximum: 2, 6, 10 and 14. The pattern is 2(2ℓ+1).

Working through iron step by step

Iron (Z = 26), the demo element

Enter Fe and read off the configuration. Here is how the 26 electrons land, following the Madelung order.

  1. Fill 1s2. Running total 2.
  2. Fill 2s2. Total 4.
  3. Fill 2p6. Total 10.
  4. Fill 3s2. Total 12.
  5. Fill 3p6. Total 18. This is the argon core.
  6. Fill 4s2 before 3d, because n+\ell = 4 beats 5. Total 20.
  7. Place the remaining 6 electrons in 3d: 3d6. Total 26.

Full result: 1s2 2s2 2p6 3s2 3p6 4s2 3d6. The noble-gas shorthand replaces the first 18 electrons (the argon configuration) with [Ar], giving [Ar] 4s2 3d6. Shorthand is not just shorter, it separates the inert core from the electrons that react.

Reading the result: valence electrons and shorthand

The valence electrons are the ones in the outermost shell plus, for transition metals, the partly filled d subshell. For a main-group atom the count is straightforward. Chlorine is [Ne] 3s2 3p5, so shell 3 holds 2+5 = 7 valence electrons, matching its group.

Transition metals need care. Iron's outermost shell is n=4 with 2 electrons, and its 3d subshell holds 6 more that also take part in bonding. That is why iron shows oxidation states from +2 up to +6. The table below lists a few configurations you can check against the tool.

Configurations and valence counts for selected elements
ElementZFull configurationShorthandValence
Oxygen81s2 2s2 2p4[He] 2s2 2p46
Sodium111s2 2s2 2p6 3s1[Ne] 3s11
Iron261s2 2s2 2p6 3s2 3p6 4s2 3d6[Ar] 4s2 3d68
Copper291s2 2s2 2p6 3s2 3p6 4s1 3d10[Ar] 4s1 3d1011

Noble-gas shorthand uses the nearest noble gas below the element. For any element after argon (Z = 18) and up to krypton (Z = 36), the core is [Ar] and you write out only the electrons beyond 18.

Explore the exceptions

Chromium (Z = 24) and copper (Z = 29) are the famous rule-breakers. The plain rule predicts chromium as [Ar] 4s2 3d4, but the real ground state is [Ar] 4s1 3d5. One electron moves from 4s to 3d so that both subshells are half or fully populated, which lowers the total energy. Copper does the same: predicted [Ar] 4s2 3d9, actual [Ar] 4s1 3d10.

The filling order is 1s, 2s, 2p, 3s, 3p, 4s, 3d, 4p, 5s, 4d, 5p, 6s, 4f, 5d, 6p, 7s, 5f, 6d, 7p. Set the atomic number and fill subshells in that order until the electrons run out, obeying the caps 2, 6, 10, 14.

Common mistakes

Most errors come from a handful of slips. Watch for these.

Writing subshells in shell order instead of energy order
Some people list 3d before 4s because 3 is less than 4. Fill by energy: 4s before 3d. You may write the finished configuration either way, but fill in Madelung order.
Ionizing from the wrong subshell
Remove electrons from the highest n first. For transition-metal cations that means the s electrons leave before the d electrons.
Forgetting the exceptions
Chromium and copper are the two you meet most often. Memorize those two even if you look up the rest.
Miscounting the cap on d and f
d holds 10, not 8; f holds 14. A quick check: the superscripts must sum to Z for a neutral atom.

Related tools

Once you know an element's valence, the next steps usually involve amounts and reactions. To find how many grams a mole weighs, use the Molar Mass Calculator, and to convert between mass, moles and particle count use the Mole Calculator. For reactions, balance them with the Chemical Equation Balancer and then find amounts with the Stoichiometry Calculator. When you want the raw atomic data behind a configuration, the Periodic Table Element Lookup gives atomic number, mass and group in one place. Redox work that depends on electron transfer connects to the Nernst Equation Calculator.

Frequently asked questions

Why does 4s fill before 3d but empty first?

In a neutral atom the 4s subshell has slightly lower average energy, so it fills first. Once electrons occupy 3d, the added nuclear pull and electron repulsion push the 4s level above 3d, so 4s electrons leave first during ionization. The order flips because the energies themselves shift.

How do I write the configuration of an ion?

Start from the neutral atom, then remove electrons from the highest principal shell for cations, or add them to the next available subshell for anions. Chlorine gains one electron to become \text{Cl}^- as [Ne] 3s2 3p6, the argon configuration.

What counts as a valence electron for a transition metal?

Count the outermost s electrons plus the electrons in the partly filled d subshell, since both can bond. For iron that is 4s2 plus 3d6, or 8, which is why oxidation states up to +6 appear.

Do I need to memorize all the exceptions?

No. Learn chromium and copper because they appear constantly. For the rest, use the tool or a reference. The physical reason is always the same: a half- or fully-filled d or f subshell is extra stable.

How far does the filling order go?

Through element 118. The full Madelung sequence ends with 7p. Heavy elements have configurations that grow uncertain because relativistic effects shift energies, so treat computed configurations beyond the actinides as approximate.