
People who drink two to three cups of coffee a day show the lowest risk of developing anxiety and mood disorders, according to one of the largest health studies ever done.
Quick Take
- A UK Biobank study tracked 461,586 people for over 13 years and found a J-shaped link between coffee and mental health.
- The lowest risk for mood and stress disorders showed up in people drinking two to three cups daily, not zero and not a lot.
- A separate Biobank study of 146,566 people found the same pattern for depression and anxiety specifically.
- A different 2024 review of caffeine studies found the opposite effect on anxiety, showing the science isn’t fully settled.
The Numbers Behind The Coffee And Mood Connection
Researchers pulled health records on nearly half a million people through the UK Biobank, one of the world’s most detailed long-term health databases. Over a median follow-up of 13.4 years, the team recorded 18,220 new cases of mood disorders and 18,547 new cases of stress disorders. That’s a massive sample size, giving the findings real statistical weight rather than a small, easily dismissed trend.
The pattern researchers found wasn’t a straight line. It was J-shaped, meaning risk dropped as coffee intake rose, bottomed out at two to three cups a day, then ticked back up at higher amounts. People drinking no coffee and people drinking heavy amounts both showed higher risk than the moderate drinkers in the middle. That shape matters because it rules out the simple idea that “more coffee equals more benefit.”
The researchers didn’t just run a basic comparison. They used Cox proportional-hazards models and restricted cubic splines, statistical tools built to adjust for other factors like age, smoking, and health history. They also looked across different coffee types, including instant, ground, and decaf, and tracked outcomes using official hospital diagnosis codes rather than guesswork or self-reported moods.
A Second Study Points To The Same Sweet Spot
A separate UK Biobank analysis of 146,566 people backed up the first. In that group, 41.2% of participants already drank two to three cups a day, and that group showed the lowest risk of incident depression and anxiety. Finding the same two-to-three-cup sweet spot in two different samples strengthens the case that this isn’t a fluke of one dataset or one research team’s methods.
This also lines up with older research. A review of coffee’s effects on the brain pointed to earlier work tying coffee drinking to lower depression risk, including a meta-analysis that found coffee drinkers had measurably lower rates of depression than non-drinkers. Taken together, the pattern isn’t a single surprising headline. It’s a repeated signal across different research groups and time periods.
What The Data Can’t Prove, And Why That Matters
Both Biobank studies are observational. That means researchers watched what happened to people over time rather than randomly assigning some to drink coffee and others not to. This matters because it opens the door to reverse causation. People already feeling anxious or depressed might cut back on coffee first, making moderate drinkers look healthier simply because the already-unwell people dropped out of that group.
The hospital-record method also has a blind spot. Researchers counted mood and stress disorders using ICD-10 codes from hospital inpatient records, meaning anyone who struggled with anxiety or depression but never got hospitalized wouldn’t show up in the data at all. That likely undercounts milder cases treated by a family doctor or never treated at all, which limits how far these numbers stretch across the general public.
Your morning coffee might be doing more for your brain than you think. ☕
A big JAMA study of ~132,000 people followed for up to 43 years found that 2–3 cups of caffeinated coffee a day was linked to an 18% lower dementia risk and modestly better cognitive function. Tea showed a… pic.twitter.com/YZTxhT8BNo
— Lori Shemek, PhD (@LoriShemek) November 9, 2026
Not every study agrees, either. A 2024 meta-analysis of caffeine and anxiety found the opposite result, reporting that caffeine intake significantly raised anxiety risk, with very high variation between the studies it reviewed. That doesn’t cancel out the Biobank findings, since the studies measured different things in different ways. But it’s a real reminder that caffeine’s effect on mood isn’t a settled, one-size-fits-all story. A cup of coffee at a diner, a shot of espresso, and a large sugary coffee drink aren’t the same dose, and the current data doesn’t fully separate those differences.
Sources:
link.springer.com, biobank.ndph.ox.ac.uk, journals.lww.com













