Skip navigation

Official websites use .gov
A .gov website belongs to an official government organization in the United States.

Secure .gov websites use HTTPS
A lock ( ) or https:// means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.

URL of this page: //

Magnesium in diet

Magnesium is an essential mineral for human nutrition.


Magnesium is needed for more than 300 biochemical reactions in the body. It helps to maintain normal nerve and muscle function, supports a healthy immune system, keeps the heartbeat steady, and helps bones remain strong. It also helps adjust blood glucose levels. It aids in the production of energy and protein.

There is ongoing research into the role of magnesium in preventing and managing disorders such as high blood pressure, heart disease, and diabetes. However, taking magnesium supplements is not currently advised. Diets high in protein, calcium, or vitamin D will increase the need for magnesium.

Food Sources

Most dietary magnesium comes from dark green, leafy vegetables. Other foods that are good sources of magnesium are:

  • Fruits (such as bananas, dried apricots, and avocados)
  • Nuts (such as almonds and cashews)
  • Peas and beans (legumes), seeds
  • Soy products (such as soy flour and tofu)
  • Whole grains (such as brown rice and millet)
  • Milk

Side Effects

Side effects from high magnesium intake are not common, except in people with significantly reduced kidney function. The body generally removes extra amounts. Magnesium excess most often occurs when a person is:

  • Taking in too much of the mineral in supplement form
  • Taking laxatives that contain magnesium

Although you may not get enough magnesium from your diet, it is rare to be truly lacking in magnesium. The symptoms of such a shortage include:

  • Hyperexcitability
  • Muscle weakness
  • Sleepiness

Lack of magnesium can occur in people who abuse alcohol or in those who absorb less magnesium including:

Symptoms due to a lack of magnesium have three categories.

Early symptoms:

  • Loss of appetite
  • Nausea
  • Vomiting
  • Fatigue
  • Weakness

Moderate deficiency symptoms:

  • Numbness
  • Tingling
  • Muscle contractions and cramps
  • Seizures
  • Personality changes
  • Abnormal heart rhythms

Severe deficiency:

  • Low blood calcium level (hypocalcemia)
  • Low blood potassium level (hypokalemia)


Dosages for magnesium, as well as other nutrients, are provided in the Dietary Reference Intakes (DRIs) developed by the Food and Nutrition Board at the National Academies of Sciences, Engineering, and Medicine. DRI is a term for a set of reference intakes that are used to plan and assess the nutrient intakes of healthy people. These values, which vary by age and sex, include:

  • Recommended Dietary Allowance (RDA): The average daily level of intake that is enough to meet the nutrient needs of nearly all (97% to 98%) healthy people. An RDA is an intake level based on scientific research evidence.
  • Adequate Intake (AI): This level is established when there is not enough scientific research evidence to develop an RDA. It is set at a level that is thought to ensure enough nutrition.

Dietary Reference Intakes for magnesium:


  • Birth to 6 months: 30 milligrams per day (mg/day)*
  • 6 months to 1 year: 75 mg/day*

*AI or Adequate Intake


  • 1 to 3 years old: 80 mg/day
  • 4 to 8 years old: 130 mg/day
  • 9 to 13 years old: 240 mg/day
  • 14 to 18 years old (boys): 410 mg/day
  • 14 to 18 years old (girls): 360 mg/day


  • Adult males: 400 to 420 mg/day
  • Adult females: 310 to 320 mg/day
  • Pregnancy: 350 to 400 mg/day
  • Breastfeeding women: 310 to 360 mg/day

Alternative Names

Diet - magnesium


National Institutes of Health website. Magnesium: fact sheet for health professionals. Updated June 2, 2022. Accessed February 9, 2023.

Yu ASL. Disorders of magnesium and phosphorus. In: Goldman L, Schafer AI, eds. Goldman-Cecil Medicine. 26th ed. Philadelphia, PA: Elsevier; 2020:chap 111.

Review Date 1/19/2023

Updated by: Stefania Manetti, RD/N, CDCES, RYT200, My Vita Sana LLC - Nourish and heal through food, San Jose, CA. Review provided by VeriMed Healthcare Network. Also reviewed by David C. Dugdale, MD, Medical Director, Brenda Conaway, Editorial Director, and the A.D.A.M. Editorial team.

Related MedlinePlus Health Topics