Most coffee and health questions end in a shrug: a small association, heavily confounded, that could go either way. Gallstones are one of the exceptions. Here the evidence is unusually consistent across large cohorts, it shows a dose-response, it has a plausible and directly measured mechanism, and it even has a built-in control group, because decaffeinated coffee behaves differently from regular coffee. That does not make it proof, and there is an important catch in the middle of it, but this is about as good as observational nutrition evidence gets.
What gallstones are, and why coffee might matter
The gallbladder is a small sac under the liver that stores bile, a fluid that helps digest fat. When you eat, the gallbladder contracts and squeezes bile into the small intestine. Gallstones form when the components of bile, mostly cholesterol, crystallise and clump while the bile is sitting in storage. Two things make that more likely: bile that is supersaturated with cholesterol, and a gallbladder that empties sluggishly, leaving bile to sit. Most gallstones cause no symptoms at all. When they do, it is usually because a stone blocks the outlet, which is painful and often ends in surgery to remove the gallbladder.
That gives coffee two possible points of entry. Anything that changes cholesterol handling in the liver could change how saturated the bile is, and anything that makes the gallbladder contract more often could stop bile stagnating. Coffee has been shown to do the second directly.
The gallbladder contraction mechanism
The review of coffee and gastrointestinal function by Boekema and colleagues[1] summarised the measured effects: coffee induces the release of cholecystokinin, the hormone that signals the gallbladder to contract, and produces gallbladder contraction. They noted the same fact explains why patients with symptomatic gallstones often avoid coffee, which is a useful early warning that the same mechanism can be protective before you have stones and unpleasant afterwards.
Laboratory work has tried to pin down how. Lindaman and colleagues[2] attached gallbladder muscle strips to force transducers and added caffeine and a series of specific phosphodiesterase inhibitors. Caffeine decreased baseline tone and increased cholecystokinin-induced contractions, and the authors suggested this could contribute to the lower gallstone formation seen with caffeine consumption. That was animal tissue in a bath rather than a person, so it supports the mechanism rather than establishing it.
The men's cohort
The first large prospective test came from Leitzmann and colleagues, in JAMA[3]. They followed 46,008 men aged 40 to 75 in the Health Professionals Follow-up Study, with coffee intake recorded from 1986 and follow-up through 1996. Over 404,166 person-years, 1,081 men developed symptomatic gallstone disease, 885 of whom had their gallbladder removed.
Compared with men who consistently drank no regular coffee, those who consistently drank 2 to 3 cups a day had a relative risk of 0.60, and those drinking 4 or more cups had 0.55. Risk also declined with increasing caffeine intake, and men in the highest caffeine category, above 800 mg a day, had a relative risk of 0.55 against the lowest category. Every brewing method showed a decreased risk, which matters because different methods extract different compounds, and this suggests whatever is responsible survives all of them.
The decaf result is the one that makes this study more than another correlation. Decaffeinated coffee was not associated with decreased risk. If the protection came from something coffee drinkers do rather than from coffee, decaf drinkers should have shown it too.
The women's cohort
The same group repeated the analysis in women. Leitzmann and colleagues, in Gastroenterology[4], followed 80,898 women aged 34 to 59 in 1980 for 20 years, during which 7,811 reported a cholecystectomy. Against women who consistently drank no caffeinated coffee, the multivariate relative risks across increasing intake, at 1, 2 to 3, and 4 or more cups a day, were 0.91, 0.78 and 0.72, with a clear trend. Caffeine intake from all sources showed the same gradient, and once again decaffeinated coffee was not associated with risk.
Two cohorts, two sexes, the same dose-response, the same decaf null result. That is a strong pattern by the standards of nutritional epidemiology.
Where it gets complicated
Then the Swedish data arrived and made the story less tidy. Nordenvall and colleagues[5] followed 30,989 women and 40,936 men in two Swedish cohorts, identifying 1,057 women and 962 men who had a cholecystectomy over 905,933 person-years. Among women drinking 6 or more cups a day compared with fewer than 2, the hazard ratio was 0.58. Among men, it was 0.96, meaning no association at all, the reverse of the Harvard finding.
The authors dug further and found the women's result was concentrated in specific groups. The inverse association appeared only in women who were premenopausal, with a hazard ratio of 0.17, or who used hormone replacement therapy, at 0.44. In other women and in men, nothing. Oestrogen is a known risk factor for gallstones, which is part of why gallstones are more common in women, so an interaction with menopausal status is not implausible. But a subgroup finding this specific, in a study that contradicted the main cohorts in men, is a reason for caution rather than a refinement to be quoted as fact.
What the pooled evidence says
Zhang and colleagues[6] pooled the literature: one case-control study and five prospective cohorts, covering 227,749 participants and 11,477 cases of gallstone disease. Across the prospective studies, coffee consumption was associated with a reduced risk, at a relative risk of 0.83. The dose-response analysis put it at 0.95 per additional cup per day, and modelled estimates for people drinking 2, 4 and 6 cups a day came out at 0.89, 0.81 and 0.75 respectively. The case-control study alone found nothing, at an odds ratio of 0.99.
They also saw the sex split, reporting an inverse relation in females but not males. So across the whole literature the protective association is real and graded, and the question of who it applies to is not settled.
How much of the risk is coffee, and how much is everything else?
A useful piece of perspective comes from Wirth and colleagues[7], who built a healthy lifestyle score from six factors, one of which was drinking at least 2 cups of coffee a day, and applied it to 60,768 women and 40,744 men followed from 1986 to 2012. Comparing people scoring 6 against people scoring 0, the hazard ratio for symptomatic gallstone disease was 0.26 in women and 0.17 in men.
The individual contributions are the part worth reading twice. The partial population attributable risks were 33% in women and 23% in men for keeping a body mass index under 25, and 10% and 18% for drinking 2 or more cups of coffee a day. Coffee earned a place in the score, but body weight mattered more, and the authors estimated that 62% of cases in women and 74% in men were attributable to the combined lifestyle factors. If you want to avoid gallstones, coffee is a modest contributor sitting next to a much larger one.
What the genetic evidence adds
Because all of the above is observational, the most useful cross-check is Mendelian randomisation, which uses genetic variants linked to coffee intake as a substitute for randomising people. Genes are fixed at conception, so they are far less entangled with diet, weight and smoking than a questionnaire answer. In the systematic review of 59 such studies by Pham and colleagues[8], gallstone disease was one of the outcomes with probable evidence of a lowered risk from coffee consumption. The same review found probable evidence of increased risk for several other outcomes, including type 2 diabetes and higher LDL cholesterol, so it is not a review that flatters coffee generally, which makes the gallstone entry more interesting.
The gallbladder cancer footnote
Gallstone disease is strongly associated with gallbladder cancer, which is rare but serious, so it is worth knowing whether the coffee association carries through. Larsson and colleagues[9] followed 72,680 Swedish adults aged 45 to 83 for 967,377 person-years, identifying 74 cases. Against people drinking one cup a day or less, the hazard ratios were 0.76 for two cups, 0.50 for three, and 0.41 for four or more.
Seventy-four cases is a small number of events, and the confidence intervals for the two and three cup categories both crossed 1, so this is a supporting observation rather than a finding to lean on. It points the same direction as the gallstone work, which is what you would expect if the stone association is real.
Why the decaf result matters so much
It is worth dwelling on the decaf null result, because it does more work here than any single risk ratio. Both Harvard cohorts found the protective association with caffeinated coffee and not with decaf, and both found a gradient with total caffeine intake from all sources, which points at caffeine specifically rather than at coffee's other compounds. That fits the laboratory finding in Lindaman and colleagues[2], where caffeine itself altered gallbladder muscle behaviour.
It also acts as an informal control for the healthy-drinker problem. People who drink four cups of coffee a day differ from people who drink none in income, smoking, exercise and diet, and no amount of statistical adjustment fully removes that. Decaf drinkers are socially much more similar to regular coffee drinkers than abstainers are, so the fact that they show no benefit makes it harder to explain the whole association as lifestyle. It does not make it impossible, since people often switch to decaf for a reason, and that reason may itself be related to health.
The catch for people who already have gallstones
Everything above is about preventing stones from forming. Once stones exist, the same mechanism works against you. A gallbladder that contracts harder against a stone sitting in the outlet is the definition of biliary colic, which is why, as Boekema and colleagues[1] noted, people with symptomatic gallstones often avoid coffee. Nothing in this literature suggests coffee dissolves an existing stone or treats gallbladder disease, and no study here tested coffee in people who already had symptoms.
People searching for whether they can drink coffee after gallbladder removal will not find an answer in these papers either, because none of them followed people after surgery. That is a question for the surgeon who did the operation.
Reading this from the Philippines
Every cohort described here was run in the United States or Sweden, in populations whose diets, body weights and coffee habits differ from those in Southeast Asia. Gallstone risk is shaped by weight, rapid weight loss, diet, sex, pregnancy history and genetics, and the proportions of those differ between populations, so the size of any coffee association here should not be assumed to transfer. What travels better is the shape of the finding: a graded association with caffeinated coffee, absent for decaf. Filipino coffee culture spans both strong black brews and the milk-based café drinks common in Marikina and other cities, and nothing in this research distinguishes between them, since what was measured was cups and caffeine rather than what was added to them.
The limits of this evidence
These are observational cohorts of health professionals and other relatively narrow populations, mostly in the US and Sweden, with coffee intake self-reported on questionnaires. Symptomatic gallstone disease is what was counted, and silent stones, which are the majority, are largely invisible to these designs. The sex difference is unexplained and inconsistent between studies. The mechanism work is laboratory tissue. And the decaf comparison, while informative, cannot fully rule out that decaf drinkers differ from regular coffee drinkers in other ways.
The practical answer
On the balance of evidence, regular coffee drinking is associated with a lower risk of developing symptomatic gallstones, the association strengthens with more cups, decaf does not show it, and there is a measured mechanism that fits. The effect is modest compared with body weight, and the pattern is clearer in women in some studies and in men in others. If you already have gallstones, the same gallbladder contraction that may help prevent them can hurt, and your own experience is better evidence than any cohort. For related reading see our article on coffee and liver disease, which covers the other organ where coffee's association with better outcomes is unusually strong, and our article on unfiltered coffee and cholesterol. Nothing here is medical advice.