Electron Configuration Calculator Formula
Understand the math behind the electron configuration calculator. Each variable explained with a worked example.
Formulas Used
Total Electrons
total_electrons = atomic_numberPeriod
period_num = atomic_number <= 2 ? 1 : atomic_number <= 10 ? 2 : atomic_number <= 18 ? 3 : atomic_number <= 36 ? 4 : atomic_number <= 54 ? 5 : atomic_number <= 86 ? 6 : 7Variables
| Variable | Description | Default |
|---|---|---|
atomic_number | Atomic Number (Z) | 11 |
period | Derived value= atomic_number <= 2 ? 1 : atomic_number <= 10 ? 2 : atomic_number <= 18 ? 3 : atomic_number <= 36 ? 4 : atomic_number <= 54 ? 5 : atomic_number <= 86 ? 6 : 7 | calculated |
How It Works
Electron Configuration
How It Works
Electrons fill orbitals following three rules: 1. Aufbau Principle: Fill lowest energy orbitals first (1s, 2s, 2p, 3s, 3p, 4s, 3d, 4p, ...) 2. Pauli Exclusion: Each orbital holds at most 2 electrons with opposite spins 3. Hund's Rule: Within a subshell, one electron goes in each orbital before pairing
The order of filling follows the diagonal rule or is memorized from periodic table blocks.
Worked Example
Find the electron configuration of sodium (Z = 11).
atomic_number = 11
- 01Z = 11, so 11 electrons to place
- 021s² (2 electrons, 9 remaining)
- 032s² (2 electrons, 7 remaining)
- 042p⁶ (6 electrons, 1 remaining)
- 053s¹ (1 electron, 0 remaining)
- 06Configuration: 1s² 2s² 2p⁶ 3s¹
- 07Noble gas notation: [Ne] 3s¹
- 08Valence electrons: 1
Ready to run the numbers?
Open Electron Configuration Calculator