According to Gram Research analysis, people with vitamin D deficiency after weight loss surgery have an 87% higher risk of developing depression within three years compared to those with normal vitamin D levels. A 2026 cohort study of 23,610 patients found that 4.64% of those with low vitamin D developed depression versus 2.53% of those with adequate vitamin D, suggesting vitamin D status may be an important factor in post-surgery mental health.

A large study of people who had weight loss surgery found that those with low vitamin D levels were nearly twice as likely to develop depression over the next three years compared to those with normal vitamin D. Researchers analyzed data from over 23,000 patients and discovered that vitamin D deficiency was strongly connected to new cases of depression, depressive episodes, and recurring depression. The findings suggest that checking and maintaining healthy vitamin D levels after weight loss surgery could be an important way to protect mental health, though more research is needed to confirm whether vitamin D supplements can actually prevent depression.

Key Statistics

A 2026 cohort study of 23,610 weight loss surgery patients found that vitamin D deficiency was associated with an 87% increased risk of developing depression over three years (4.64% versus 2.53% in those with normal vitamin D levels).

According to research reviewed by Gram, people with vitamin D deficiency after bariatric surgery had a 97% higher risk of recurrent depressive disorder compared to those with adequate vitamin D levels.

A 2026 analysis of over 23,000 post-bariatric surgery patients found that vitamin D deficiency was linked to an 82% increased risk of depressive episodes, with consistent results across different time periods and patient subgroups.

Research shows that among weight loss surgery patients, those with vitamin D levels below 20 ng/mL had significantly higher depression rates than those with levels at or above 30 ng/mL, with the association remaining strong even when controlling for other patient characteristics.

The Quick Take

  • What they studied: Whether people with low vitamin D levels after weight loss surgery are more likely to develop depression compared to those with normal vitamin D levels.
  • Who participated: Over 23,600 adults who had weight loss surgery and had their vitamin D levels tested between 2010 and 2024. Researchers compared 11,805 pairs of patients—one with low vitamin D and one with normal vitamin D—matched by similar characteristics.
  • Key finding: People with vitamin D deficiency had an 87% higher risk of developing depression within three years (4.64% developed depression versus 2.53% in the normal vitamin D group). The risk was even higher for recurring depression, with a 97% increased risk.
  • What it means for you: If you’ve had weight loss surgery, maintaining adequate vitamin D levels may help protect your mental health. However, this study shows an association, not proof that vitamin D supplements prevent depression. Talk to your doctor about vitamin D testing and supplementation as part of your post-surgery care plan.

The Research Details

Researchers used a large medical database called TriNetX that collects health information from millions of patients. They looked back at records from 2010 to 2024 and identified people who had weight loss surgery and had their vitamin D levels tested. They split patients into two groups: those with very low vitamin D (below 20 ng/mL) and those with normal vitamin D (30 ng/mL or higher). To make the groups as similar as possible except for vitamin D levels, they used a statistical technique called propensity score matching, which paired each person in the low vitamin D group with someone very similar in the normal vitamin D group. They then followed both groups for three years to see who developed depression.

The researchers excluded anyone who already had depression before the study started, and they waited six months after the vitamin D test before counting new depression cases. This approach helps ensure they were looking at new depression that developed after the vitamin D measurement, not depression that existed before. They also looked at several types of depression outcomes, including any depression diagnosis, depressive episodes, and recurring depressive disorder.

To check if their findings were real and not due to chance, the researchers used a negative control outcome—acute appendicitis. Since vitamin D shouldn’t affect appendicitis risk, if they found a connection between vitamin D and appendicitis, it would suggest their methods had problems. They didn’t find such a connection, which strengthens confidence in their results.

This research approach is important because weight loss surgery patients are a special group—they often develop vitamin D deficiency because the surgery changes how their body absorbs nutrients. Previous studies showed vitamin D deficiency is linked to depression in the general population, but nobody had specifically studied whether this connection exists in people after weight loss surgery. By using a large database and carefully matching patients, researchers could study this question in a real-world setting with thousands of people, making the findings more reliable than smaller studies.

This study has several strengths: it included over 23,000 patients, used real medical records rather than relying on people’s memories, and carefully matched patients to reduce bias. The researchers also tested their methods with a negative control (appendicitis) and repeated their analysis with more recent data (2016-2024), and got the same results both times. However, the study is observational, meaning it shows an association between low vitamin D and depression but cannot prove that low vitamin D causes depression. Other unmeasured factors could explain the connection. Additionally, the study relied on medical records, so some depression cases might have been missed if patients didn’t seek treatment.

What the Results Show

Among the 11,805 matched pairs studied, people with vitamin D deficiency had significantly higher rates of developing depression within three years. In the vitamin D deficiency group, 4.64% developed depression compared to 2.53% in the normal vitamin D group. This translates to an 87% increased risk (expressed as a hazard ratio of 1.87). The researchers were very confident in this finding, with a P-value less than 0.001, meaning there’s less than a 0.1% chance this result occurred by random chance.

The association held true for different types of depression. People with low vitamin D had an 82% higher risk of depressive episodes and a 97% higher risk of recurrent depressive disorder. These findings were consistent even when researchers looked only at more recent data from 2016 to 2024, suggesting the pattern is reliable and not changing over time.

Interestingly, the researchers found no significant difference between groups in suicidal behavior or intentional self-harm, suggesting that while vitamin D deficiency is linked to depression diagnosis, it may not specifically increase the risk of these more severe outcomes. The study also found that people with vitamin D deficiency had slightly lower healthcare utilization overall, which was unexpected and suggests the relationship between vitamin D and depression is complex.

The study examined several secondary outcomes beyond overall depression. Depressive episodes—individual periods of depression—occurred 82% more frequently in the vitamin D deficiency group. Recurrent depressive disorder, which involves multiple episodes of depression over time, showed the strongest association, with a 97% increased risk in the vitamin D deficiency group. These findings suggest that vitamin D deficiency may be particularly important for preventing repeated or chronic depression rather than just single depressive episodes. The study also looked at suicidal behavior and intentional self-harm as a combined outcome, but found no significant difference between groups, suggesting vitamin D deficiency’s connection to depression may not extend to these more severe outcomes.

Previous research in the general population has shown that vitamin D deficiency is associated with depression, and some studies suggest vitamin D plays a role in brain function and mood regulation. However, this is the first study to specifically examine this relationship in people after weight loss surgery. Weight loss surgery patients are particularly important to study because they have very high rates of vitamin D deficiency—often 50-80% of patients develop deficiency after surgery due to reduced nutrient absorption. The findings align with previous research showing vitamin D’s importance for mental health, but the strength of the association (87% increased risk) is notable and suggests this population may be especially vulnerable to depression when vitamin D is low.

This study shows an association between low vitamin D and depression but cannot prove that low vitamin D causes depression. Other factors not measured in the study could explain the connection. For example, people with low vitamin D might have different eating habits, sun exposure, or exercise patterns that also affect depression risk. The study relied on medical records, so some cases of depression might have been missed if patients didn’t seek treatment or weren’t formally diagnosed. Additionally, the study didn’t measure vitamin D supplementation, so it’s unclear whether people in the low vitamin D group were taking supplements. The study also couldn’t determine whether correcting vitamin D deficiency actually prevents depression, only that the two conditions are associated. Finally, the study population came from a specific medical database, so results may not apply to all weight loss surgery patients, particularly those in different countries or healthcare systems.

The Bottom Line

If you’ve had weight loss surgery, ask your doctor to check your vitamin D levels regularly (at least annually, or more frequently if you’re at risk). If your vitamin D is low, work with your healthcare provider to develop a supplementation plan. Vitamin D supplementation is generally safe and inexpensive, making it a reasonable preventive measure. However, vitamin D supplementation alone is not a treatment for depression—if you experience depression symptoms, seek professional mental health care. The evidence strongly supports monitoring vitamin D after weight loss surgery (high confidence), but evidence that supplementation prevents depression is still developing (moderate confidence).

This research is most relevant to people who have had weight loss surgery (gastric bypass, gastric sleeve, lap-band, or duodenal switch) and anyone considering such surgery. It’s also relevant to healthcare providers who care for post-bariatric surgery patients. People with depression or a family history of depression who have had weight loss surgery should be especially attentive to vitamin D status. The findings may also be relevant to people with vitamin D deficiency in the general population, though the association was studied specifically in the post-surgery population. People without a history of weight loss surgery should not assume these findings apply to them without consulting their doctor.

Vitamin D deficiency was associated with increased depression risk over a three-year period in this study. This doesn’t mean depression will develop immediately—the study tracked outcomes over three years. If you start vitamin D supplementation, it typically takes several weeks to months to restore normal vitamin D levels, depending on the dose and your individual absorption. Mental health benefits, if they occur, would likely develop gradually over months rather than days or weeks. It’s important to maintain consistent vitamin D levels long-term rather than expecting immediate mood improvements.

Frequently Asked Questions

Does vitamin D deficiency cause depression after weight loss surgery?

This study shows a strong association between low vitamin D and depression in weight loss surgery patients, but doesn’t prove causation. The 87% increased risk is significant, but other factors could explain the connection. More research is needed to determine if vitamin D supplementation actually prevents depression.

What vitamin D level should I aim for after bariatric surgery?

Most experts recommend maintaining vitamin D levels of 30 ng/mL or higher. This study compared deficiency (below 20 ng/mL) to normal levels (30 ng/mL or higher). Ask your doctor about your target range, as individual needs vary based on your surgery type and absorption capacity.

How often should I get my vitamin D tested after weight loss surgery?

The study didn’t specify testing frequency, but most bariatric surgery programs recommend annual vitamin D testing at minimum. If you’re deficient or taking supplements, your doctor may recommend testing every 6 months initially to monitor supplementation effectiveness.

Can vitamin D supplements prevent depression after weight loss surgery?

This study shows low vitamin D is associated with higher depression risk, but doesn’t prove supplements prevent depression. Vitamin D supplementation is generally safe and recommended after weight loss surgery for bone health and nutrient absorption. Discuss with your doctor whether supplementation is appropriate for you.

Should everyone who had weight loss surgery take vitamin D supplements?

Most weight loss surgery patients develop vitamin D deficiency and benefit from supplementation for bone health and nutrient absorption. However, individual needs vary. Get your vitamin D level tested and work with your healthcare provider to determine if supplementation is right for you based on your specific results.

Want to Apply This Research?

  • Log your vitamin D supplementation daily and track your vitamin D test results every 6-12 months. Record the date, dose, and type of supplement (D2 or D3). Note any mood changes or depressive symptoms in a separate mood tracker to identify patterns over time.
  • Set a daily reminder to take your vitamin D supplement at the same time each day (ideally with a meal containing fat for better absorption). Schedule annual vitamin D blood tests in your calendar and set reminders to discuss results with your doctor. If you notice mood changes, use the app to log them and share the data with your healthcare provider.
  • Create a dashboard that displays your vitamin D test results over time with target ranges highlighted. Link this to a mood tracking feature that shows depression or mood symptoms on the same timeline, allowing you to visually correlate vitamin D levels with mental health. Set alerts when vitamin D levels drop below 30 ng/mL to prompt supplementation adjustments or doctor consultation.

This research shows an association between vitamin D deficiency and depression in weight loss surgery patients but does not prove causation. This information is for educational purposes and should not replace professional medical advice. If you have had weight loss surgery, are experiencing depression symptoms, or are considering vitamin D supplementation, consult with your healthcare provider or mental health professional. Depression is a serious medical condition requiring professional treatment. If you are having thoughts of suicide or self-harm, contact emergency services or a crisis helpline immediately.

This research translation is published by Gram Research, the science division of Gram, an AI-powered nutrition tracking app.

Source: Vitamin D Deficiency and 3-Year Risk of New-Onset Depression After Metabolic and Bariatric Surgery: A Longitudinal Cohort Study.Obesity surgery (2026). PubMed 42268539 | DOI