Magnesium and Vitamin D: Benefits, Dosage, and Why to Consider Taking Both

Because magnesium can help absorb vitamin D, some people take them together for anxiety

There’s been a lot of buzz on social media about taking magnesium and vitamin D supplements together for anxiety. Since magnesium helps your body process vitamin D, taking both supplements together can help enhance each other’s benefits.

Magnesium and vitamin D are both essential to keeping your body healthy. Both vitamin D and magnesium support physical and mental health, keeping your bones strong, and even fighting symptoms of anxiety and depression.

This article will touch on how to use magnesium and vitamin D for anxiety, neurological health, bone health, and more.

Dietary supplements might seem harmless, but it’s important to speak with your healthcare provider before taking them, especially if you have health conditions or are taking medications. Supplements can interact with your medications and impact your health in ways that you might not realize.

Woman holding pill box

The Good Brigade / Getty Images

Benefits of Magnesium

Magnesium is a mineral and an electrolyte that your body uses for chemical reactions. The benefits of magnesium are widespread, and include helping your nerves communicate, keeping muscles healthy, and controlling blood glucose.

Supplementing with magnesium can be helpful for a variety of health conditions, including:

Types of Magnesium

There are many types of magnesium used in dietary supplements that vary in their medical uses, absorption, bioavailability, and side effects:

Benefits of Vitamin D

Vitamin D helps support your immune system, build healthy bones, and keep your neurons functioning well, which can help with mood. In addition, getting enough vitamin D can help prevent serious diseases, including diabetes, cancer, high blood pressure and autoimmune disease.

When to Take Vitamin D

Vitamin D is a fat-soluble vitamin, which means the body processes them in a similar way that it processes fat. Because of that, it’s best to take vitamin D with a meal that contains some healthy fats.

How Magnesium and Vitamin D Work Together

Magnesium plays an important role in liver and kidney function, and it's essential for the absorption of vitamin D. The enzymes that are responsible for metabolizing vitamin D all seem to require magnesium. If your magnesium level is too low, your body cannot activate or process vitamin D. 

A deficiency in either nutrient is associated with anxiety and symptoms of depression. While taking these supplements together might maximize their benefits, you should consult your healthcare provider about what dosages are right for you.

Dosage

One viral TikTok video called for taking 500 milligrams (mg) of magnesium and 125 micrograms (mcg) of vitamin D. The dosage recommended in the video is higher than the recognized safe limits and could cause other health problems.

Magnesium Dosage 

According to federal data, no one should take more than 350 mg of magnesium supplements each day. Doing so can cause diarrhea and cramping. Taking very high doses—more than 5,000 mg—can cause kidney failure and even death.

Unfortunately, there’s little data on what dose of magnesium might be helpful for anxiety. In fact, the research around magnesium supplementation and anxiety is poor overall.

The magnesium supplements best absorbed in the gut are magnesium aspartate, magnesium citrate, magnesium lactate, and magnesium chloride.

Vitamin D Dosage

The upper limit for vitamin D intake from all sources (food and supplements) is 100 mcg per day for anyone ages 9 or older. If you take too much vitamin D, you can experience nausea, vomiting, confusion and kidney stones. Very high levels can cause kidney failure, irregular heartbeats and death.

Magnesium Deficiency

Magnesium deficiency occurs when you don’t have enough of the mineral in your body. It’s rare in otherwise healthy people, but older adults and people with these health conditions are at a higher risk of developing magnesium deficiency:

  • Gastrointestinal (GI) disease
  • Diabetes
  • Alcohol use disorder

The symptoms of magnesium deficiency include:

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

As your levels of magnesium continue to drop, you’ll experience more serious symptoms including:

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

Preventing Magnesium Deficiency

You can prevent magnesium deficiency by eating foods rich in magnesium, including nuts, seeds, spinach, dairy, and salmon.

Vitamin D Deficiency

Vitamin D deficiency can cause weak bones and other symptoms. About 1 in 4 Americans don’t get enough vitamin D. The people most at risk for vitamin D deficiency include:

  • Older adults
  • Breastfed infants
  • People who don’t get outside much
  • People with darker skin
  • People who have trouble absorbing fat, including those with gastrointestinal diseases
  • People with obesity, or those who have had gastric bypass surgery

Most people who have vitamin d deficiency don’t have symptoms. However, with severe deficiency you may notice symptoms including:

  • Bone pain
  • Bone fractures
  • Depression
  • Frequent falls
  • Trouble walking

Getting Adequate Vitamin D

Get enough vitamin D by eating foods rich in vitamin D, including fatty fish, eggs, and fortified milks, cereal and juices.

Risks to Be Aware Of

Taking supplements can impact your overall health and interact with other medications that you’re on. Magnesium can interact with:

  • Bisphosphonates, used to treat osteoporosis
  • Antibiotics
  • Diuretics  
  • Proton pump inhibitors (PPIs)

Vitamin D can interact with:

  • Weight loss drugs
  • Statins
  • Diuretics
  • Steroids

If you’re on any of these medications and are considering starting or changing your supplement routine, talk with your healthcare provider or pharmacist. 

Summary

Many people have found success taking magnesium and vitamin D for anxiety. Both vitamin D and magnesium can support mental health and physical health, but research on these nutrients and their effect on anxiety when taken together is limited. Science shows that having enough magnesium is helpful for processing vitamin D, but taking either of these supplements at high doses can cause problems, particularly if you’re on other medications or have underlying health concerns.

If you’re interested in trying magnesium and vitamin D supplements, speak with your healthcare provider first. 

5 Sources
Verywell Health uses only high-quality sources, including peer-reviewed studies, to support the facts within our articles. Read our editorial process to learn more about how we fact-check and keep our content accurate, reliable, and trustworthy.
  1. Uwitonze AM, Razzaque MS. Role of magnesium in vitamin d activation and function. J Am Osteopath Assoc. 2018. DOI: 10.7556/jaoa.2018.037

  2. National Institutes of Health: Office of Dietary Supplements. Magnesium: Fact sheet for health professionals.

  3. National Institutes of Health Office of Dietary Supplements. Magnesium.

  4. National Institutes of Health. Vitamin D : Consumer fact sheet.

  5. Boyle NB, Lawton C, Dye L. The effects of magnesium supplementation on subjective anxiety and stress—a systematic review. Nutrients. 2017. doi: 10.3390/nu9050429

Kelly Burch against a great background.

By Kelly Burch
Burch is a New Hampshire-based freelance health writer with a bachelor's degree in communications from Boston University.