Almost one in four Australian adults have vitamin D levels in the deficient range. In fact, about 23% of adults had serum 25-hydroxyvitamin D levels below 50 nmol/L, the commonly used cut-off for deficiency, so it is worth paying attention to. New research now suggests that another nutrient may influence how well your body regulates vitamin D levels: magnesium.
The study looked at how magnesium affects vitamin D and came up with some interesting findings. One was that magnesium helped increase levels of certain gut bacteria that boost vitamin D production in people with a specific genotype called TRPM7. The research also built on earlier work showing that magnesium appears to influence vitamin D levels in unusual ways, strengthening the evidence that these two nutrients work closely together in the body.
For the trial, researchers split nearly 240 people into two groups. One group was given a magnesium supplement tailored to their usual diet, while the other took a placebo. The average magnesium dose was about 200 milligrams a day.
The researchers found that magnesium, which is important for vitamin D metabolism in the body, did not simply push vitamin D levels higher across the board. Instead, it lowered vitamin D in people whose levels were already high and increased them in people whose levels were low.
If you already take vitamin D, it is understandable to wonder whether adding a magnesium supplement is the best way to support vitamin D status. Here is what experts say to keep in mind.
What does magnesium do?
Magnesium is a mineral that occurs naturally in many foods. It acts as a cofactor–meaning it is needed to trigger reactions–in more than 300 enzyme systems in the body. Magnesium plays a role in protein synthesis, blood sugar management and blood pressure regulation, energy production, bone development and more, the NIH notes. In short, it is involved in a lot of essential processes.
Recommended daily intake (RDI) varies by age and sex, but adult men are generally advised to aim for 400 to 420 milligrams a day, while adult women are advised to aim for 310 to 400 milligrams a day.
What does vitamin D do?
Vitamin D is a fat-soluble vitamin that is naturally present in some foods and added to others. Your body can also make vitamin D when ultraviolet (UV) rays from the sun hit your skin and trigger vitamin D synthesis. Vitamin D supports mental health, calcium absorption and immune function, among other roles.
Most adult women and men are advised to aim for 15 micrograms, or 600 IU, of vitamin D a day.
Why might magnesium regulate vitamin D?
There are likely a few things happening. One is that magnesium is required for the body to absorb vitamin D, says nutritionist Scott Keatley.
“Magnesium is required for the enzymes that convert vitamin D into its active and circulating forms, so low magnesium can impair that process,” he explains. “Correcting a deficiency may help raise vitamin D levels in people who are low by improving activation and transport.”
Lead study author Dr Qi Dai, says his work suggests that magnesium regulates the body’s circulating vitamin D levels by influencing vitamin D synthesis (how the body creates vitamin D from sunlight) and the enzymes involved in its metabolism. It also appears to adjust vitamin D levels in the gut through specific gut microorganisms, he says, and that effect depends on proper functioning of TRPM7.
“Simply put, magnesium helps your body use vitamin D efficiently, both in the gut and throughout the body,” says registered dietitian and nutritionist Keri Gans.
Gans stresses that being low in vitamin D is not just about one nutrient. “Magnesium, along with diet and lifestyle, may be important,” she says. “Nutrients work together, so taking a balanced approach is essential.”
Should you take a magnesium supplement if you’re low in vitamin D?
Not necessarily. “If someone is low in vitamin D, supplementation with vitamin D remains the primary intervention,” Keatley says. It is also a good idea to get sensible sun exposure and eat foods that are rich in vitamin D, Dr Dai adds.
At the same time, “it is important to consider consuming foods rich in magnesium or magnesium supplementation, as magnesium can both increase vitamin D levels when it is low and reduce the levels when it is too high,” Dr Dai says.
Magnesium is “widely available in a lot of different foods, but they tend to be foods many people do not eat enough of in a typical modern diet,” says nutritionist Jessica Cording. “In that case, I have seen a supplement be helpful,” she says.
Making sure you get enough magnesium in your diet may help your body respond more effectively to vitamin D, especially if you are not getting enough of it from the sun or from food, Keatley says.
But dietitians stress that you should not start a magnesium supplement without checking in with a healthcare provider. “Just because it is a supplement does not mean it is without risk,” Cording says.
Magnesium has potential drug interactions with certain medications, including oral bisphosphonates, some antibiotics like doxycycline or ciprofloxacin, diuretics and proton pump inhibitors. It is important to talk to a healthcare provider if you are interested in a magnesium supplement.
Other ways to get magnesium in your diet
Keatley recommends starting with food. That means focusing on magnesium-rich options such as:
- Pumpkin seeds, about 156 mg per 30 g serve
- Almonds, about 80 mg per 30 g serve
- Spinach, 78 mg per ½ cup (cooked)
- Black beans, 60 mg per ½ cup (cooked)
- Salmon, 26 mg per 90 g serve
“These foods provide fibre and other nutrients beyond magnesium,” Keatley says.
If you are concerned that you may be low in vitamin D or magnesium, experts stress the importance of talking to a healthcare provider. They can order blood tests to check your nutrient status and make recommendations from there, Cording says.
“If intake is low or there are risk factors for deficiency, a supplement can be considered with clinician guidance,” Keatley says. For magnesium, “forms like magnesium glycinate or citrate are typically better absorbed and tolerated,” he adds.
Dietary supplements are products intended to add to the diet. They are not medicines and are not designed to treat, diagnose, mitigate, prevent or cure diseases. Be cautious about taking dietary supplements if you are pregnant or breastfeeding. Only give supplements to a child if a healthcare provider recommends it.



