Magnesium

Element 12 · Alkaline earth metal

Specimen

Atomic number
12
Atomic mass
24.305
State at room temperature
Solid
Melting point
649.9 °C
Boiling point
1,090 °C
Density
1.74 g/cm³
Discovered
1808

Atomic mass from IUPAC.1 Other physical data from PubChem.2

Can I eat it?

In food and water
Your body needs it. More than 300 enzyme reactions in the body need magnesium. The EFSA upper limit applies only to magnesium salts in supplements, water or added to foods. It does not apply to magnesium that is naturally in food. 34

See every element.

The atom

Mg
ShellElectrons
1 (K) 2
2 (L) 8
3 (M) outermost 2
Total12

Configuration [Ne] 3s²

3s ↑ ↓
A shell diagram: each ring is an electron shell and each dot is one electron. The nucleus holds 12 protons. The outermost shell is shown in red. Electrons do not travel on rings: they fill orbitals, regions where an electron is likely to be found. The boxes are those orbitals for the electrons outside the Ne core, with one arrow per electron.

Related elements

New elements by e-mail

Sources

  1. 1

    IUPAC Commission on Isotopic Abundances and Atomic Weights (CIAAW), 2024. Abridged Standard Atomic Weights 2024 .

    The atomic mass shown for the 84 elements that have a standard atomic weight.

  2. 2

    National Center for Biotechnology Information (PubChem), 2026. Periodic Table of Elements .

    Electron configuration, melting and boiling points, density and discovery year for all 118 elements.

  3. 3

    European Food Safety Authority (EFSA), 2017. Dietary Reference Values for nutrients. Summary report (amended 2019) .

    Summaries of the EFSA NDA Panel opinions on each vitamin and mineral, section 4 (minerals) and section 5 (cobalamin).

    • Magnesium is a cofactor of more than 300 enzymatic reactions
  4. 4

    European Food Safety Authority (EFSA), 2025. Overview on Tolerable Upper Intake Levels as derived by the SCF and the EFSA NDA Panel (version 11) , Table 1 footnotes.

    • Readily dissociable Mg salts (e.g. chloride, sulphate, aspartate, lactate) and compounds like MgO in food supplements, water or added to foods; does not include Mg naturally present in foods and beverages.
  5. 5

    National Institute of Standards and Technology (NIST), 2026. Atomic Weights and Isotopic Compositions for All Elements .

    Isotopic composition of each element; the most abundant isotope sets the neutron count in the nucleus view.