Skip to content
ScienceQuest
Mg

Magnesium

Magnesium (Mg) is an alkaline earth metal with atomic number 12 and an atomic mass of 24.305. Its electron configuration is [Ne] 3s2, which gives it 2 valence electrons.

Magnesium key data

Symbol Mg
Atomic number 12
Atomic mass (standard atomic weight) 24.305
Molar mass 24.305 g/mol
Protons 12
Neutrons (most abundant isotope, magnesium-24) 12
Electrons (neutral atom) 12
Valence electrons 2
Category Alkaline earth metal
Period 3
Group 2
Block s-block
Noble gas notation [Ne] 3s2
Full electron configuration 1s2 2s2 2p6 3s2
Electrons per shell 2, 8, 2

Atomic mass: IUPAC CIAAW abridged standard atomic weights, 2024. Most abundant isotope: NIST Atomic Weights and Isotopic Compositions.

The values are facts and free to use; this page’s selection and presentation are © 2026 ScienceQuest.

Measured properties of magnesium

From PubChem, the US National Institutes of Health. Public domain. PubChem’s periodic table gives no value for the rows not shown.

Melting point 923 K (649.85 °C), 66th of 103 by melting point
Boiling point 1363 K (1089.9 °C), 67th of 93 by boiling point
Density 1.74 g/cm³, 80th of 96 by density
State at room temperature Solid
Electronegativity 1.31 (Pauling), 60th of 95 by electronegativity
Van der Waals radius 173 pm, 85th of 99 by atomic radius
First ionisation energy 7.646 eV (737.7 kJ/mol), 40th of 102 by first ionisation energy
Common oxidation states +2
Discovered 1808

Each rank counts down from the highest value, among the elements PubChem’s table gives one for, and links to that property ranked across the whole table. All of them are collected under periodic trends.

Magnesium electron configuration

The full electron configuration of magnesium is 1s2 2s2 2p6 3s2. With the noble-gas core collapsed it is [Ne] 3s2, and the outermost subshell is 3s2.

Bohr model of magnesium (Mg): a nucleus and three shells holding 2, 8 and 2 electrons from the inside out.
Bohr model of magnesium (Mg). Image © ScienceQuest, CC BY 4.0: free to reuse with credit to ScienceQuest and a link to this page, as the image licence explains.
Orbital box diagram of magnesium (Mg), 1s2 2s2 2p6 3s2: one box per orbital, filled by Hund’s rule, showing every orbital drawn holds a pair of electrons.
Orbital diagram of magnesium (Mg). Image © ScienceQuest, CC BY 4.0: free to reuse with credit to ScienceQuest and a link to this page, as the image licence explains.

Why group and block follow from this is set out in how the periodic table maps electron configuration, and the electron configuration of every element is listed on one page.

Mass of one magnesium atom

A molar mass is grams per mole, so dividing by the Avogadro constant gives the mass of a single atom, or for an element with more than one natural isotope the average mass of its atoms, and the reciprocal gives how many atoms sit in a gram.

Mass of one atom

  1. one atom = 24.305 / (6.02214076 × 10²³)
  2. = 4.0359 × 10⁻²³ g

Atoms in one gram

  1. atoms per gram = 6.02214076 × 10²³ / 24.305
  2. = 2.4777 × 10²² atoms

Magnesium on the periodic table

Magnesium is in period 3, group 2, in the s-block.

The other elements of group 2 are beryllium, calcium, strontium, barium and radium.

The rest of period 3

Work with magnesium