Magnesium SPDF Electron Configuration Explained
Magnesium has atomic number 12, meaning it has 12 electrons to arrange across its orbitals. Its ground-state electron configuration is:
Full notation: `1s² 2s² 2p⁶ 3s²`
Shorthand notation: `[Ne] 3s²`
This configuration places Magnesium in the S-block of the periodic table — Period 3, Group 2. The last subshell filled (the s subshell) determines its block.
SPDF notation tells you exactly: which subshell each electron occupies, how many electrons are in it, and the energy level of each group. This is far more detail than the simpler Bohr model, which only shows shell totals.
Aufbau Filling Sequence for Magnesium
The Aufbau (building-up) principle states electrons fill the lowest available energy subshell first. For Magnesium (Z=12), the filling stops at the 3s² subshell.
Standard Aufbau sequence:
1s → 2s → 2p → 3s → 3p → 4s → 3d → 4p → 5s → 4d → 5p → 6s → 4f → 5d → 6p → 7s → 5f → 6d → 7p
After filling, Magnesium's configuration ends at 1s² 2s² 2p⁶ 3s², with 2 valence electrons in its outermost subshell.
Orbital Diagram of Magnesium (s, p, d, f)
The orbital diagram of Magnesium expands the configuration 1s² 2s² 2p⁶ 3s² into individual orbital boxes:
- Each s subshell holds max 2 electrons (1 orbital)
- Each p subshell holds max 6 electrons (3 orbitals)
- Each d subshell holds max 10 electrons (5 orbitals)
- Each f subshell holds max 14 electrons (7 orbitals)
Hund's Rule dictates that within any subshell, electrons fill each orbital singly (spin up ↑) before pairing. This avoids electron–electron repulsion. Magnesium's S-block placement confirms its last orbitals are s type.
The interactive diagram above shows Magnesium's complete subshell breakdown with orbital boxes for every energy level.
How to Write Magnesium's Electron Configuration
Follow these steps to write Magnesium's electron configuration from scratch:
Step 1: Identify the atomic number: Z = 12 — this is the total number of electrons to place.
Step 2: Follow the Aufbau sequence, filling the lowest energy subshells first:
> 1s → 2s → 2p → 3s → 3p → 4s → 3d → 4p → ...
Step 3: Apply Hund's Rule inside each subshell — one electron per orbital before pairing begins.
Step 4: Apply the Pauli Exclusion Principle — each orbital holds at most 2 electrons with opposite spins.
Step 5: After filling all 12 electrons, your result should match:
> 1s² 2s² 2p⁶ 3s²
Shorthand: Replace the preceding noble gas core with its symbol:
> [Ne] 3s²
Why Magnesium Matters (Real-World Insight)
🔬 Element Comparison
Magnesium vs Aluminum — Key Differences
Although Magnesium (Z=12) and Aluminum (Z=13) are adjacent on the periodic table, they behave very differently. Magnesium has 2 valence electrons vs Aluminum's 3. Their electronegativity gap is 0.30 — a critical factor in predicting bond polarity when the two interact.
Valence Electrons & S-Block Position
Magnesium has 2 valence electrons — the electrons in its highest occupied principal energy level.
As a S-block element, Magnesium's valence electrons reside in s orbitals. These are the only electrons involved in chemical bonding.
| Block | Type | Max Valence e⁻ |
|---|---|---|
| s-block | Groups 1–2 | 1–2 |
| p-block | Groups 13–18 | 3–8 |
| d-block | Groups 3–12 | up to 10 |
| f-block | Lanthanides/Actinides | up to 14 |
Magnesium sits in this table as a s-block element with 2 valence electrons.
→ See Magnesium's valence electrons in the Bohr model for the shell-based view.
→ Electronegativity of Magnesium — how strongly it attracts these electrons.
Frequently Asked Questions
Q. How many electrons does Magnesium have?
Magnesium has 12 electrons, matching its atomic number. In a neutral atom, these are balanced by 12 protons in the nucleus.
Q. What is the shell structure of Magnesium?
The electron shell distribution for Magnesium is 2, 8, 2. This shows how all 12 electrons are arranged across 3 principal energy levels.
Q. How many valence electrons does Magnesium have?
Magnesium has 2 valence electrons in its outermost shell. These are responsible for its chemical bonding and placement in Group 2.
Q. What is the SPDF configuration of Magnesium?
The full configuration is 1s² 2s² 2p⁶ 3s². This describes the exact subshell occupancy following the Aufbau principle.
Q. What block is Magnesium in?
Magnesium is in the S-block because its highest-energy electrons occupy s orbitals.

