All posts

25 Magnesium-Rich Foods: Complete Guide to Dietary Magnesium

A ranked list of 25 magnesium-rich foods with mg per serving. Covers why magnesium matters for sleep, muscle recovery, stress, and blood sugar, signs of deficiency, daily targets (310-420mg), food sources vs supplements, and a magnesium-rich meal plan.


The quick answer: The best magnesium-rich foods include pumpkin seeds (156mg per oz), dark chocolate (65mg per oz), spinach (157mg per cup cooked), almonds (80mg per oz), black beans (120mg per cup), and avocado (58mg per half). The daily target is 310-320mg for women and 400-420mg for men, but an estimated 50% of Americans fall short. Unlike many nutrients, magnesium deficiency is widespread, largely invisible, and linked to poor sleep, muscle cramps, anxiety, and impaired blood sugar control.

Disclaimer: Consult your healthcare provider before taking magnesium supplements, especially if you have kidney disease or take medications for blood pressure, heart conditions, or diabetes. Magnesium can interact with certain medications.

Why Magnesium Is the Most Underrated Mineral

Magnesium is involved in over 300 enzymatic reactions in the human body — more than any other mineral. Despite this, it rarely gets the attention that calcium, iron, or potassium receive. This is partly because magnesium deficiency is difficult to detect through standard blood tests (only 1% of body magnesium circulates in blood; the rest is in bones and cells) and partly because its symptoms are nonspecific and often attributed to other causes.

Energy production: Magnesium is required for ATP (adenosine triphosphate) production — the energy currency of every cell. Without adequate magnesium, your mitochondria cannot efficiently produce energy, leading to fatigue that no amount of sleep or caffeine can resolve.

Sleep quality: Magnesium activates the parasympathetic nervous system (the "rest and digest" mode) and regulates melatonin production. A 2012 randomized controlled trial in the Journal of Research in Medical Sciences found that magnesium supplementation improved subjective insomnia severity, sleep efficiency, sleep time, and serum melatonin levels in elderly participants.

Muscle function and recovery: Magnesium is essential for muscle relaxation (calcium triggers contraction; magnesium enables release). Low magnesium causes muscles to remain in a contracted state, producing cramps, spasms, and tightness. Athletes with adequate magnesium recover faster and experience fewer cramps.

Stress and anxiety: Magnesium modulates the hypothalamic-pituitary-adrenal (HPA) axis — the body's stress response system. Low magnesium is associated with increased cortisol and heightened stress responses. A 2017 systematic review in Nutrients found that magnesium supplementation had a beneficial effect on subjective anxiety in anxiety-vulnerable populations.

Blood sugar regulation: Magnesium is required for insulin receptor function. Higher magnesium intake is consistently associated with lower risk of type 2 diabetes. A meta-analysis in the Journal of Internal Medicine found that each 100mg/day increase in magnesium intake was associated with a 15% reduction in type 2 diabetes risk.

Heart health: Magnesium relaxes blood vessel walls (similar to potassium), supports a regular heart rhythm, and has been shown in meta-analyses to reduce blood pressure by 2-5 mmHg. Low magnesium is associated with increased risk of atrial fibrillation, the most common cardiac arrhythmia.

25 Magnesium-Rich Foods Ranked by mg Per Serving

RankFoodMagnesium (mg)Serving Size% Daily Value (420mg)Bonus Benefits
1Pumpkin seeds156mg1 oz37%Zinc, iron, protein; one of the most concentrated magnesium sources
2Spinach (cooked)157mg1 cup37%Iron, potassium, vitamin A, folate; cooking concentrates magnesium
3Swiss chard (cooked)150mg1 cup36%Potassium, iron, vitamin K; brilliant in sautees and soups
4Dark chocolate (70-85%)65mg1 oz15%Flavanols, iron; choose high-cacao content for maximum benefit
5Black beans (cooked)120mg1 cup29%Fiber (15g), protein, potassium, iron
6Almonds80mg1 oz (23 almonds)19%Vitamin E, calcium, protein, fiber
7Quinoa (cooked)118mg1 cup28%Complete protein, iron, fiber; a grain that doubles as a magnesium source
8Cashews74mg1 oz18%Zinc, copper, protein; lower magnesium than almonds but still significant
9Avocado58mg1/2 medium14%Potassium, healthy fats, fiber, vitamin K
10Edamame99mg1 cup24%Protein (17g), fiber, iron, potassium
11Brown rice (cooked)84mg1 cup20%Manganese, selenium, fiber; white rice has only 19mg per cup
12Salmon (wild)53mg5 oz13%Omega-3s, protein, vitamin D; a complete health food
13Peanuts63mg1 oz15%Protein, niacin, folate; peanut butter provides about 50mg per 2 tbsp
14Lentils (cooked)71mg1 cup17%Protein, iron, fiber, potassium, folate
15Tofu (firm)73mg1/2 cup17%Calcium (if calcium-set), protein, iron
16Banana32mg1 medium8%Potassium, vitamin B6; a modest but consistent contributor
17Oats (dry)56mg1/2 cup13%Beta-glucan fiber, B vitamins; eaten daily, a meaningful source
18Flaxseeds (ground)40mg2 tbsp10%ALA omega-3, lignans, fiber
19Kidney beans (cooked)74mg1 cup18%Protein, fiber, potassium, iron
20Chickpeas (cooked)79mg1 cup19%Protein, fiber, iron; hummus retains much of the magnesium
21Brazil nuts107mg1 oz25%Selenium (one of the richest sources), healthy fats
22Sunflower seeds37mg1 oz9%Vitamin E, selenium, copper
23Beet greens (cooked)98mg1 cup23%Potassium (1,309mg!), iron, vitamin A
24Figs (dried)51mg1/4 cup12%Calcium, potassium, fiber
25Potato (baked, with skin)48mg1 medium11%Potassium, vitamin C, vitamin B6; skin contains the most magnesium

Signs of Magnesium Deficiency

Magnesium deficiency (hypomagnesemia) is often called the "invisible deficiency" because it is widespread, its symptoms overlap with many other conditions, and standard blood tests miss it (serum magnesium reflects only 1% of body stores).

Early signs:

  • Muscle cramps and spasms (especially at night)
  • Difficulty falling asleep or staying asleep
  • Increased stress response and anxiety
  • Fatigue despite adequate sleep
  • Eye twitches
  • Headaches and migraines

Moderate deficiency:

  • Irregular heartbeat (palpitations)
  • Numbness and tingling in extremities
  • Poor blood sugar control
  • Worsening PMS symptoms
  • Increased blood pressure
  • Reduced exercise performance

Severe deficiency (rare, usually from medical conditions):

  • Seizures
  • Personality changes
  • Coronary artery spasms
  • Severe cardiac arrhythmias
  • Hypocalcemia and hypokalemia that do not respond to supplementation (because magnesium is required for calcium and potassium regulation)

Who is most at risk: People with type 2 diabetes (30-40% have low magnesium), older adults, people taking proton pump inhibitors (PPIs) or diuretics, heavy alcohol drinkers, athletes who sweat heavily, and people with gastrointestinal diseases (celiac, Crohn's, IBS).

Daily Magnesium Targets

GroupRDA
Women (19-30)310mg
Women (31+)320mg
Men (19-30)400mg
Men (31+)420mg
Pregnant women350-360mg
Breastfeeding women310-320mg

The gap: The average American consumes about 260-270mg per day — roughly 60-65% of the RDA. This means nearly half the population is chronically under-consuming magnesium.

Food Sources vs. Supplements

Why Food First

Magnesium from food comes packaged with other nutrients that enhance its function and absorption. For example, the potassium in spinach works synergistically with magnesium for blood pressure regulation, and the vitamin D from salmon supports magnesium-dependent bone metabolism.

Food-based magnesium is also absorbed gradually, avoiding the gastrointestinal side effects (diarrhea, cramping) common with high-dose supplements.

When Supplements Make Sense

If you cannot consistently reach your target through food, or if you have increased needs (diabetes, heavy exercise, medication-induced depletion), a supplement can fill the gap.

FormBioavailabilityBest ForNotes
Magnesium glycinateHighSleep, anxiety, general supplementationChelated; well-tolerated; least likely to cause GI distress
Magnesium citrateHighConstipation, general supplementationGood absorption; mild laxative effect at higher doses
Magnesium threonateModerate-HighCognitive function, brain healthCrosses the blood-brain barrier; most studied for brain effects
Magnesium oxideLow (4%)Budget option (not recommended)Cheap but poorly absorbed; common in low-quality supplements
Magnesium taurateHighHeart healthTaurine has additional cardiovascular benefits
Magnesium malateHighEnergy, muscle painMalic acid is involved in the Krebs cycle (energy production)

Dosing: 200-400mg of elemental magnesium per day from supplements is generally safe. Do not exceed 350mg from supplements (the UL applies to supplemental magnesium, not food sources). Take with food for better absorption and fewer side effects. Split doses if taking more than 200mg.

Magnesium-Rich Meal Plan (~1,800 Calories, 450mg+ Magnesium)

Breakfast

Oatmeal (1/2 cup dry) topped with 1 tbsp pumpkin seeds, 1/2 banana (sliced), 1 tbsp almond butter, and cinnamon. Side of 1/2 cup fortified soy milk.

Magnesium: ~140mg (oats 56mg + pumpkin seeds 39mg + banana 16mg + almond butter 25mg + soy milk 8mg)

Mid-Morning Snack

1 oz dark chocolate (70%+) and 1 oz cashews.

Magnesium: ~139mg (chocolate 65mg + cashews 74mg)

Lunch

Spinach and black bean bowl: 1.5 cups cooked spinach, 3/4 cup black beans, 1/2 cup brown rice, 1/4 avocado, salsa, lime juice.

Magnesium: ~290mg (spinach 157mg + black beans 90mg + brown rice 42mg + avocado 29mg)

Afternoon Snack

1/4 cup edamame and 1 tbsp ground flaxseed (added to water or smoothie).

Magnesium: ~45mg (edamame 25mg + flaxseed 20mg)

Dinner

Grilled salmon (5 oz) with quinoa (1/2 cup cooked) and roasted Brussels sprouts (1 cup), olive oil and lemon.

Magnesium: ~112mg (salmon 53mg + quinoa 59mg + Brussels sprouts ~30mg)

Daily Total: ~726mg magnesium (173% DV for men)

This plan demonstrates that reaching and exceeding the daily target is achievable through strategic food choices — no supplements needed.

Magnesium for Specific Health Goals

For Better Sleep

Focus on magnesium glycinate (supplement) or magnesium-rich foods at dinner and evening snack. A 2022 review in BMC Complementary Medicine and Therapies found that magnesium supplementation improved sleep quality across multiple randomized controlled trials. Pair with sleep-supporting habits: consistent sleep schedule, cool room temperature, and limited screen time before bed.

For Muscle Recovery

Athletes should aim for the higher end of the RDA (400-420mg or more for intense training). Post-workout meals should include magnesium-rich foods (banana with almond butter, quinoa bowl with spinach). Magnesium baths (Epsom salt) are popular, though evidence for transdermal magnesium absorption is limited.

For Stress and Anxiety

Magnesium helps regulate the stress response by modulating cortisol and supporting GABA (the calming neurotransmitter) activity. A 2020 study in PLOS ONE found that magnesium supplementation combined with vitamin B6 produced greater improvements in severe stress than magnesium alone. Consider a B-complex alongside magnesium-rich foods.

For Blood Sugar Control

Magnesium improves insulin sensitivity. A 2015 meta-analysis in the Journal of Clinical Pharmacy and Therapeutics found that magnesium supplementation significantly reduced fasting glucose in people with diabetes. Focus on food sources (beans, leafy greens, nuts, whole grains) that also provide fiber — doubling the blood sugar benefit.

Why Modern Diets Are Low in Magnesium

Several factors contribute to the widespread magnesium gap:

Soil depletion: Industrial farming has reduced the magnesium content of crops. Studies show that the magnesium content of vegetables has decreased by an estimated 20-30% over the past 50-70 years.

Processed food dominance: Refining grains removes up to 80% of their magnesium content. White flour has 22mg of magnesium per cup compared to 164mg in whole wheat flour.

Water filtration: Historically, drinking water was a significant magnesium source. Modern water treatment removes most minerals, including magnesium.

Increased stress and caffeine consumption: Both increase magnesium excretion through urine.

Medications: PPIs (omeprazole, pantoprazole), loop diuretics, and certain antibiotics deplete magnesium.

Making Magnesium-Rich Eating Sustainable

The "dark green, dark chocolate, nut" rule. If you eat a serving of dark leafy greens, a small amount of dark chocolate, and a serving of nuts or seeds every day, you will likely meet your magnesium needs without thinking about it.

Choose whole grains over refined. The difference is dramatic: brown rice has 84mg of magnesium per cup; white rice has 19mg. Whole wheat bread has 46mg per slice; white bread has 6mg. This single swap can add 50-100mg of daily magnesium.

Track your intake for one week. Most people are surprised to discover how little magnesium they consume. Using a meal planning tool like Mealift for even one week of tracking reveals your typical intake and highlights which meals need a magnesium boost.

Batch-prep magnesium-rich staples. Cook a batch of quinoa and black beans on Sunday. Portion almonds and pumpkin seeds into snack bags. Wash and prep spinach for the week. Having these foods ready eliminates the friction that prevents consistent intake.

Frequently Asked Questions

Can magnesium help with migraines?

Yes. The American Migraine Foundation recognizes magnesium as an evidence-based preventive treatment for migraines. A study in Cephalalgia found that 600mg of magnesium citrate daily reduced migraine frequency by 41.6% compared to 15.8% in the placebo group. Magnesium is thought to work by blocking cortical spreading depression (the wave of nerve activity associated with migraine aura) and by reducing inflammation. Many neurologists recommend trying magnesium before prescription preventive medications.

Is magnesium safe to take with other medications?

Magnesium can interact with several medications. It can reduce the absorption of bisphosphonates (osteoporosis drugs), certain antibiotics (tetracyclines, fluoroquinolones), and thyroid medication — take these at least 2 hours apart. Magnesium can also enhance the blood pressure-lowering effect of antihypertensives, potentially causing hypotension. If you take any regular medications, consult your pharmacist or doctor before starting magnesium supplementation.

How much magnesium is too much?

From food, there is no established upper limit — your kidneys efficiently excrete excess dietary magnesium. The upper limit of 350mg applies only to supplemental magnesium. Exceeding this can cause diarrhea (the first sign of too much), nausea, and abdominal cramping. Very high doses (over 5,000mg) can cause dangerous magnesium toxicity (hypermagnesemia) with symptoms including low blood pressure, difficulty breathing, and cardiac arrest — but this level is virtually impossible to reach from food alone.

Does magnesium really help with sleep?

The evidence is promising though not yet definitive. Multiple randomized controlled trials have shown improvements in subjective sleep quality (falling asleep faster, fewer awakenings, feeling more rested) with magnesium supplementation, particularly in older adults and those with insomnia. Magnesium glycinate is the preferred form for sleep due to its calming effect (glycine is an inhibitory neurotransmitter). Take it 30-60 minutes before bed for best results.

Can I test my magnesium levels?

Standard serum magnesium tests are available but have limited value — they only measure the 1% of magnesium in blood, missing the 99% stored in bones and cells. You can be deficient with "normal" serum levels. More accurate tests include red blood cell (RBC) magnesium (measures intracellular magnesium) and 24-hour urine magnesium. However, the most practical approach is to assess your dietary intake and symptoms — if you eat few magnesium-rich foods and have symptoms consistent with deficiency, increasing intake through food is a low-risk intervention.

Which form of magnesium is best?

It depends on your goal. Magnesium glycinate for sleep and anxiety (well-absorbed, calming, gentle on the stomach). Magnesium citrate for constipation and general supplementation (well-absorbed, mild laxative effect). Magnesium threonate for cognitive function (crosses the blood-brain barrier). Magnesium malate for energy and muscle recovery (malic acid supports energy production). Avoid magnesium oxide — it has only 4% bioavailability and is primarily useful as a laxative, not a nutritional supplement.

Does alcohol deplete magnesium?

Yes. Chronic alcohol consumption significantly depletes magnesium through multiple mechanisms: increased urinary excretion, reduced intestinal absorption, and increased metabolic demand. An estimated 30-60% of people with alcohol use disorder are magnesium-deficient. Even moderate alcohol consumption can contribute to lower magnesium levels over time. If you drink regularly, you should be especially intentional about magnesium-rich foods.

Can low magnesium cause anxiety?

There is growing evidence that low magnesium contributes to anxiety. Magnesium modulates the HPA axis (stress response), supports GABA receptor function (the calming neurotransmitter), and regulates the N-methyl-D-aspartate (NMDA) receptor, which, when overstimulated by low magnesium, can increase excitatory neural activity and anxiety. A 2017 systematic review concluded that magnesium supplementation may have a beneficial effect on anxiety, though more large-scale trials are needed. Given the low risk and broad benefits of adequate magnesium intake, ensuring sufficiency is a reasonable early intervention for anxiety.