Skip to main content

Should I take magnesium with vitamin D?

Medically reviewed by Kristianne Hannemann, PharmD. Last updated on Aug 13, 2025.

Official Answer by Drugs.com

Yes, taking magnesium with vitamin D is generally safe — and often beneficial — because magnesium helps your body activate and use vitamin D effectively. You can take them together at any time of day, including at night, ideally with food for better absorption.

Magnesium and vitamin D work in synergy. If your magnesium levels are low, your body may not get the full benefit from vitamin D, even if your blood levels look normal. Co-supplementation is especially useful for anyone deficient in one or both nutrients, or those with increased needs.

Why Magnesium and Vitamin D Work Well Together

Magnesium acts as a cofactor for enzymes involved in vitamin D metabolism—your body requires it to activate vitamin D. Taking vitamin D supplements can increase your body's demand for magnesium, which helps transport and activate vitamin D. Research suggests improved vitamin D levels with adequate magnesium.

This relationship is particularly important considering that approximately 50% of people worldwide have low vitamin D levels, and between 10% and 30% of the population are thought to have insufficient magnesium levels.

Benefits of Taking Them Together

For most people, taking vitamin D and magnesium together offers significant advantages over taking vitamin D alone:

Can You Take Them at Night?

Yes, magnesium and vitamin D can be taken together in the morning or at night. In fact, taking magnesium at night may have a calming effect and support sleep quality. Both nutrients are best absorbed when taken with food.

Who May Benefit Most

Those who are vitamin D deficient or have low magnesium levels may benefit most from taking these nutrients together. They may also be recommended for people with higher needs, such as older adults, those with digestive disorders, or those taking medications that affect mineral absorption. Individuals whose diets lack magnesium-rich foods (nuts, seeds, legumes, leafy greens) can also likely benefit.

Related questions

Dosage Guidelines

Vitamin D Guidelines

The Recommended Dietary Allowance (RDA) for vitamin D for adults 19 years and older is 600 IU (15 mcg) daily, and for adults over 70 years, it increases to 800 IU (20 mcg) daily. However, various studies suggest different dosages may be necessary depending on baseline levels and individual factors.

The upper limit for vitamin D intake from all sources is set at 100 mcg (4000 IU) per day for anyone ages 9 or older. Taking doses higher than this requires close medical supervision. Dosage needs can vary—check with a healthcare provider, especially if you have deficiencies or health conditions.

Magnesium Guidelines

For magnesium, the RDA for adults 19 years and older is 400-420 mg daily for men and 310-320 mg for women. During pregnancy, the requirement increases to 350-360 mg daily for women, and during lactation, it remains at 310-320 mg for women.

It's important to note that the tolerable upper intake level (UL) for magnesium from supplements only is 350 mg per day for those 9 years and older. This limit does not include magnesium from food sources.

Potential Risks and Side Effects

While both supplements are generally considered safe when taken within recommended limits, excessive intake can cause adverse effects:

Bottom Line

Taking magnesium with vitamin D is safe for most people and often provides better results than taking vitamin D alone. These nutrients are best absorbed with food and can be taken together in the morning or at night. Individual needs vary, so consult your healthcare provider for personalized dosing.

References
  1. Cheung, M. M., Dall, R. D., Shewokis, P. A., Altasan, A., Volpe, S. L., Amori, R., Singh, H., & Sukumar, D. (2022). 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 (Burbank, Los Angeles County, Calif.), 99-100, 111674. https://doi.org/10.1016/j.nut.2022.111674
  2. DiNicolantonio, J. J., et. al. 2018. Subclinical magnesium deficiency: a principal driver of cardiovascular disease and a public health crisis. Open Heart. DOI: https://doi.org/10.1136/openhrt-2017-000668
  3. Kaur, J., et al. Vitamin D Deficiency. [Updated 2025 Feb 15]. In: StatPearls [Internet]. Treasure Island (FL): StatPearls Publishing; 2025 Jan-. Accessed May 2, 2025 at https://www.ncbi.nlm.nih.gov/books/NBK532266/
  4. National Institutes of Health. 2021. Magnesium Fact Sheet for Consumers. Accessed May 2, 2025 at https://ods.od.nih.gov/factsheets/Magnesium-Consumer/
  5. National Institutes of Health. 2022. Magnesium Fact Sheet for Healthcare Professionals. Accessed May 2, 2025 at https://ods.od.nih.gov/factsheets/Magnesium-HealthProfessional/
  6. National Institutes of Health. 2022. Vitamin D Fact Sheet for Consumers. Accessed May 2, 2025 at https://ods.od.nih.gov/factsheets/VitaminD-Consumer/
  7. Oregon State University. Magnesium. Accessed May 2, 2025 at https://lpi.oregonstate.edu/mic/minerals/magnesium
  8. Reddy, P., et. al. Magnesium Supplementation in Vitamin D Deficiency. American Journal of Therapeutics 26(1):p e124-e132, January/February 2019. | DOI: https://doi.org/10.1097/MJT.0000000000000538
  9. Uwitonze, A. M., et. al. (2018). Role of Magnesium in Vitamin D Activation and Function. The Journal of the American Osteopathic Association, 118(3), 181–189. https://doi.org/10.7556/jaoa.2018.037
  10. Zittermann, A. Magnesium deficit - overlooked cause of low vitamin D status?. BMC Med 11, 229 (2013). https://doi.org/10.1186/1741-7015-11-229

Read next

Does taking vitamin D help with psoriasis?

Experts cannot say if oral vitamin D helps improve psoriasis symptoms, because overall, trial results have been mixed. While some open-label studies show a moderate to marked improvement (with some reports of remission), most double-blinded RCTs have shown only slight or no improvement. Supplementation could be considered on a case-by-case basis. Continue reading

How long does it take for vitamin D to work?

Generally, it takes a few weeks of taking daily vitamin D supplements for vitamin D levels in the body to rise. Each 1,000 IU of vitamin D3 daily is expected to raise blood levels of 25(OD)D by 10 ng/ml after a few weeks. But it may take months to resolve symptoms of severe vitamin D deficiency such as rickets in children. It depends on how low your vitamin D levels were in the first place and some individual factors. Obesity, polluted environments, and malabsorption syndromes (such as Crohn’s disease) are just some factors that can increase the time it takes for vitamin D levels to work. Continue reading

How can I raise my vitamin D levels quickly?

You can raise your vitamin D levels quickly in three main ways, but it can take up to a week for increased vitamin D intake or exposure to be reflected in a vitamin D blood test: increasing your intake of foods that are naturally rich in vitamin D or fortified with vitamin D, taking a vitamin D supplement, or getting outside and exposing your skin to sunlight (although experts do not recommend this without sun protection). Continue reading

See also:

Related medical questions

Drug information

Related support groups