# How to write electron configurations

Canonical: https://duckyhelper.com/learn/chemistry/electron-configuration/
Updated: 2026-10-01

An electron configuration lists which orbitals an atom's electrons are in, like \(1s^2\,2s^2\,2p^6\) for neon. Electrons fill the lowest-energy subshells first, in the order 1s, 2s, 2p, 3s, 3p, 4s, 3d, 4p and so on. An s subshell holds 2 electrons, p holds 6, d holds 10 and f holds 14. For a neutral atom, the superscripts add up to the atomic number.

## Key ideas

Read \(2p^6\) as: shell number 2, subshell type p, 6 electrons in it.

**How many electrons each subshell holds**

| Subshell | Orbitals | Max electrons | First appears in shell |
| --- | --- | --- | --- |
| s | 1 | 2 | 1 |
| p | 3 | 6 | 2 |
| d | 5 | 10 | 3 |
| f | 7 | 14 | 4 |

- **Aufbau principle.** Fill subshells from lowest to highest energy: 1s, 2s, 2p, 3s, 3p, 4s, 3d, 4p, 5s, 4d, 5p, 6s, 4f, 5d, 6p. Note that 4s fills before 3d.
- **Pauli exclusion principle.** Each orbital holds at most 2 electrons, and they must have opposite spins.
- **Hund's rule.** In a set of equal-energy orbitals (like the three 2p orbitals), electrons go in one per orbital first, all with the same spin, before any pair up.

The periodic table is a map of this order. Groups 1 and 2 are the s block, groups 13 to 18 are the p block, the transition metals are the d block and the two rows at the bottom are the f block. Reading across the rows in order gives the filling order.

**Noble gas shorthand.** Replace the inner electrons with the noble gas before the element, in brackets. Sodium, \(1s^2\,2s^2\,2p^6\,3s^1\), becomes \([\mathrm{Ne}]\,3s^1\).

## Worked examples

**Example 1: oxygen**

Problem: Write the electron configuration of oxygen (atomic number 8).

1. A neutral oxygen atom has 8 electrons.
2. Fill in order: 1s takes 2 (6 left), 2s takes 2 (4 left), 2p takes the last 4.
3. Check: \(2 + 2 + 4 = 8\).

Answer: \(1s^2\,2s^2\,2p^4\)

**Example 2: iron, with shorthand**

Problem: Write the full and the noble gas configuration of iron (atomic number 26).

1. Fill 26 electrons in order: 1s 2, 2s 2, 2p 6, 3s 2, 3p 6 (18 so far), 4s 2 (20 so far), 3d takes the last 6.
2. Full configuration:

   $$
   1s^2\,2s^2\,2p^6\,3s^2\,3p^6\,4s^2\,3d^6
   $$
3. The first 18 electrons match argon, so replace them with [Ar].

Answer: \([\mathrm{Ar}]\,4s^2\,3d^6\)

**Example 3: an ion**

Problem: Write the configuration of the \(\mathrm{Fe^{3+}}\) ion.

1. Start from neutral iron: \([\mathrm{Ar}]\,4s^2\,3d^6\). A 3+ ion has lost 3 electrons.
2. Remove electrons from the highest shell number first. For transition metals that means 4s goes before 3d, even though 4s filled first.
3. Take 2 from 4s and 1 from 3d.

Answer: \([\mathrm{Ar}]\,3d^5\)

**Example 4: unpaired electrons with Hund's rule**

Problem: How many unpaired electrons does a nitrogen atom have?

1. Nitrogen (7 electrons): \(1s^2\,2s^2\,2p^3\). The 1s and 2s orbitals are full, so their electrons are paired.
2. The three 2p electrons spread out one per 2p orbital, all with the same spin, by Hund's rule.

Answer: 3 unpaired electrons

## Common mistakes and how to fix them

- **Filling 3d before 4s.** Fix: follow the periodic table row by row. Potassium and calcium (row 4, s block) come before the transition metals.
- **Removing 3d electrons first when making a transition metal ion.** Fix: remove from the highest shell number (4s) first.
- **Superscripts that do not add up.** Fix: add them every time. They must equal the atomic number, adjusted for any charge.
- **Pairing electrons too early in an orbital diagram.** Fix: Hund's rule, one per orbital first.
- **Missing the two famous exceptions.** Chromium is \([\mathrm{Ar}]\,4s^1\,3d^5\) and copper is \([\mathrm{Ar}]\,4s^1\,3d^{10}\). A half-filled or filled d subshell is extra stable.

**Practice questions**

1. What is the electron configuration of magnesium (atomic number 12)?
   A. \(1s^2\,2s^2\,2p^6\,3s^2\)
   B. \(1s^2\,2s^2\,2p^8\)
   C. \(1s^2\,2s^2\,2p^6\,3s^1\,3p^1\)
   D. \(1s^2\,2s^2\,2p^6\,3p^2\)

   Answer: \(1s^2\,2s^2\,2p^6\,3s^2\). 12 electrons: 2 + 2 + 6 fill the first two shells, and the last 2 go into 3s. A p subshell can never hold 8.

2. Which element has the configuration \([\mathrm{Ne}]\,3s^2\,3p^5\)?
   A. F
   B. S
   C. Cl
   D. Ar

   Answer: Cl. Neon has 10 electrons, plus \(2 + 5 = 7\), gives 17 electrons. Atomic number 17 is chlorine.

3. How many valence electrons does phosphorus (atomic number 15) have?

   Answer: 5 valence electrons. Phosphorus is \([\mathrm{Ne}]\,3s^2\,3p^3\). The outermost shell is shell 3, which has \(2 + 3 = 5\) electrons.

4. How many unpaired electrons does an oxygen atom have?
   A. 0
   B. 1
   C. 2
   D. 4

   Answer: 2. Oxygen's 4 electrons in 2p fill the three orbitals one each, then the fourth pairs up in one of them. That leaves 2 unpaired.

5. What is the electron configuration of copper (atomic number 29)?
   A. \([\mathrm{Ar}]\,4s^2\,3d^9\)
   B. \([\mathrm{Ar}]\,4s^1\,3d^{10}\)
   C. \([\mathrm{Ar}]\,4s^2\,4p^9\)
   D. \([\mathrm{Kr}]\,4s^1\)

   Answer: \([\mathrm{Ar}]\,4s^1\,3d^{10}\). Copper is an exception. One 4s electron moves to 3d, giving a completely filled 3d subshell, which is lower in energy.

## Frequently asked questions

### Why does 4s fill before 3d?

In a neutral atom being built up, the 4s subshell is slightly lower in energy than 3d, so it fills first. Once the 3d orbitals have electrons in them, the energies shift, and 4s electrons are the first to leave when the atom forms an ion.

### Should I write 4s before 3d or 3d before 4s?

Both are seen. Filling order gives \([\mathrm{Ar}]\,4s^2\,3d^6\) for iron, and shell order gives \([\mathrm{Ar}]\,3d^6\,4s^2\). They describe the same atom. Use the order your teacher uses.

### What are valence electrons?

Valence electrons are the electrons in the outermost shell, the highest shell number. For main group elements, they are the s and p electrons of that shell. They take part in bonding, which is why they decide how many bonds an atom forms in a [Lewis structure](https://duckyhelper.com/learn/chemistry/lewis-structures/).

## Sources

- [OpenStax Chemistry 2e, 6.4 Electronic Structure of Atoms (Electron Configurations)](https://openstax.org/books/chemistry-2e/pages/6-4-electronic-structure-of-atoms-electron-configurations), accessed 2026-10-01

## Related

- [Periodic trends](https://duckyhelper.com/learn/chemistry/periodic-trends/)
- [How to draw Lewis structures](https://duckyhelper.com/learn/chemistry/lewis-structures/)
- [Ionic vs covalent bonds](https://duckyhelper.com/learn/chemistry/ionic-vs-covalent-bonds/)
- [Chemistry study guides](https://duckyhelper.com/learn/chemistry/)

## Try asking Ducky

- "Check my electron configurations for row 4 on my worksheet. Did I put 4s and 3d in the right order?"
- "Draw the orbital diagram for sulfur with me and show where Hund's rule matters."
- "Why is chromium an exception? Explain it like I'm new to this."

## Get DuckyHelper

Free to start. The web app works in any browser, Chromebooks included; the Mac app can also draw on your real screen. [Try it free in your browser](https://app.duckyhelper.com/?utm_source=duckyhelper.com&utm_medium=learn) or [Get the Mac app](https://duckyhelper.com/download/)
