13 min read
5.0
17

Vitamin D and magnesium: can you take them together, and does magnesium help vitamin D work?

Yes, you can take magnesium and vitamin D together. How the two nutrients work as a pair, what the research shows, safe amounts, timing and medicine interactions.

A snowy mountain glowing pink in the low winter sun
A guide to taking vitamin D and magnesium together. The NIH Office of Dietary Supplements fact sheets list no interaction between them. Vitamin D must be converted in the liver to 25(OH)D and in the kidneys to the active hormone; a 2018 review (Uwitonze and Razzaque) describes magnesium as a cofactor for these enzymes, and NIH notes magnesium affects parathyroid hormone and active vitamin D. In a 2018 double-blind randomized trial of 180 adults aged 40–85 (Dai et al., AJCN), magnesium raised 25(OH)D when it started near 30 ng/mL and lowered it when it started at 30–50 ng/mL, suggesting a regulating role. Vitamin D absorption depends on dietary fat, so take it with a meal containing fat. Adult RDAs: vitamin D 600 IU to age 70 and 800 IU after (upper limit 4,000 IU); magnesium 310–420 mg (supplemental upper limit 350 mg). Covers medicine interactions (bisphosphonates, tetracycline and quinolone antibiotics, diuretics, PPIs, orlistat, cholestyramine, steroids, phenobarbital, phenytoin), who is likely low in both, testing, K2 and calcium, mistakes, red flags and how to track a routine in Welltory.

Short answer

Yes, you can take magnesium and vitamin D together. The NIH fact sheets for both nutrients list no interaction that stops you taking them at the same time, and they're often combined in one product (1, 2).

They work as a pair in the body. Vitamin D has to be converted in the liver and kidneys before it's active, and the enzymes that do this appear to depend on magnesium (3). In a randomized trial of 180 adults, magnesium supplements raised vitamin D blood levels in people who started low and lowered them slightly in people who started high, which suggests magnesium helps regulate vitamin D rather than simply boosting it (4).

Safe amounts for adults: vitamin D 600 IU (15 mcg) a day up to age 70 and 800 IU (20 mcg) after, with an upper limit of 4,000 IU (100 mcg) (2); magnesium from supplements up to 350 mg a day (1). If you've been taking vitamin D for months and your level is still low, that's not your fault: absorption, other nutrients and medicines all play a part.

Note: this article is for general education and is not medical advice. Ask a doctor before combining supplements if you have kidney disease, high calcium levels, sarcoidosis or another condition affecting vitamin D, or take medicines such as antibiotics, osteoporosis drugs, diuretics, steroids or seizure medicines. Very high doses of vitamin D can raise calcium to dangerous levels. This guide is published by Welltory, which makes one of the apps mentioned.

Black Friday banner background
Black Friday banner background

Start understanding your body

Learn what affects your energy, stress, sleep, and daily state. Get the app.

Why vitamin D and magnesium are talked about together

Vitamin D from sunlight, food or a supplement isn't active when it enters your body. It goes through two steps:

  1. In the liver, it's converted to 25-hydroxyvitamin D, often written 25(OH)D. This is the form measured in a standard vitamin D blood test.

  2. In the kidneys (and some other tissues), 25(OH)D is converted to the active hormone, 1,25-dihydroxyvitamin D.

A 2018 review in the Journal of the American Osteopathic Association describes magnesium as a cofactor for these steps and states that all of the enzymes that metabolize vitamin D seem to require magnesium (3). The NIH Office of Dietary Supplements also notes that magnesium affects the levels of parathyroid hormone and the active form of vitamin D, both key regulators of bone health (1).

That's the basis for the popular claim that "vitamin D doesn't work without magnesium." The more accurate version: your body needs enough magnesium to handle vitamin D normally. If your magnesium intake is already adequate, extra magnesium isn't known to make vitamin D work "better."

Black Friday banner background
Black Friday banner background

Discounts for blog readers: up to 36% off

See what affects your energy, stress, sleep, and daily state with Welltory

Does magnesium help vitamin D absorption?

Strictly, absorption happens in the gut, and for vitamin D it depends mainly on fat. Vitamin D is fat-soluble, and its absorption depends on the gut's ability to absorb dietary fat (2). Magnesium doesn't change that step.

What magnesium affects is what happens after absorption: how vitamin D is converted and regulated. The best direct test of this comes from a double-blind randomized trial published in the American Journal of Clinical Nutrition in 2018 (4):

  • Who: 180 adults aged 40 to 85, taking part in a larger trial.

  • What: magnesium supplements or placebo, with the dose tailored to how much magnesium each person already got from their diet.

  • Result: the effect depended on the starting vitamin D level. When people's 25(OH)D started around 30 ng/mL, magnesium raised it. When it started between about 30 and 50 ng/mL, magnesium lowered it.

  • The authors' conclusion: optimal magnesium status may be important for optimizing vitamin D status.

This is one trial in middle-aged and older adults, and it didn't test whether people felt different or had better bone health. It does suggest magnesium acts more like a regulator than a booster.

Can you take magnesium and vitamin D together?

Yes. Neither NIH fact sheet lists the other nutrient as an interaction to avoid (1, 2). Taking them at the same time can make a routine easier to keep.

What to watch for instead:

  • The total amount of each, including what's in your multivitamin, a calcium-and-vitamin D tablet, or a magnesium-containing antacid or laxative.

  • Your medicines. Both nutrients have medicine interactions, listed below.

  • Your kidneys and calcium level. Both nutrients are handled by the kidneys, and too much vitamin D raises blood calcium (1, 2).

If you take several supplements, our guide to vitamins not to take together covers the combinations that do clash.

How much vitamin D and magnesium is safe?

NutrientDaily amount for adults (RDA)Upper limit for adults
Vitamin D600 IU (15 mcg) ages 19–70; 800 IU (20 mcg) over 704,000 IU (100 mcg) from all sources
MagnesiumMen 400–420 mg; women 310–320 mg (from food and supplements)350 mg from supplements and medicines (food not included)

Based on the NIH Office of Dietary Supplements fact sheets (1, 2). Checked November 2026.

Some combination products sold as "vitamin D3 and magnesium" contain vitamin D doses well above the RDA. Read the Supplement Facts label and add up all your sources. Doctors sometimes prescribe higher vitamin D doses to correct a deficiency for a limited time; that's a medical decision with follow-up testing, not something to copy from a label.

What "too much" looks like.

  • Vitamin D: excess can raise blood calcium, which can lead to calcification of blood vessels and tissues. Symptoms are non-specific: loss of appetite, weight loss, passing a lot of urine, and heart rhythm problems (2).

  • Magnesium: high supplement doses often cause diarrhea, nausea and abdominal cramping. The risk of toxicity is higher with poor kidney function (1).

Best time to take vitamin D and magnesium

There's no proven best hour for this pair. What does matter:

  1. Take vitamin D with a meal that contains some fat, since its absorption depends on dietary fat (2). For many people that's lunch or dinner rather than a black coffee breakfast.

  2. Magnesium can go at the same meal if it suits your stomach and your medicine schedule.

  3. Keep magnesium away from certain medicines: at least 2 hours apart from oral bisphosphonates, and tetracycline or quinolone antibiotics should be taken 2 hours before or 4 to 6 hours after magnesium (1).

  4. Pick one time and keep it. For vitamin D especially, the blood level reflects weeks of intake, not a single dose, so consistency matters more than the clock.

A simple default many people find easy: both with dinner, unless you take an interacting medicine then.

Medicines that interact with vitamin D or magnesium

MedicineInteracts withWhat happens
Oral bisphosphonates (osteoporosis)MagnesiumMagnesium can reduce absorption; separate by at least 2 hours
Tetracycline and quinolone antibioticsMagnesiumTake the antibiotic 2 hours before or 4–6 hours after magnesium
Loop and thiazide diureticsMagnesiumCan increase magnesium loss in urine
Proton pump inhibitors, long-termMagnesiumCan lower blood magnesium, typically after more than a year
Orlistat, cholestyramineVitamin DReduce absorption of vitamin D and other fat-soluble vitamins
Corticosteroids (such as prednisone)Vitamin DCan reduce calcium absorption and impair vitamin D metabolism
Phenobarbital, phenytoinVitamin DSpeed up breakdown of vitamin D to inactive forms

Based on 1 and 2. Checked November 2026.

If you take any of these, show your supplement list to your pharmacist. It usually takes them a minute to spot a clash.

Who is more likely to be low in both

Some situations affect both nutrients at once, which is one reason people end up taking them together:

  • Gut conditions that affect fat absorption, which lowers vitamin D absorption (2).

  • Heavy alcohol use. The NIH magnesium fact sheet lists vitamin D deficiency among the factors linked with low magnesium in chronic alcohol use (1).

  • Long-term medicines such as PPIs, diuretics, steroids or some seizure medicines (see the table above).

  • Limited sun and a limited diet, such as spending most time indoors and eating few vegetables, nuts, seeds or whole grains.

  • Older age, which is why the vitamin D RDA rises to 800 IU after 70 (2).

Fatigue, low mood, aches and cramps are often blamed on low vitamin D or magnesium, but they have many causes. Our guide to what vitamin deficiency causes explains which symptoms really point to which nutrient.

Should you get tested first?

For vitamin D, a blood test for 25(OH)D is the standard way to know your level. Our guide to the vitamin D test explains what the results mean and when it's worth doing.

For magnesium, a blood test is less straightforward because most of your body's magnesium is inside cells and bones rather than in blood. A normal result doesn't always rule out low intake. That's one reason doctors often look at diet, symptoms and medicines alongside the test. Our article should I take magnesium? goes through when it makes sense.

Testing first is especially useful if you're considering vitamin D above the RDA, have kidney disease, or take medicines from the table above.

What about vitamin K2, calcium and the "trio"?

Many products sell vitamin D, magnesium and vitamin K2 together, and some add calcium. The sources we checked for this article don't give a recommendation for adding K2 to vitamin D and magnesium, so we can't tell you it's needed. If a doctor has put you on calcium and vitamin D for bone health, ask whether magnesium or K2 fits your plan, and whether any of your medicines (especially blood thinners, which can interact with vitamin K) affect the choice.

What's clear from the NIH fact sheets: excess vitamin D raises calcium (2), so stacking a high-dose vitamin D product with extra calcium isn't something to do without medical advice.

Common mistakes with vitamin D and magnesium

  • Doubling up without noticing. Your multivitamin, calcium tablet and "D3 plus magnesium" product may all contain vitamin D.

  • Taking vitamin D on an empty stomach with no fat in the meal, when its absorption depends on dietary fat (2).

  • Taking magnesium with your antibiotic or osteoporosis medicine (1).

  • Assuming more magnesium means more vitamin D. In the 2018 trial, magnesium lowered vitamin D slightly in people who already had higher levels (4).

  • Never retesting. If you started vitamin D because of a low result, ask when to check again.

  • Ignoring loose stools. That's usually a sign the magnesium dose is too high for you (1).

How to set up the combination in five steps

  1. Write down why you're taking each one: a low vitamin D test, a doctor's advice, diet gaps.

  2. List every source of both nutrients, with amounts per serving.

  3. Check the totals against the upper limits: 4,000 IU of vitamin D and 350 mg of supplemental magnesium for adults (1, 2).

  4. Choose a meal with some fat, at a time that avoids your interacting medicines.

  5. Keep it steady and recheck vitamin D when your doctor suggests, rather than changing products every few weeks.

Living with vitamin D and magnesium: the questions people ask next

Should you take vitamin D and magnesium together every day?

If you need both, taking them together daily is a convenient routine. Stay within the upper limits and recheck vitamin D if you started because of a low result.

Is vitamin D3 with magnesium better than vitamin D3 alone?

There's no evidence that combined products work better than taking the two separately. What matters is that your magnesium intake from food and supplements is adequate (3).

Can low magnesium stop vitamin D from working?

Magnesium is needed for the enzymes that process vitamin D, so very low magnesium could, in theory, interfere (3). If your vitamin D stays low despite supplements, ask your doctor whether magnesium, absorption or medicines might be involved.

Can I take vitamin D and magnesium at night?

Yes, if that's when you eat a meal with some fat and it fits your medicines. Many people take magnesium in the evening anyway.

Do I need calcium too?

Not automatically. Calcium needs depend on your diet and bone health. Ask your doctor, especially if you're taking higher doses of vitamin D.

Before you blame yourself

If your vitamin D test came back low after months of supplements, or you've added magnesium and feel nothing, it's easy to think you've done something wrong. Before you blame yourself, look at the data you can see: are you taking vitamin D with a meal that contains fat? Is a medicine like a steroid or long-term acid reflux drug in the picture? Has your sleep, sun exposure or diet changed with the season? Pick one lever, such as moving both supplements to your main meal for a couple of weeks, keep everything else the same, and recheck with your doctor when they suggest.

When to see a doctor

  • Get urgent help for confusion, severe weakness, a very slow or irregular heartbeat, fainting, or severe vomiting or diarrhea after taking supplements. High vitamin D (via high calcium) and high magnesium can both affect the heart and muscles (1, 2).

  • See a doctor if you have kidney disease, a history of kidney stones or high calcium, or a condition such as sarcoidosis before taking vitamin D supplements.

  • Ask about testing if you take long-term PPIs, diuretics, steroids or seizure medicines, or have a gut condition that affects fat absorption (1, 2).

  • Book a visit if you're taking these supplements for ongoing tiredness, aches, cramps or low mood. Those symptoms deserve a proper look, not just another supplement.

How to bring this up with your doctor

What to ask for, by name. "Could you check my 25-hydroxyvitamin D level, and is it worth checking my magnesium and calcium too?"

What to bring. Photos of every supplement label, your medicine list with times, and your last vitamin D result if you have one.

What to say, out loud. "I take ___ IU of vitamin D and ___ mg of magnesium at ___. I started because ___. I'm also on ___."

If you're told not to worry about it. Ask: "Are any of my medicines affecting my vitamin D or magnesium, and when should I retest?"

How Welltory helps — and what it cannot do

The limits first. Welltory is a general wellness product, not a medical device. It does not measure vitamin D or magnesium, diagnose a deficiency or recommend doses. A blood test and your doctor do that.

What it can do is help you see how your days look while you try a change.

Tag what you change. On iOS with Apple Watch or Oura connected, when Welltory detects a stress or recovery episode and asks "What happened?", you can tap a suggested tag, type, or answer by voice, for example "vitamin D and magnesium with dinner" (My Patterns).

See your sleep over the same weeks. With an Apple Watch or Oura on iOS, or a compatible device through Health Connect on Android, Welltory shows your sleep data, so you can look at sleep alongside the routine you're testing (Sleep Analysis, Sleep Analysis on Android).

A morning reading without a watch. You can take a spot HRV and heart rate measurement with your phone camera at the same time each morning (camera measurements). See how to measure HRV without a wearable.

A record for your doctor. From the web app you can export your data as CSV and bring it alongside your lab results (export guide).

How we made it

We based this article on the NIH Office of Dietary Supplements fact sheets for magnesium and vitamin D, a 2018 review of magnesium's role in vitamin D activation, and a 2018 randomized trial of magnesium supplementation and vitamin D status. Search questions came from what people in the United States most often ask about vitamin D and magnesium. For the product section, we checked every function against the Welltory Help Center on November 11, 2026.

Made with AI tools, then edited and fact-checked by the Welltory team. See our Editorial & AI policy.

Jane Smorodnikova, co-founder of Welltory, built the methodology behind how we read physiological data.

Written by Tatsiana Yashyna.

This article is for educational purposes only and is not medical advice. Very high doses of vitamin D can raise calcium to dangerous levels. Confusion, severe weakness, a very slow or irregular heartbeat or fainting after taking supplements need urgent medical help. Ask a doctor before combining supplements if you have kidney disease or take interacting medicines. This guide is published by Welltory, which makes one of the apps mentioned. Welltory is a general wellness product: it helps you track and understand your data and does not diagnose or treat any condition. Sources were retrieved on November 11, 2026.

Was this helpful?

Ask AI for a summary of page

ChatGPTGeminiClaudePerplexityGrok

Written by Jane Smorodnikova

The founder and CEO of Welltory. A recognized tech leader with two Master's degrees and experience at MIT, she has scaled Welltory to over 17 million users.

Written by Tatsiana Yashyna

Deputy COO at Welltory. With a background in medicine and years of working with health data, she translates research and real physiological signals — sleep, stress, heart rate, and hormones — into clear, evidence-based explanations that help people understand what their bodies are telling them.

References

  1. NIH Office of Dietary Supplements — Magnesium: Fact Sheet for Health Professionals. https://ods.od.nih.gov/factsheets/Magnesium-HealthProfessional/
  2. NIH Office of Dietary Supplements — Vitamin D: Fact Sheet for Health Professionals. https://ods.od.nih.gov/factsheets/VitaminD-HealthProfessional/
  3. Uwitonze AM, Razzaque MS. Role of magnesium in vitamin D activation and function. Journal of the American Osteopathic Association 2018;118(3):181–189. https://doi.org/10.7556/jaoa.2018.037
  4. Dai Q, Zhu X, Manson JE, et al. Magnesium status and supplementation influence vitamin D status and metabolism: results from a randomized trial. American Journal of Clinical Nutrition 2018;108(6):1249–1258. https://doi.org/10.1093/ajcn/nqy274
  5. Welltory Help Center — My Patterns (iOS). https://help.welltory.com/en/articles/16012012-my-patterns-ios
  6. Welltory Help Center — Sleep Analysis. https://help.welltory.com/en/articles/9888090-sleep-analysis
  7. Welltory Help Center — Sleep Analysis (Android). https://help.welltory.com/en/articles/12164985-sleep-analysis-android
  8. Welltory Help Center — Taking measurements with your smartphone camera. https://help.welltory.com/en/articles/4412277-taking-measurements-with-your-smartphone-camera
  9. Welltory Help Center — How to export data from Welltory. https://help.welltory.com/en/articles/3368391-how-to-export-data-from-welltory

FAQ