Magnesium and Kidney Stones: What the Evidence Really Shows

A clear guide to magnesium and kidney stones — how it may lower risk, best food sources, daily targets, supplement types, safety notes, and practical meals.

Last updated: 2026

Magnesium and Kidney Stones: What the Evidence Really Shows

Magnesium does not get as much attention as calcium, oxalate, or sodium when it comes to kidney stone prevention — but it plays an important supporting role. Adequate magnesium may help reduce your risk of calcium-based kidney stones, especially calcium oxalate stones.

This guide explains how magnesium contributes to prevention, how much you need, where to get it from food, when supplements make sense, and how to fit it all into a balanced day.

Why Magnesium Matters

Magnesium is involved in hundreds of processes in the body. For kidney stone prevention specifically, it:

  • Binds with oxalate in the digestive tract, reducing how much reaches the kidneys
  • Helps keep urinary calcium and oxalate in a form that is less likely to crystallize
  • Supports overall citrate metabolism, particularly in magnesium citrate form
  • Plays a role in normal bone metabolism and calcium regulation

Chronically low magnesium intake has been associated with higher rates of calcium oxalate stones in several studies, though the effect is modest compared to hydration or sodium changes.

Daily Magnesium Targets

GroupRecommended Dietary Allowance
Men 19–30400 mg
Men 31+420 mg
Women 19–30310 mg
Women 31+320 mg
Pregnant women350–360 mg

Roughly half of adults in the U.S. fall short of these numbers day to day.

Best Food Sources of Magnesium

Seeds and Nuts

  • Pumpkin seeds — ~150 mg per ounce
  • Chia seeds — ~110 mg per ounce
  • Almonds — ~80 mg per ounce (higher oxalate; small portions)
  • Cashews — ~75 mg per ounce (higher oxalate; small portions)
  • Peanuts and peanut butter — ~50 mg per ounce
  • Sunflower seeds — ~35 mg per ounce

Whole Grains and Legumes

  • Cooked spinach — ~155 mg per cup (very high oxalate; small portions)
  • Cooked black beans — ~120 mg per cup
  • Cooked lentils — ~70 mg per cup
  • Cooked brown rice — ~85 mg per cup
  • Cooked oats — ~60 mg per cup
  • Whole wheat bread — ~25 mg per slice

Vegetables

  • Cooked Swiss chard — ~150 mg per cup (high oxalate; small portions)
  • Baked potato with skin — ~50 mg
  • Avocado — ~60 mg per medium
  • Broccoli — ~30 mg per cup
  • Green beans — ~25 mg per cup

Fish, Dairy, and Others

  • Salmon — ~30 mg per 4 oz
  • Halibut — ~90 mg per 4 oz
  • Mackerel — ~80 mg per 4 oz
  • Plain yogurt — ~40 mg per cup
  • Milk — ~25 mg per cup
  • Dark chocolate (70%+) — ~65 mg per ounce (high oxalate; small portions)

Low-Oxalate Magnesium Sources

Because several excellent magnesium foods (spinach, almonds, cashews, dark chocolate) are also high in oxalate, it helps to lean on lower-oxalate magnesium options:

  • Pumpkin seeds in moderate portions
  • Avocado
  • Plain yogurt
  • Milk
  • Salmon and other cold-water fish
  • White beans and lentils in reasonable portions
  • Bananas and oranges
  • Winter squash
  • Sunflower seeds
  • Cooked broccoli and green beans

Sample Magnesium-Rich, Lower-Oxalate Day

  • Breakfast: Plain yogurt with sliced banana and a small sprinkle of pumpkin seeds; whole-grain toast; coffee; large glass of water.
  • Mid-morning: Small handful of sunflower seeds; water.
  • Lunch: Grilled salmon salad with mixed greens, avocado, cucumber, tomato, and olive oil dressing; sparkling water.
  • Afternoon: Milk with a small piece of fruit; water.
  • Dinner: Baked halibut, brown rice, roasted broccoli, and green beans; lemon water.
  • Evening: Herbal tea; a light snack of yogurt.

Magnesium Supplements: When and How

Supplements can help fill nutritional gaps but should be used carefully. Common forms include:

FormNotes
Magnesium citrateWell absorbed; also raises urinary citrate — favored for stone prevention
Magnesium glycinateGentle on stomach; good for general use
Magnesium oxideCheap but poorly absorbed; often causes GI upset
Magnesium chlorideWell absorbed; used both orally and topically
Magnesium sulfateTypically medical use (IV or Epsom salts)

Typical stone-prevention doses run around 200–400 mg of elemental magnesium per day, ideally in divided doses with meals. Always discuss dosing with your provider.

Safety Notes

  • High doses can cause diarrhea, cramping, and dehydration
  • People with reduced kidney function should not supplement without medical guidance
  • Magnesium can interact with certain antibiotics, diuretics, and bisphosphonates
  • Do not exceed the tolerable upper intake level of 350 mg per day from supplements unless prescribed

Magnesium in a Broader Prevention Plan

Magnesium works best when combined with the rest of the stone-prevention essentials:

  • Plenty of fluids — see our hydration guide
  • Adequate dietary calcium — see our calcium guide
  • Lower sodium — see our sodium guide
  • Reasonable protein portions
  • Fruits and vegetables for potassium and citrate

Common Mistakes to Avoid

  • Chasing magnesium only through spinach and nuts, adding a heavy oxalate load
  • Taking high-dose magnesium supplements without checking with a provider
  • Assuming magnesium can replace hydration or calcium
  • Ignoring low magnesium in the setting of diarrhea, alcohol use, or certain medications
  • Overlooking magnesium-rich lower-oxalate foods like fish, avocado, and yogurt

References

  • NIH Office of Dietary Supplements — Magnesium Fact Sheet.
  • National Kidney Foundation — Nutrition and Kidney Stones.
  • National Institute of Diabetes and Digestive and Kidney Diseases (NIDDK / NIH) — Diet for Kidney Stone Prevention.
  • Mayo Clinic — Kidney Stones: Prevention.
  • American Urological Association — Medical Management of Kidney Stones Guideline.
  • Cleveland Clinic — Magnesium: Foods, Function, and Health Effects.

The Bottom Line

Magnesium is a quiet but useful piece of the kidney stone prevention picture. Getting enough from a variety of lower-oxalate foods — yogurt, fish, avocado, pumpkin seeds, beans, whole grains — supports the rest of your plan. Consider magnesium citrate supplements only with medical guidance and never as a replacement for hydration, adequate calcium, or lower sodium.

Frequently Asked Questions

Does magnesium prevent kidney stones?+
Magnesium can help reduce the risk of calcium oxalate stones in some people. It binds oxalate in the gut and helps keep urinary calcium and oxalate less likely to form crystals. It is not a magic solution but supports a broader prevention plan.
How much magnesium do I need daily?+
The recommended dietary allowance is 400–420 mg per day for adult men and 310–320 mg for adult women. Most Americans fall short of these targets.
Should I take a magnesium supplement for kidney stones?+
Food-based magnesium is preferred. Supplements can help fill gaps but should be used carefully — high doses can cause diarrhea. Always check with your provider, especially if you have kidney disease.
What are the best food sources of magnesium?+
Leafy greens, seeds (pumpkin, chia, sunflower), nuts (cashews, almonds), whole grains, beans, avocado, yogurt, and fish. Many magnesium-rich foods also contain oxalate, so portion size matters.
Are magnesium and calcium related for stone prevention?+
Yes. They work together. Adequate magnesium supports normal calcium metabolism and may help prevent excessive calcium excretion in the urine.
Which type of magnesium supplement is best?+
Magnesium citrate is commonly used for kidney stone prevention because it also raises urinary citrate. Magnesium oxide is less well absorbed. Magnesium glycinate is gentle on the stomach. Discuss options with your provider.
Can I get enough magnesium without eating a lot of high-oxalate foods?+
Yes. Choosing lower-oxalate magnesium sources like yogurt, fish, avocado, pumpkin seeds in reasonable portions, and beans lets you meet the target without a heavy oxalate load.
Kidney Stone Prevention Diet
Recommended App

Kidney Stone Prevention Diet

Practical dietary guidance to help reduce kidney stone risk — track oxalate, calcium, sodium, and hydration in real foods.

References & Authoritative Sources

The guidance in this article is informed by publications and clinical resources from the following reputable organizations. Consult them directly for the most current recommendations.

  1. National Institute of Diabetes and Digestive and Kidney Diseases (NIDDK). Kidney Stones — Definition, Causes, Symptoms & Treatment
  2. National Kidney Foundation. Kidney Stones: Types, Causes, and Prevention
  3. National Kidney Foundation. 6 Easy Ways to Prevent Kidney Stones
  4. American Urological Association. Medical Management of Kidney Stones: AUA Guideline
  5. Mayo Clinic. Kidney Stones — Symptoms and Causes
  6. Harvard T.H. Chan School of Public Health. The Nutrition Source — Calcium and Kidney Stones
  7. U.S. Department of Agriculture (USDA). FoodData Central — Nutrient Composition Database
  8. MedlinePlus (U.S. National Library of Medicine). Trusted Health Information for You

External links open in a new tab. SW Labs Group LLC is not affiliated with the organizations listed above and provides these references for informational purposes only.

Medical Disclaimer

This article is for educational and informational purposes only. It is not intended as medical advice, diagnosis, or treatment. Always consult your physician, registered dietitian, or other qualified healthcare provider with any questions you may have regarding a medical condition or dietary changes.

Previous Article
Potassium and Kidney Stones
Next Article
Citrate and Kidney Stones

Related Articles

More from this topic in our Learning Center.

Recommended Reading

Nutrition topics that pair well with this article.

Most Popular Articles

Reader favorites across the Learning Center.

Recently Updated

Fresh guides added or refreshed most recently.

Featured Apps

Kidney Stone Prevention Diet

Kidney Stone Prevention Diet

Practical dietary guidance to help reduce kidney stone risk — track oxalate, calcium, sodium, and hydration in real foods.

Low Sodium Bites

Low Sodium Bites

Find lower-sodium foods and make smarter meal choices with real, easy-to-use guidance.

Calcium From Foods

Calcium From Foods

See the calcium content of everyday foods and build better nutrition decisions with confidence.

Post GLP-1 Plan

Post GLP-1 Plan

A practical plan for life after GLP-1 medications — protein, habits, and long-term weight maintenance.