The short answer: Low vitamin D and low B12 are both linked to depression in observational studies, but proof of cause is weak. The largest vitamin D prevention trial, VITAL-DEP, found no benefit after a median of 5.3 years. A true B12 deficiency can mimic depression (fatigue, poor concentration, mood change), so test for it if you are at risk. Correct a deficiency if you have one, but a supplement does not replace depression treatment.
Why do low vitamin D and depression show up together?
Observational studies keep finding a link. A 2013 meta-analysis in the British Journal of Psychiatry pooled 14 observational studies with 31,424 adults. People with depression had lower vitamin D levels than controls. In the three cohort studies, the lowest vitamin D group had a hazard ratio of 2.21 for depression compared with the highest group (95% CI 1.40 to 3.49).
That is an association, not proof of cause. Depression itself lowers vitamin D. People who are depressed spend more time indoors and move less, and sun exposure drives most vitamin D production. Obesity, chronic illness, and older age also lower vitamin D and raise depression risk at the same time. The NIH Office of Dietary Supplements (ODS) notes that vitamin D receptors exist in brain regions tied to depression, so the biological question stays open.
Does taking vitamin D prevent or treat depression?
The randomized trials say no, at least for prevention in adults who are not already deficient and depressed. The key study is VITAL-DEP, published in JAMA in 2020 by Okereke and colleagues. It randomized 18,353 adults aged 50 and older to 2,000 IU of vitamin D3 daily or placebo. The median treatment period was 5.3 years. Depression or clinically relevant depressive symptoms occurred at 12.9 per 1,000 person-years in the vitamin D group and 13.3 in the placebo group. The hazard ratio was 0.97 (95% CI 0.87 to 1.09). Mood scores on the PHQ-8 did not change either (mean difference 0.01 points).
Smaller treatment trials are mixed and lower quality. The NIH ODS cites a meta-analysis of nine trials with 4,923 adults with depressive symptoms that found no significant reduction. A 2024 meta-analysis of 11 trials with 21,561 older adults found a pooled effect that did not reach significance (SMD -0.10, p = 0.05) and called the evidence insufficient. Some newer meta-analyses report a modest benefit, mostly in people who already had depressive symptoms and low levels at baseline, but the trials vary widely in dose, duration, and quality. One gap matters: the ODS notes that no study has tested vitamin D in people treated for clinical depression who are also deficient. So taking extra vitamin D when your level is normal does not prevent depression.
Can a B12 deficiency look like depression?
Yes, and this is the more practical concern. The NIH ODS B12 fact sheet lists fatigue, pale skin, palpitations, weight loss, dementia, and numbness or tingling in the hands and feet as effects of deficiency. It also notes that some studies link B12 deficiency and low B12 intake to depression. MedlinePlus adds loss of balance, trouble concentrating, irritability, confusion, and in severe cases psychosis or hallucinations.
Compare that list to the physical symptoms of depression: low energy, slowed thinking, appetite change, and body aches. The overlap is large. Someone with an unrecognized B12 deficiency can be treated for depression and not improve. Two ODS details matter. The neurological symptoms can appear without anemia, so a normal blood count does not rule it out. And the body stores 1 to 5 mg of B12, so symptoms can take years to appear after absorption fails. If slowed thinking is your main complaint, our piece on depression and brain fog covers how to tell the causes apart.
Who is most likely to be low in B12?
Most people in the United States get enough B12 from food. Deficiency usually comes from poor absorption. The NIH ODS names these groups as most at risk:
- Older adults. Depending on the definition, 3% to 43% of community-dwelling older adults have low serum B12. Atrophic gastritis affects 8% to 9% of adults 65 and older and reduces the stomach acid and intrinsic factor needed to absorb B12.
- People with pernicious anemia. This autoimmune condition destroys the cells that make intrinsic factor. It accounts for about 15% to 25% of B12 deficiency in older adults.
- People on metformin. The first-line diabetes drug can reduce B12 absorption and lower serum levels.
- People on acid reducers. Proton pump inhibitors such as omeprazole (Prilosec) and lansoprazole (Prevacid), and H2 blockers such as cimetidine (Tagamet), slow the release of stomach acid and can impair B12 absorption from food.
- Vegans and vegetarians. B12 occurs naturally only in animal foods. Fortified cereals, fortified nutritional yeast, and supplements close the gap.
- People with gut disease or gut surgery. Crohn disease, celiac disease, and gastric bypass all reduce absorption.
If you have depressive symptoms and fit one of these groups, ask for a B12 test.
Does B12 supplementation improve mood?
Only in a narrow set of cases. A 2015 systematic review in International Psychogeriatrics analyzed 11 randomized trials of folate and B12 for depression. Short-term use did not improve symptoms in adults with major depression already on antidepressants (5 studies, SMD -0.12, 95% CI -0.45 to 0.22). Longer use showed a possible drop in relapse and new onset among people at risk, but those findings rest on one and two studies.
A 2021 meta-analysis in Nutrients looked specifically at people without overt B12 deficiency. Across 16 trials and 6,276 participants, B12 alone or with folate and B6 had no effect on depressive symptoms or on any domain of cognitive function.
If you are truly deficient, replacing B12 can reverse the fatigue, cognitive change, and mood symptoms the deficiency caused. If your level is normal, extra B12 does not treat depression. That is why testing comes before supplementing.
Which blood tests should you ask for?
Three tests cover the question for most people:
- 25-hydroxyvitamin D, or 25(OH)D. This is the standard vitamin D blood test. Per the NIH ODS, below 30 nmol/L (12 ng/mL) is deficient, 30 to under 50 nmol/L (12 to under 20 ng/mL) is inadequate, and 50 nmol/L (20 ng/mL) or higher is adequate. Above 125 nmol/L (50 ng/mL) is linked to potential adverse effects.
- Serum vitamin B12. Most labs call values under 200 or 250 pg/mL (148 or 185 pmol/L) low.
- Methylmalonic acid (MMA). The ODS calls MMA the most sensitive marker of B12 status. Experts suggest checking it when serum B12 falls in the gray zone of 150 to 399 pg/mL. An MMA above 0.271 micromol/L suggests deficiency. MMA also rises with reduced kidney function.
While you are at the lab, ask about thyroid function. Hypothyroidism produces the same fatigue, weight change, and low mood; thyroid.md covers that overlap in detail.
For intake, the NIH ODS sets these reference values. The vitamin D RDA is 600 IU (15 mcg) per day for adults 19 to 70 and 800 IU (20 mcg) for adults over 70. The Tolerable Upper Intake Level for adults is 4,000 IU (100 mcg) per day. The B12 RDA is 2.4 mcg per day for adults (2.6 mcg in pregnancy, 2.8 mcg while breastfeeding). B12 has no upper limit because the body does not store excess amounts. How much to take to correct a documented deficiency depends on the cause and is your clinician's call.
The bottom line
Low vitamin D travels with depression but does not appear to cause it. The 18,353-person VITAL-DEP trial found no protective effect from 2,000 IU daily over five years. A B12 deficiency is different: it can look exactly like depression, and it is common in older adults and people on metformin or acid reducers. Ask for 25(OH)D, serum B12, and MMA if you are at risk. Fix a deficiency if you find one. Then keep treating the depression, whether that means therapy and lifestyle approaches, medication, or both. A vitamin is part of the workup, not a substitute for care.
Last updated: August 2026. This article is for informational purposes only and does not constitute medical advice. Talk to your clinician before starting or stopping any supplement, and seek care promptly if you have thoughts of harming yourself.