We already know that vitamin D is important for mental health, particularly when it comes to depression. Often dubbed the “sunshine vitamin,” the body can make it in response to being in the sun, in a reaction driven by cholesterol.

But new research suggests that vitamin D supplements can additionally help reduce negative emotions. In a recent meta-analysis, vitamin D supplementation was found to be especially helpful for people who have had a diagnosis of major depressive disorder or who were vitamin D deficient. And while this meta-analysis showed only a small effect on anxiety, recent clinical trials have shown benefits of vitamin D for anxiety, depression, inflammation, and overall mood.

Why does it have such an effect on mood? In part, vitamin D supports neuron connections in the brain, particularly in regard to both mood and memory. When there isn’t enough vitamin D, these connections are less stable—sort of like trying to do a job while balancing on scaffolding that isn’t entirely secure.

So how do you know whether you are getting enough? And what do you do if you aren’t?

Factors at play in vitamin D deficiency

There are many factors that can contribute to lower levels of vitamin D stores. Some of them include:

  • Skin color (the more melanin you have, the longer it takes for your body to make vitamin D in response to the sun)
  • Genetics (some people ineffectively make or store vitamin D because of specific genes)
  • Pregnancy and postpartum (your vitamin D stores are given to your baby in the third trimester and via breast milk after birth)
  • Other health conditions (people with chronic disorders often have lower levels of vitamin D)

Even sunscreen can contribute to lower vitamin D levels by blocking the hormone reaction that produces it in the body in response to sunlight (though, on its own, it is unlikely to cause a deficiency).

Optimal levels of vitamin D

When it comes to vitamin D, more is not always better. Vitamin D is fat-soluble, so taking too much in supplement form can lead to a build-up in the body that results in toxicity. The body knows to turn off the production of vitamin D in response to the sun since that is a hormone reaction. But it can’t simply excrete extra supplements.

The meta-analysis found that the benefits of vitamin D were noted after at least eight weeks of supplementation with 4,000 international units (IU) per day. For some, 4,000 IU per day could be too much, and for others it may be insufficient. Working with your healthcare provider is important.

Before you start supplementing with more than 2,000 IU of vitamin D, you should get a blood test, known as Vitamin D 25-hydroxy. The reference ranges, according to Mayo Clinic, are:

  • <10 ng/mL (nanograms/milliliter) is a severe deficiency
  • Between 10 and 19 ng/mL is mild or moderate deficiency
  • 20 to 50 ng/mL is considered by many to be optimal
  • 51 to 80 ng/mL is an increased risk for vitamin D toxicity
  • 80+ ng/mL is in the danger zone, although >150 ng/mL is closer to toxicity

High levels of vitamin D can be detrimental to kidney health, among other things, so it’s important to keep your levels in a safe zone, monitored by your doctor. While Mayo Clinic considers 20 to 50 to be optimal, my doctor wants my levels closer to 65 or 70 based on my autoimmune and chronic conditions. Your optimal vitamin D level should be established based on your personal health and genetic factors. Don’t self-diagnose or supplement in high doses unless you’re medically advised to do so.

As a nutritionist, I believe diet is more essential than supplements. In the case of vitamin D, however, it’s difficult to correct a deficiency through diet alone; there are few food sources that increase vitamin D levels. Fortunately, there are many good vitamin D supplement brands (I personally take this one). And there is also mounting evidence that supplements can help our minds and our mental health.