guide
    magnesium
    vitamin-d

    Magnesium With Vitamin D: Take Them Together?

    Yes, and magnesium may help your body use the vitamin D you take. Here is what the trials show, when to take each and who should check first.

    Remedy Routes Research TeamOctober 30, 202612 min read

    The short answer

    Yes, you can take magnesium and vitamin D together. The enzymes that activate vitamin D appear to depend on magnesium1, 2. In a 12-week trial of 95 adults with overweight or obesity, the group given magnesium glycinate plus vitamin D had the largest rise in 25-hydroxyvitamin D [25(OH)D], and the authors say the combination may work better than vitamin D alone3.

    Neither nutrient asks you to space it from the other. Stay under each upper limit: 350 mg a day of supplemental magnesium and 100 mcg (4,000 IU) of vitamin D for adults4, 1.

    Do magnesium and vitamin D work together?

    They do, and the link runs through the liver and kidneys. Vitamin D from sun, food or pills is inactive until it is hydroxylated twice: the liver makes 25(OH)D, and the kidney makes the active hormone, 1,25-dihydroxyvitamin D1. A review of the biochemistry concludes that all the enzymes that metabolize vitamin D appear to need magnesium as a cofactor2. The NIH magnesium fact sheet adds that magnesium also affects levels of parathyroid hormone and active vitamin D, two main regulators of bone4.

    Human data on this are mostly from people who are short of magnesium:

    • Magnesium-deficient patients, 1985: 16 of 23 patients with low calcium and low magnesium had low active vitamin D (under 30 pg/mL). After 5 to 13 days of magnesium by injection, only 5 returned to the normal range5.
    • Healthy volunteers, 1991: a 3-week low-magnesium diet in 26 people dropped serum magnesium from 0.80 to 0.61 mmol/L and active vitamin D from 55 to 43 pmol/L6.
    • US national survey, 2013: higher total magnesium intake went with a lower risk of vitamin D deficiency and insufficiency, and the two intakes interacted. This is an association, and the authors called it preliminary7.

    Chronic kidney disease shows why this matters. Metabolism of both nutrients is altered, and a 2023 review argues that low magnesium may be an overlooked reason their vitamin D stays low8.

    Does taking magnesium raise your vitamin D level?

    Sometimes. The trials are small, short and mixed, so treat the effect as uncertain.

    Trials that raised 25(OH)D

    • Magnesium plus vitamin D, 95 adults with overweight or obesity: 360 mg magnesium glycinate with 1,000 IU vitamin D3, each taken 3 times a day for 12 weeks, raised 25(OH)D by 6.3 ng/mL, the largest gain of the three arms. There was no significant change in parathyroid hormone or inflammation markers3.
    • Same program, bone and glucose markers: in the 78 people who finished, 25(OH)D was higher than on placebo, yet bone turnover markers, glucose, insulin and insulin resistance did not differ9. Our study summary covers the details.
    • Magnesium alone, 52 postmenopausal women: 500 mg a day for 8 weeks raised vitamin D levels versus placebo. Over 80% were vitamin D deficient at the start10.
    • Meta-analysis, 9 trials and 509 people: magnesium with vitamin D raised 25(OH)D (mean difference 13.37, 95% CI 0.45 to 26.29). The review pooled magnesium with vitamin D or vitamin E trials in people with overweight or obesity, and the wide interval shows how imprecise the result is11.

    Trials and studies that found less

    In a randomized trial of 180 adults aged 40 to 85, magnesium raised 25(OH)D3 when the starting level was near 30 ng/mL, and lowered it when the starting level was higher, about 30 to 50 ng/mL. The authors concluded that optimal magnesium status may be important for optimizing 25(OH)D12. Our study summary has the full design.

    A German cohort of 2,286 adults, a third of them with 25(OH)D under 12 ng/mL, found only a non-significant difference in vitamin D between low and adequate magnesium groups after adjustment. The authors concluded the relation was weak13. A smaller cross-sectional study of 57 adults found that vitamin D tracked with lower parathyroid hormone only in people with the highest magnesium intake14.

    So there is no case for taking extra magnesium just to lift a vitamin D number. If your magnesium intake is low, the combination makes sense. See magnesium for magnesium deficiency and vitamin D for vitamin D deficiency for the evidence on each.

    What is the best time to take magnesium and vitamin D?

    Take them at the same time if that helps you remember, with a meal. No trial we found tested morning against night for this pair, and the absorption data point to the meal, not the clock.

    Vitamin D: take it with food

    • Fat raises absorption: in 50 older adults given one 50,000 IU dose, peak vitamin D3 in blood was 32% higher (95% CI 11% to 52%) after a meal with fat than after a fat-free meal15.
    • At least 15 g of fat: in 64 healthy adults, 25(OH)D rose more after 2 weeks when the meal held 15 g or 30 g of fat than with no fat16.
    • Not every blood level follows: in 62 older adults, 25(OH)D at 30 and 90 days did not differ between meal types, even though the low-fat meal gave higher short-term absorption17.
    • Largest meal: in a small, uncontrolled study of 17 patients who had not responded to vitamin D, taking it with the largest meal lifted 25(OH)D from 30.5 to 47.2 ng/mL over 2 to 3 months18.

    The evidence is mixed. Taking vitamin D with a meal probably helps absorption, but the best amount of fat is unproven. Our guide on when to take vitamins covers the wider schedule.

    Magnesium: timing is your choice

    None of the trials above tested a particular time for magnesium, so pick the time that suits why you take it. If you take it for sleep, our guide to when to take magnesium covers timing in detail.

    That also answers whether you can take vitamin D and magnesium at night: yes, with a snack or dinner that contains fat. The trials gave no reason to separate the two.

    How much of each is safe?

    Adults should keep supplemental magnesium at or under 350 mg a day, and vitamin D at or under 100 mcg (4,000 IU) a day, unless a clinician sets a different dose4, 1. The magnesium limit counts only supplements and medicines, not food, and it is the same in pregnancy4. For children it ranges from 65 to 350 mg depending on age, and none is set for infants4. The vitamin D limit is lower for young children: 63 mcg (2,500 IU) at ages 1 to 3 and 75 mcg (3,000 IU) at ages 4 to 81.

    • Magnesium side effects: high doses from supplements often cause diarrhea, nausea and abdominal cramping. The forms most often reported are carbonate, chloride, gluconate and oxide4.
    • Vitamin D side effects: toxicity is almost always from supplements. It raises blood calcium, with nausea, vomiting, muscle weakness and kidney stones as possible results1.
    • Vitamin D need: the daily recommendation is 15 mcg (600 IU) for most adults and 20 mcg (800 IU) over age 701.

    The magnesium trial dose may exceed the limit: 360 mg of magnesium glycinate three times a day is 1,080 mg of the compound a day3. The abstract does not say whether that is elemental magnesium, and the upper limit refers to elemental magnesium, so do not copy a trial dose without asking a clinician. Compare forms in our guides to magnesium glycinate vs citrate and magnesium oxide vs glycinate.

    Who should be careful with magnesium and vitamin D?

    Check with a clinician or pharmacist first if you have kidney disease, take prescription medicines, or plan a high vitamin D dose.

    • Kidney disease: the kidneys clear excess magnesium, so the risk of magnesium toxicity rises with impaired kidney function4. The same organs make active vitamin D, and their metabolism of both nutrients is altered in chronic kidney disease8. See chronic kidney disease and our kidney health hub.
    • Bisphosphonates for osteoporosis: magnesium can reduce their absorption. Take magnesium at least 2 hours before or after oral bisphosphonates4.
    • Tetracycline and quinolone antibiotics: take the antibiotic at least 2 hours before, or 4 to 6 hours after, a magnesium supplement4.
    • Diuretics and acid reducers: loop and thiazide diuretics and long-term proton pump inhibitors can lower magnesium4. Potassium-sparing diuretics reduce magnesium loss4.
    • Thiazide diuretics and vitamin D: together they may cause high blood calcium, especially in older adults and people with kidney problems or hyperparathyroidism1.
    • Orlistat and steroids: orlistat can reduce vitamin D absorption, and corticosteroids can impair vitamin D metabolism1.
    • Statins: high vitamin D intakes, especially from supplements, might reduce the potency of atorvastatin, lovastatin and simvastatin. Ask your prescriber1.
    • Warfarin and other anticoagulants: vitamin K can interact seriously with them, and people taking them need consistent vitamin K intake from food and supplements. Check before adding any vitamin K product19.

    Can you take calcium, zinc or vitamin K with them too?

    Often yes, with a few details. Our calcium and magnesium guide covers that pair, and zinc, magnesium and calcium covers all three. For vitamin D with its partner vitamin, see our guide to vitamin D plus vitamin K supplements and the vitamin K page.

    • Calcium with vitamin D: NIH notes that taking calcium and vitamin D supplements together may raise the risk of certain adverse effects1. Keep each at its own upper limit.
    • Zinc: very high zinc supplement doses of 142 mg a day interfered with magnesium absorption in one study4.
    • Vitamin K: if you take warfarin or another anticoagulant, check with your prescriber before adding vitamin K2 or K119.
    • Multi-nutrient products: a combined supplement is fine if each ingredient's total stays under its upper limit. Add up the doses from every product you take.

    The calcium page has dosing and safety for that mineral. Our list of what not to take with magnesium covers other pairings.

    What are the signs your body needs magnesium or vitamin D?

    The signs overlap with many other problems, so a blood test and a clinician matter more than a symptom list.

    • Early low magnesium: loss of appetite, nausea, vomiting, fatigue and weakness. As it worsens, numbness, tingling, muscle contractions and cramps, seizures, personality changes and abnormal heart rhythms can occur4.
    • Low vitamin D: in adults it can show up as osteomalacia, a softening of bone. In children it causes rickets. Levels below 30 nmol/L (12 ng/mL) are associated with deficiency1.

    Severe magnesium deficiency can also cause low blood calcium4. Food is the first fix for magnesium: see magnesium-rich foods and vitamin D foods. Among drinks, soymilk has 61 mg of magnesium per cup and milk has 27 mg, and mineral water ranges from 1 mg to over 120 mg per liter by brand4. Bone effects are covered on our bone health page.

    A simple way to take both

    Use these rules, then adjust with your clinician.

    1. Check your labels. Find the elemental magnesium and the vitamin D in each product, and add them up.
    2. Take vitamin D with a meal, ideally your largest, which the small uncontrolled study used.
    3. Take magnesium at the same meal or at another time that suits you. The trials gave no reason to separate the two.
    4. Separate it from certain drugs. Leave 2 hours around bisphosphonates, and use the 2 hours before or 4 to 6 hours after rule for tetracycline and quinolone antibiotics4.
    5. Ask when to retest if you take vitamin D for a documented deficiency. The trials above measured blood levels after 8 to 12 weeks3, 10.

    Supplements in this guide

    Frequently Asked Questions

    Can you take vitamin D and magnesium together?
    Yes. Neither NIH fact sheet lists the other as an interacting supplement, and a trial of 95 adults gave both together for 12 weeks. Keep each within its upper limit of 350 mg supplemental magnesium and 100 mcg (4,000 IU) vitamin D for adults.
    Is it better to take magnesium in the morning or night?
    None of the trials above tested a particular time for magnesium, so choose the time that suits your reason for taking it. Vitamin D and magnesium can be taken at night together, with a snack or dinner that contains fat, since vitamin D absorption was 32% higher after a meal with fat in one trial.
    Can I take magnesium glycinate and vitamin D3 together?
    Yes. The 12-week trial of 95 adults gave 360 mg of magnesium glycinate with 1,000 IU of vitamin D3, each three times a day, and the combined group had the largest rise in 25(OH)D. The abstract does not give the elemental magnesium, so check your label and stay at or under 350 mg a day unless a clinician advises otherwise.
    Do you need to take magnesium with vitamin D?
    Not always. Magnesium appears to be needed to activate vitamin D, and trials gave mixed results on whether extra magnesium raises 25(OH)D. A trial of 180 adults found that magnesium raised it when the starting level was near 30 ng/mL and lowered it when higher.
    What are the side effects of taking magnesium?
    High doses from supplements often cause diarrhea, nausea and abdominal cramping, most often with carbonate, chloride, gluconate and oxide forms. The adult upper limit for supplemental magnesium is 350 mg a day.
    Can you take calcium and magnesium together?
    Neither NIH fact sheet lists an interaction between calcium and magnesium, but calcium with vitamin D supplements may raise the risk of certain adverse effects, so keep each within its upper limit. Our calcium and magnesium guide covers that pair.
    What hurts when your magnesium is low?
    Early signs are loss of appetite, nausea, vomiting, fatigue and weakness. As magnesium deficiency worsens, numbness, tingling, muscle contractions and cramps can occur.
    What drink is high in magnesium?
    Soymilk has 61 mg of magnesium per cup and milk has 27 mg. Mineral water ranges from 1 mg to over 120 mg per liter, depending on the source and brand.

    How we researched this

    We searched PubMed and the NIH Office of Dietary Supplements fact sheets on 2026-10-30 for trials, reviews and cohorts on magnesium and vitamin D, and for studies of vitamin D absorption with meals. We read the abstracts of 16 papers and the full NIH fact sheets for magnesium and vitamin D, and cited all of them. Most of the trials were short, enrolled people with overweight or obesity, and gave magnesium doses that may exceed the upper limit, so they cannot tell us the best dose or timing for healthy adults. No trial we found compared morning with night dosing of the pair.

    References

    1. National Institutes of Health, Office of Dietary Supplements. Vitamin D: Fact Sheet for Health Professionals. https://ods.od.nih.gov/factsheets/VitaminD-HealthProfessional/
    2. Uwitonze AM, et al. Role of Magnesium in Vitamin D Activation and Function. J Am Osteopath Assoc. 2018;118(3):181-189. doi:10.7556/jaoa.2018.037
    3. Cheung MM, et al. The effect of combined magnesium and vitamin D supplementation on vitamin D status, systemic inflammation, and blood pressure: A randomized double-blinded controlled trial. Nutrition. 2022;99-100:111674. doi:10.1016/j.nut.2022.111674
    4. National Institutes of Health, Office of Dietary Supplements. Magnesium: Fact Sheet for Health Professionals. https://ods.od.nih.gov/factsheets/Magnesium-HealthProfessional/
    5. Rude RK, et al. Low serum concentrations of 1,25-dihydroxyvitamin D in human magnesium deficiency. J Clin Endocrinol Metab. 1985;61(5):933-40. doi:10.1210/jcem-61-5-933
    6. Fatemi S, et al. Effect of experimental human magnesium depletion on parathyroid hormone secretion and 1,25-dihydroxyvitamin D metabolism. J Clin Endocrinol Metab. 1991;73(5):1067-72. doi:10.1210/jcem-73-5-1067
    7. Deng X, et al. Magnesium, vitamin D status and mortality: results from US National Health and Nutrition Examination Survey (NHANES) 2001 to 2006 and NHANES III. BMC Med. 2013;11:187. doi:10.1186/1741-7015-11-187 Our study summary.
    8. Matias P, et al. Hypomagnesemia: a potential underlooked cause of persistent vitamin D deficiency in chronic kidney disease. Clin Kidney J. 2023;16(11):1776-1785. doi:10.1093/ckj/sfad123
    9. Dall RD, et al. Combined vitamin D and magnesium supplementation does not influence markers of bone turnover or glycemic control: A randomized controlled clinical trial. Nutr Res. 2023;110:33-43. doi:10.1016/j.nutres.2022.12.005 Our study summary.
    10. Vázquez-Lorente H, et al. Response of Vitamin D after Magnesium Intervention in a Postmenopausal Population from the Province of Granada, Spain. Nutrients. 2020;12(8). doi:10.3390/nu12082283
    11. Deng K, et al. The effects of magnesium and vitamin D/E co-supplementation on inflammation markers and lipid metabolism of obese/overweight population: a systematic review and meta-analysis. Front Nutr. 2025;12:1563604. doi:10.3389/fnut.2025.1563604
    12. Dai Q, et al. Magnesium status and supplementation influence vitamin D status and metabolism: results from a randomized trial. Am J Clin Nutr. 2018;108(6):1249-1258. doi:10.1093/ajcn/nqy274 Our study summary.
    13. Zittermann A, et al. Association between magnesium and vitamin D status in adults with high prevalence of vitamin D deficiency and insufficiency. Eur J Nutr. 2024;64(1):48. doi:10.1007/s00394-024-03559-9
    14. Cheung MM, et al. Low dietary magnesium intake alters vitamin D-parathyroid hormone relationship in adults who are overweight or obese. Nutr Res. 2019;69:82-93. doi:10.1016/j.nutres.2019.08.003
    15. Dawson-Hughes B, et al. Dietary fat increases vitamin D-3 absorption. J Acad Nutr Diet. 2015;115(2):225-230. doi:10.1016/j.jand.2014.09.014
    16. Raimundo FV, et al. Effect of fat on serum 25-hydroxyvitamin D levels after a single oral dose of vitamin D in young healthy adults: a double-blind randomized placebo-controlled study. Eur J Nutr. 2015;54(3):391-6. doi:10.1007/s00394-014-0718-8
    17. Dawson-Hughes B, et al. Meal conditions affect the absorption of supplemental vitamin D3 but not the plasma 25-hydroxyvitamin D response to supplementation. J Bone Miner Res. 2013;28(8):1778-83. doi:10.1002/jbmr.1896
    18. Mulligan GB, et al. Taking vitamin D with the largest meal improves absorption and results in higher serum levels of 25-hydroxyvitamin D. J Bone Miner Res. 2010;25(4):928-30. doi:10.1002/jbmr.67
    19. National Institutes of Health, Office of Dietary Supplements. Vitamin K: Fact Sheet for Health Professionals. https://ods.od.nih.gov/factsheets/VitaminK-HealthProfessional/

    Continue Reading

    All articles