Should You Take Magnesium and Vitamin D Together?

  • TikTokers say that people should take both vitamin D and magnesium supplements to see optimal health benefits, but experts say that's not true.
  • Magnesium and vitamin D deficiencies are common in the U.S., but not everyone needs to take both supplements.
  • If someone's concerned that they have low magnesium or vitamin D levels, they can add certain foods to their diet or seek out a blood test from their doctor.
woman standing by window taking pills

Valentina Barreto/Stocksy


Taking magnesium and vitamin D supplements together has become a buzzy trend online in recent weeks, but people don't always need to take both supplements to see health benefits, experts said.


On TikTok, users are extolling the benefits of magnesium supplements in particular, claiming they can help with a variety of health issues, including anxiety and trouble sleeping. The caveat, these creators say, is that vitamin D has to be taken in tandem with magnesium supplements if people want to see results.


It’s true that getting enough magnesium is essential for your health and wellbeing. But while people who are deficient in both vitamin D and magnesium may benefit from taking two supplements, it's not necessary to take one simply because you're taking the other, said Pieter Cohen, MD, an associate professor of medicine at Harvard Medical School.


“There might be some specific medical problems where you need both, but it’s really because both of those deficiencies were diagnosed,” he told Health.


In other words, people don’t have to start taking vitamin D just because their doctor recommended magnesium supplements. And as is the case in any dietary supplementation, taking these pills unnecessarily could be risky.


“It’s important to keep in mind that while these supplements are sold over-the-counter and [accessible] without prescription,” Cohen said, “they can be just as active as any prescription medication.”


Here's what experts had to say about the link between vitamin D and magnesium, who might benefit from taking one or both of the supplements, and how to raise vitamin D and magnesium levels safely.


Essential Nutrients for the Body

TikTokers' claims on taking vitamin D and magnesium supplements are substantial—in a video viewed 15.5 million times, one user said he "[doesn't] have anxiety anymore" after taking both supplements.


But research to confirm this link between vitamin D, magnesium, and anxiety is still in its infancy.


The body needs both magnesium—an electrically-charged mineral, or electrolyte—and vitamin D to function properly, Marie van der Merwe, PhD, coordinator of the applied physiology and nutrition doctoral program at the University of Memphis, told Health.


Vitamin D helps muscles and nerves function, supports the immune system, and protects bone health. Magnesium is similarly necessary: It helps control blood sugar and blood pressure and helps support heart, muscle, and nerve function.


This may make magnesium helpful for treating anxiety symptoms, but it's not clear yet. A 2020 review found that existing studies on the topic have produced conflicting evidence, and future research is needed to explore how magnesium could help with anxiety symptoms.


Vitamin D Levels May Be Linked to Psoriasis Severity, New Research Shows

Deficiencies Are Common, But Not Everyone Needs Both Supplements

It's understandable that people online may be feeling better after taking magnesium and vitamin D supplements given just how common deficiencies in both are.


Some estimates put the percentage of the global population who are vitamin D-deficient above 40%, while about 75% Americans aren't getting as much magnesium in their diets as is recommended.


Because of this, vitamin D and magnesium supplements are "popular," and are often recommended to patients, Perri Halperin, MS, RD, CDN, clinical nutrition coordinator at Mount Sinai Health System, told Health.


Unfortunately, figuring out whether a person is deficient can sometimes be difficult.


There are a few warning signs—mild vitamin D deficiency may cause muscle pain and weakness, Halperin added, while magnesium deficiency can cause nausea, fatigue, and loss of appetite. However, these symptoms are vague, she said, which means that deficiencies can only be diagnosed by a healthcare provider.


If someone is diagnosed with either a vitamin D or magnesium deficiency, they'll likely need to start taking a supplement. However, Halperin said there's no evidence to back up the claim that magnesium supplements won't work unless a person is also taking vitamin D supplements, as TikTokers have suggested.


"There's no conclusive research there," she explained.


That being said, the opposite is true—the body does need magnesium to process vitamin D.


“For vitamin D to be functional, you need magnesium,” van der Merwe said. This could be because the enzymes that metabolize vitamin D may rely on magnesium.


However, that doesn't mean that everyone who needs vitamin D supplements also needs magnesium supplements.


People can get magnesium from their diets, and if they aren’t also deficient in magnesium, there’s no reason to take the supplement, said Halperin.


“The practical application of this is: If your healthcare provider suspects you’re low on vitamin D, get your magnesium checked too,” she explained. That way, your doctor can assess exactly how much of each you may need.


Before You Buy Magnesium Supplements From TikTok, Here’s What You Need to Know

Increasing Magnesium and Vitamin D Levels Safely

If a person thinks they're deficient in either of these nutrients, their doctor can conduct a blood test and recommend how much, if any, magnesium or vitamin D they should get via supplements.


Many Americans are falling short of daily nutrient recommendations, but as is the case with all medications, people shouldn’t take supplements without good reason to do so.


“Many healthy people living in America think they need extra vitamin D and magnesium [when] they probably don’t need it,” Cohen said.


And taking medications unnecessarily can, in some situations, become dangerous. Though it's rare, taking too much vitamin D can become toxic for the body, causing vomiting, abdominal pain, confusion, or dehydration. And taking too much vitamin D can actually cause a depletion of magnesium.


Taking to much magnesium doesn't usually pose a serious health risk because the body can eliminate extra magnesium via urination, Cohen said. However, a person may experience diarrhea, abdominal cramping, or nausea.


Supplements may not be right for everyone, but if someone is concerned that they may not be getting enough vitamin D and magnesium, diet is a great place to start.


It's recommended that adults ages 19 to 70 get 600 international units (IU) of vitamin D in their diet each day. For magnesium, adult men need 400 to 420 milligrams (mg) daily, while adult women need 310 to 320 mg.


Magnesium is added to some fortified foods, such as breakfast cereals, and it is also found in:


  • Nuts
  • Seeds
  • Whole grains
  • Legumes
  • Green, leafy vegetables (such as spinach)
  • Milk and some milk products
  • Yogurt

Most of the U.S. milk supply is fortified with vitamin D, and it’s also added to many breakfast cereals. Vitamin D is also found in:


  • Fatty fish (such as salmon, trout, and tuna)
  • Fish liver oils and beef liver
  • Egg yolk
  • Cheese

For reference, one cup of milk contains 24 to 27 mg of magnesium and 120 IU of vitamin D.


Getting enough magnesium and vitamin D is crucial for maintaining health and wellbeing, but it's important to always follow the advice of a doctor to ensure that you're hitting those recommended levels in the safest way possible.


“When it comes to supplementation, it’s just really important to do it under the supervision of a healthcare provider,” Halperin said. “Just because it’s ‘natural’ doesn’t mean it’s not powerful.”


8 Benefits of Vitamin D—and How to Get More in Your Diet