How vitamin D and magnesium work together?

Cooked and cut eggs with cut tomatoes, cooked, and cut broccoli on the plate. They are all covered with white sauce.

Vitamin D deficiency is one of the most prevalent nutritional deficiency in the world.

Magnesium deficiency is too, one of the most prevalent nutrients that people suffer deficiency from.

You could be told to increase magnesium consumption if you want to get healthy or improve cognitive capabilities, heart health, immune system functions, and so on…

If you checked any blog about nutrition, you could see vitamin D snooty articles.

But when you are focusing on one of those compounds only – you still can miss the point. Vitamin D is essential for your health, like magnesium, but the latter is either necessary for vitamin D to be metabolized and activated.


  • Vitamin D and magnesium metabolism are interconnected,
  • Magnesium deficiency decreases vitamin D absorption from the gut and vice versa,
  • Magnesium is essential for vitamin D activation and transport through the body,
  • You should focus on each of these nutrients if you are deficient for any of them,
  • Vitamin D supplements might not work at all if you are magnesium deficient.

Vitamin D metabolism is interconnected with magnesium

If you’ve read my last article you know how vitamin D (VD) is important in autoimmune Hashimoto’s Thyroiditis and that you literally can’t treat disease without it. It is necessary for the immune system tolerance and decrease of inflammatory processes.

The last one is the base of chronic diseases. 

As it is with all other nutrients VD is interconnected with other nutrients and one of them is magnesium (Mg). The adequate balance between the two of them is essential for maintaining the functions of various organs and the immune system of the human body.

Magnesium activates hundreds of enzymes in the human body and one of them is those that metabolize vitamin D.

It is correct what you might think that vitamin D is synthesized in your skin under sunlight exposure. But it is an inactive form. A molecule called 7-dehydrocholesterol absorbs ultraviolet B radiation (290-315 nm) that breaks down the chemical bond between 9 and 10 carbon atoms that produce pre-vitamin D3. This one is highly unstable and under heat easily undergoes rearrangement to stable cholecalciferol which one we call finally vitamin D3 or just vitamin D. That is the one you are taking up with supplements.

At this point, VD is inactive and needs additional hydroxyl groups which are added in the liver and then in the kidney. In the liver, cholecalciferol is hydroxylated to calcidiol 25(OH)D. The serum concentration of this one is used as a diagnostic marker for your vitamin D status in the body. 

But again, at this point, calcidiol is still an inactive form and needs the second hydroxylation in the kidney to become a biologically active vitamin D molecule which is called calcitriol 1,25(OH)2D. If needed, VD is hydroxylated by another enzyme to an inactive metabolite that is then excreted from the body.

Both proteins that hydroxylases VD to active vitamin D3 need magnesium for their function. This mineral is either necessary for the transport of inactive vitamin D throughout the body as it is a component of vitamin D binding protein.

Vitamin D metabolism depends on magnesium because proteins that metabolize and activate vitamin D doesn't work without magnesium. Thus deficiency of magnesium blocks vitamin D function. Vitamin D and magnesium can be taken together. Mushrooms, fatty fish, and sun exposure are sources of vitamin D. Without magnesium your vitamin D serum concentration is decreased.

Magnesium dependent Vitamin D metabolism.

Are you Magnesium deficient?

The question you may ask yourself is if you are magnesium deficient?

The answer is probably yes if you:

  • Have an autoimmune disease, diabetes, cardiovascular disease,
  • are obese, elderly,
  • struggling with alcohol dependence or chronic stress.

Actually, magnesium is the fourth most abundant mineral in the body after calcium, potassium, and sodium. It is also one of the most often undernourished nutritional compounds worldwide. It is the same with vitamin D. Though magnesium intake can be easily increased from the diet, vitamin D deficiency often needs pharmaceutical support.

If you have a chronic disease, stressful work, relationship, you can’t manage stress or your sleeping habits aren’t good – you are probably lacking magnesium. Unfortunately, serum Mg level doesn’t reflect total body magnesium status. You may test it but be aware that the normal level of serum Mg doesn’t rule out Mg deficiency. It is even probable if you are chronically deficient.

Life-long poor diet, sweets, fast-food, lack of vegetables and fruits, and highly-processed food might make you have a chronic latent magnesium deficiency. That means that your serum Mg level is normal simultaneously with severely reduced tissue and bone Mg concentration.

Magnesium deficiency blocks vitamin D functions

It is not surprising then that Mg deficiency blocks vitamin D vital functions. If there is an inadequate concentration of magnesium, proteins that depend on it can’t do their function.

In a point of VD, the inactive form of it can’t become activated in the liver and kidney to calcitriol. Or even be transported from the gut and from the skin to those organs by vitamin D binding protein because it needs magnesium for that either.

This is why, for example in a study on rickets patients – a skeletal disorder caused by severe vitamin D deficiency, calcium, and phosphate – vitamin D treatment didn’t work unless magnesium deficiency was treated concurrently. Magnesium is essential for bone mineralization because it participates in the synthesis of the active VD metabolites.

Lack of results of vitamin D status improvement or clinical improvement on autoimmune diseases could result from magnesium undernourishment.

Mg also increases VD absorption from the diet, besides its activation in the body. Moreover, studies have suggested, that magnesium influence the number of vitamin D receptor in the cells. That means that at the same serum concentration of VD in the blood, the one who has more vitamin D receptor could expect more efficient work of VD in the body.


Magnesium (Mg) and vitamin D (VD) are both nutrients that are often deficient worldwide. The deficiency of one nutrient disrupts the metabolism of another one what may have serious health consequences. Supplementation of VD for its deficiency treatment may not increase serum VD concentration at all while Mg deficiency. Mg nourishment alone increases VD blood level and its bioavailability by increasing the activity of proteins that metabolizes VD to its active form. Both nutrients improve their absorption from the gut.

Sources & References

Ihnatowicz P, Wątor P, Drywień EM. Supplementation in Autoimmune Thyroid Hashimoto’s Disease. Vitamin D and Selenium. Journal of Food and Nutrition Research. 2019, 7(8), 584-591. DOI: 10.12691/jfnr-7-8-6 SciEP

Uwitonze AM, Razzaque MS. Role of Magnesium in Vitamin D Activation and Function. J Am Osteopath Assoc. 2018;118(3):181–189. doi:10.7556/jaoa.2018.037 PubMed

Moncayo R, Moncayo H. The WOMED model of benign thyroid disease: Acquired magnesium deficiency due to physical and psychological stressors relates to dysfunction of oxidative phosphorylation. BBA Clin. 2014;3:44–64. Published 2014 Nov 12. doi:10.1016/j.bbacli.2014.11.002 PubMed

Wang K, Wei H, Zhang W, et al. Severely low serum magnesium is associated with increased risks of positive anti-thyroglobulin antibody and hypothyroidism: A cross-sectional study. Sci Rep. 2018;8(1):9904. Published 2018 Jul 2. doi:10.1038/s41598-018-28362-5 PubMed