Why Does Coffee Upset Your Stomach? What the Science Says

MD Reviewed
Medically reviewed for general accuracy by Dr. Ramsey W., board-certified radiologist. Dr. W.'s clinical specialty is diagnostic radiology; this review reflects broader medical training and is not a gastroenterology subspecialty endorsement.

If coffee bothers your stomach, the reason is probably not the one you've been told. "Coffee is acidic" is the standard explanation — and it's the weakest one on the list. Coffee sits around pH 5. Your stomach acid sits around pH 1 to 2. The coffee isn't out-acidifying your stomach. Something else is going on, and the research points to at least six separate mechanisms, most of which have nothing to do with the pH of what's in your cup.

Short answer: Coffee-related stomach discomfort usually comes from one of six mechanisms — gastric acid stimulation via gastrin, lower esophageal sphincter relaxation, C5HT compounds in the bean's wax layer, diterpene oils retained by unfiltered brewing, accelerated colonic motility, or dairy and additives rather than the coffee itself. Roast level and brewing method influence several of these. The coffee's pH influences almost none of them.

01 / The Acid MythWhy "coffee is acidic" explains almost nothing

Start with the number that ends this argument. Brewed coffee measures roughly pH 4.85 to 5.13.1 Human gastric acid measures roughly pH 1 to 2. Since the pH scale is logarithmic, stomach acid is on the order of a thousand times more acidic than the coffee you're pouring into it. A cup of coffee cannot meaningfully acidify an environment that is already vastly more acidic than it is.

Exhibit A

Coffee pH vs. gastric acid pH

Gastric acid
pH 1–2
Brewed coffee
pH 4.85–5.13
Neutral water
pH 7.0

Higher pH = less acidic. Scale is logarithmic: each whole number is a tenfold difference.

Coffee pH range from peer-reviewed cold/hot brew comparison testing.1 Gastric pH is standard physiological reference.

So if pH isn't the culprit, what is? The honest answer from the research is that coffee's effect on the stomach is driven by signalling — compounds in coffee that tell your body to produce acid, relax a valve, or speed up a muscle — not by the acidity of the liquid itself. A narrative review of coffee's gastrointestinal effects concluded that coffee stimulates gastrin release and gastric acid secretion through its constituent compounds, and that these effects appear in decaffeinated coffee too.2

Did you know

Decaffeinated coffee stimulates gastric acid secretion nearly as effectively as regular coffee — one classic study found decaf produced a response representing about 70% of the peak acid output triggered by pentagastrin, a pharmaceutical acid stimulant.2 Whatever is provoking your stomach, caffeine is only part of it.

02 / Three AciditiespH, titratable, and perceived — and why none of them predict discomfort

"Acidity" in coffee refers to at least three genuinely different things, and conflating them is why low-acid marketing claims so often contradict each other. One brand calls its coffee low-acid because of origin, another because of roast, another because of brew method — and all three can be technically correct while measuring different properties.

Measure What it is What moves it Predicts stomach discomfort?
pH Hydrogen ion concentration — the textbook definition of acidic Roast level, brew method, extraction time Poorly. Coffee's pH is far above stomach acid's either way
Titratable acidity Total acid present, measured by how much base neutralizes it — a better index of acid load than pH alone15 Extraction method, brew strength, roast level Partially. Closer than pH, but still not the main driver
Perceived acidity How bright, tangy, or sour a coffee tastes — a sensory judgment, not a chemical one Origin, altitude, organic acid profile (citric, malic) No. A flavor attribute, unrelated to gastric response

These three don't move together. A coffee can register a relatively high pH while still tasting sharply bright, because pH doesn't capture total titratable acid load or the specific organic acids responsible for perceived brightness.15 High-altitude coffees are a clean example: elevation reliably increases perceived acidity — that prized brightness — without that brightness saying anything about how your stomach will respond.

Did you know

This is why a bright, "acidic-tasting" Ethiopian Yirgacheffe and a mellow, "smooth-tasting" dark roast can be closer in actual pH than their flavor profiles suggest. Your tongue is measuring organic acid composition. Your stomach is responding to something else entirely — the signalling compounds covered in the sections below.

That's the practical takeaway, and it reframes the rest of this article: if you've been shopping for "low acid coffee" to solve stomach discomfort, you've been optimizing a variable that barely moves the outcome. The mechanisms that do move it are hormonal and compositional, not pH-based. For the full chemistry of the three acidity measures and how roast and brew method affect each, see our dedicated low-acid coffee science article.

03 / GastrinThe hormone that actually turns on the acid

Gastrin is the hormone your stomach lining releases to signal parietal cells to produce hydrochloric acid. Coffee stimulates gastrin release, which in turn stimulates gastric acid production.3 This is a hormonal cascade, not a chemical burn — the coffee isn't acidic enough to hurt you directly, but it can prompt your own stomach to produce more acid than it otherwise would.

For most healthy people this is unremarkable; gastric acid is a normal, necessary part of digestion. It becomes a problem when the timing, volume, or your own baseline sensitivity is off — which is why the same cup of coffee can be completely fine for one person and genuinely uncomfortable for another.

Here's where roast level enters, and it's the most actionable lever on this entire page. Roasting creates N-methylpyridinium (NMP) through the thermal breakdown of trigonelline. NMP doesn't exist in green coffee at all — it's purely a roasting product, and it downregulates gastric acid secretion. A controlled study in healthy volunteers measured NMP at 29 mg/L in a medium roast market blend versus 87 mg/L in a dark roast blend, and found the darker roast stimulated meaningfully less gastric acid despite similar caffeine content.4

Exhibit B

What roasting does to four stomach-relevant compounds

Compound Medium roast Dark roast Direction
N-methylpyridinium (NMP)
suppresses acid secretion
29 mg/L 87 mg/L ↑ 3× — favorable
Chlorogenic acids (CGA)
stimulates acid secretion
1,126 mg/L 323 mg/L ↓ 71% — favorable
C5HTs
stimulates acid secretion
0.343 mg/L 0.012 mg/L ↓ 96% — favorable
Trigonelline
NMP precursor
343 mg/L 119 mg/L ↓ (converts to NMP)

All four values from the same controlled comparison of a medium market blend against a dark roast blend with matched caffeine content.4,5

Read that table carefully, because it's the single clearest piece of evidence on this page: roasting moves every one of these four compounds in the direction that reduces gastric acid stimulation. That's not one mechanism — it's four working in the same direction at once.

04 / The Roast WindowWhy we roast medium to medium-dark

The obvious conclusion from Exhibit B would be "roast everything as dark as possible." Here's what that measured data looks like isolated to the two compounds with the clearest opposing directions — and then why "darker is always better" still doesn't follow.

Exhibit C

Two measured compounds moving in opposite directions

NMP — medium roast
suppresses acid
29 mg/L
NMP — dark roast
suppresses acid
87 mg/L

N-methylpyridinium rises with roast — favorable

CGA — medium roast
stimulates acid
1,126 mg/L
CGA — dark roast
stimulates acid
323 mg/L

Chlorogenic acids fall with roast — also favorable

Both values from the same controlled comparison of a medium market blend against a dark roast blend with matched caffeine content.4,5

Exhibit D

Chlorogenic acid decay across the roast

90 67.5 45 22.5 0 ~86 ~40 ~4 Green unroasted Medium 230°C / 12 min Dark 250°C / 21 min

Chlorogenic acid, mg per gram of bean. Three measured points; connecting line is interpolation.

Values are approximate midpoints of reported ranges from controlled roasting trials.16

The shape of that curve is the argument. Chlorogenic acid falls steeply in the early and middle stages of roasting, then flattens as it approaches trace levels — meaning most of the available reduction has already happened by the time you reach a medium roast. Pushing from medium-dark to very dark buys a comparatively small additional decrease, while costing a great deal on the flavor side. This is diminishing returns in the literal sense.

So why not roast as dark as possible? Because the flavor side of the equation moves the other way, and that part isn't captured in any chart on this page. As roasting deepens, the origin characteristics you paid for — the blueberry note in an Ethiopian Yirgacheffe, the plum and peach in a high-altitude Ugandan lot — are progressively replaced by generic roast character. Roast far enough and every origin tastes the same, which defeats the purpose of sourcing specialty-grade beans that cup at 86 to 92+ in the first place. Very dark roasting also increases quinic acid, a chlorogenic acid breakdown product associated with bitterness.

Medium to medium-dark is where those two pressures meet. NMP formation is well underway and chlorogenic acid has dropped substantially, while enough origin character survives that a Yirgacheffe still tastes like a Yirgacheffe. Roast lighter and you keep more flavor complexity but lose most of the gastric benefit. Roast darker and you gain marginal additional acid suppression while erasing the reason to buy specialty coffee at all.

This is a deliberate positioning choice, not a happy accident — and it's why our lineup runs medium (Peru, Ethiopia, Colombia) and medium-dark (Uganda, Central/South America blend, Seasonal Decaf) rather than light or French.

Fair Trade and USDA Organic Peruvian medium roast coffee beans with dry surface and minimal oil
Medium roast (Peru) — drier surface, more origin character retained
Fair Trade and USDA Organic Ugandan medium-dark roast coffee beans with visible surface oil sheen
Medium-dark (Uganda) — surface oil sheen, further along the NMP curve
General Warfield's Coffee beans roasting in a drum roaster where chlorogenic acid degrades and NMP forms

The chemistry in Exhibit B happening in real time — trigonelline converting to NMP as chlorogenic acid breaks down.

General Warfield's Coffee Fair Trade Organic Peru medium roast General Warfield's Coffee Fair Trade Organic Uganda medium-dark roast

Roasted In the Window, Not Past It

Specialty-grade Arabica, roasted medium to medium-dark — where the chemistry works without erasing what the origin actually tastes like.

Shop Our Roasts

05 / C5HTsThe compound in the bean's wax layer

This one gets almost no attention outside food chemistry journals, and it may be the most brewing-dependent mechanism on the list. C5HTs — βN-alkanoyl-5-hydroxytryptamides — are serotonin-related compounds found in the waxy outer layer of the coffee bean. In cell-based testing, they stimulate gastric acid secretion.6

What makes them interesting is how dramatically brewing method changes your exposure. Because C5HTs have low water solubility and sit in the bean's wax, a paper filter catches most of them. Quantitative testing found C5HT levels of 65 to 144 μg/L in filtered coffee, versus up to 3,500 μg/L in a French press brew — meaning roughly 0.3% of available C5HTs made it into the filtered cup, compared with about 7.2% in the French press.6

Exhibit E

C5HT concentration by brewing method

French press
up to 3,500 μg/L
Paper filtered
65–144 μg/L

Micrograms per liter — roughly a 24-fold to 54-fold difference

Quantitation via LC-MS/MS stable isotope dilution analysis.6

Did you know

Roasting reduces C5HTs too. The same controlled comparison behind Exhibit B measured C5HTs at 0.343 mg/L in the medium roast versus 0.012 mg/L in the dark roast — about a 96% reduction.4,5 So a medium-dark roast brewed through a paper filter is addressing this mechanism twice over.

06 / Diterpene OilsCafestol, kahweol, and reflux

A separate oil-based mechanism, also brewing-dependent. Cafestol and kahweol are diterpenes that pass into the cup when coffee is brewed without a paper filter. A randomized pilot study gave GERD patients standard coffee versus dewaxed coffee with diterpenes removed, and found the dewaxed version significantly reduced reflux symptom frequency and increased heartburn-free and regurgitation-free days.7

Like C5HTs, exposure is governed almost entirely by filtration. Unfiltered and boiled coffee retain dramatically more than paper-filtered brewing does — median cafestol concentrations of roughly 939 mg/L in boiled coffee versus about 12 mg/L in home paper-filtered coffee.8

Exhibit F

Cafestol by brewing method (median values)

Boiled / unfiltered
~939 mg/L
Drip machine
~176 mg/L
Home paper-filtered
~12 mg/L

Milligrams per liter

Comparison of workplace machine coffee against conventional brewing methods.8

07 / Motility & the LESTwo mechanisms that aren't about acid at all

Not all coffee-related discomfort is gastric. Two other pathways are worth separating out, because they produce different symptoms and respond to different fixes.

Lower esophageal sphincter relaxation

The LES is the valve between esophagus and stomach. Coffee and decaffeinated coffee both decrease lower esophageal pressure, and high consumption — above roughly five cups daily — may increase GERD risk.9 If your symptom is burning behind the breastbone rather than stomach ache, this pathway is the likelier explanation. Notably, studies on coffee's LES effect have produced conflicting results across the literature,10 so this is a real but less settled mechanism than gastrin stimulation.

Colonic motility

Coffee increases ileal and colonic motility in a caffeine-independent manner, acting partly through muscarinic receptors in gut smooth muscle.9 Coffee may stimulate colonic motility as much as a meal does — roughly 23% more than decaffeinated coffee and about 60% more than a glass of water.3 If your experience is urgency rather than pain, this is the mechanism, and it's a normal physiological response rather than a sign of intolerance.

08 / What's In the CupWhen it isn't the coffee at all

Before attributing symptoms to coffee, rule out what's added to it. Roughly 65% of the global adult population has reduced ability to digest lactose after infancy,11 and lactose intolerance symptoms — bloating, cramping, gas, nausea — typically appear 30 minutes to two hours after consumption.12 That timing window overlaps almost perfectly with "I drank a latte and now my stomach hurts."

Worth noting honestly: research on small lactose doses is genuinely mixed. A randomized double-blind trial in people reporting severe lactose intolerance found many tolerated 240 ml of milk without recognizable symptoms,13 so the splash in a cup of coffee is not automatically the answer either. The practical test is simple and free: drink your coffee black for a week and see whether anything changes.

If your symptom is... Likely mechanism What the evidence supports trying
Stomach ache, gnawing discomfort Gastrin-driven acid secretion Medium-dark roast (higher NMP, lower CGA)4
Burning behind the breastbone LES relaxation / reflux Reduce total intake; paper-filtered brewing7,9
Reflux specifically after French press or espresso Diterpene oils, C5HTs Switch to paper-filtered brewing6,7,8
Urgency, needing the bathroom Colonic motility (normal response) Nothing required; eat something first if uncomfortable9
Bloating, gas, cramping 30 min–2 hrs after Possibly lactose in additives Trial period drinking coffee black11,12
Did you know

Coffee is frequently blamed for stomach ulcers, but the evidence doesn't support it. The main causes of ulcers are H. pylori infection and NSAID overuse. One study of more than 8,000 people in Japan examined coffee consumption and ulcer formation and found coffee didn't appear to play a role.14 Chlorogenic acids may even have a protective effect on gastric mucosa in animal models.2

09 / Test YourselfThe coffee and stomach quiz

Five questions. Pick your answer, then tap to reveal. No score-keeping, no email required — the discount code is at the bottom either way.

1. Roughly how much more acidic is stomach acid than brewed coffee?

A. About twice as acidic B. About ten times as acidic C. About a thousand times as acidic
Reveal answer

C. Coffee sits near pH 5; gastric acid sits near pH 1–2. Because pH is logarithmic, that's roughly a thousandfold difference — which is why "coffee is too acidic" doesn't hold up as an explanation.1

2. Which compound, created during roasting, actually suppresses gastric acid secretion?

A. Chlorogenic acid B. N-methylpyridinium (NMP) C. Cafestol
Reveal answer

B. NMP forms from trigonelline during roasting and downregulates acid secretion. It was measured at 87 mg/L in a dark roast versus 29 mg/L in a medium roast.4

3. Switching from a French press to paper-filtered brewing reduces C5HT exposure by roughly how much?

A. About 10% B. About half C. More than 95%
Reveal answer

C. French press brews measured up to 3,500 μg/L versus 65–144 μg/L in filtered coffee — the paper catches nearly all of it.6

4. True or false: decaf coffee is definitively gentler on the stomach than regular.

A. True B. False
Reveal answer

B — False. Decaffeinated coffee stimulates gastrin release and gastric acid secretion much like regular coffee does, which tells us caffeine isn't the primary driver.2,9

5. Which roast level does General Warfield's Coffee® use, and why?

A. Light — maximum origin character B. Medium to medium-dark — the overlap window C. French — maximum NMP
Reveal answer

B. Medium to medium-dark is where NMP formation is well underway and chlorogenic acid has dropped substantially, while enough origin character survives to justify sourcing specialty-grade beans in the first place.

Thanks for reading this far — here's 10% off: STOMACH10 Apply at checkout. One use per customer.
Specialty Coffee Association member logo

General Warfield's Coffee® is a paid member of the Specialty Coffee Association. Every origin in our lineup is cupped in-house by our licensed Q-graders using SCA protocol, scoring above the 80-point specialty threshold.

This article is educational and is not medical advice. Persistent stomach pain, frequent heartburn, difficulty swallowing, unexplained weight loss, or blood in stool warrant evaluation by a physician — these can indicate GERD, ulcers, H. pylori infection, gallbladder disease, or other conditions that a change in coffee will not address. Switching roasts is not a substitute for a diagnosis.

10 / GlossaryThe terms used on this page

Gastrin

A hormone released by cells in the stomach lining that signals parietal cells to produce hydrochloric acid. Coffee stimulates gastrin release, which is the primary pathway by which coffee increases stomach acid.

N-methylpyridinium (NMP)

A compound formed during roasting from the thermal breakdown of trigonelline. NMP does not exist in green coffee and suppresses gastric acid secretion, increasing as roast level deepens.

Trigonelline

An alkaloid naturally present in green coffee beans that converts to N-methylpyridinium during roasting. Its levels fall as roasting progresses because it is being converted.

Chlorogenic acids (CGA)

A group of the most abundant acid compounds in green coffee. They stimulate gastric acid secretion and degrade substantially as roasting intensifies.

C5HTs (βN-alkanoyl-5-hydroxytryptamides)

Serotonin-related compounds found in the waxy outer layer of the coffee bean. They stimulate gastric acid secretion in cell-based testing, and because they have low water solubility, paper filtering removes most of them.

Diterpenes (cafestol and kahweol)

Oily compounds that pass into the cup when coffee is brewed without a paper filter. Associated with reflux symptoms in controlled testing, and dramatically reduced by paper filtration.

Lower esophageal sphincter (LES)

The muscular valve between the esophagus and stomach. When its pressure decreases, stomach contents can flow backward, producing reflux and heartburn.

Colonic motility

The muscular contractions that move contents through the colon. Coffee increases motility in a caffeine-independent manner, which explains coffee's well-known effect on bowel urgency.

Titratable acidity

The total amount of acid present in a solution, measured by how much base is required to neutralize it. A better index of overall acid load than pH alone, which measures only hydrogen ion concentration.

Quinic acid

A breakdown product of chlorogenic acid that increases with very dark roasting and is associated with bitterness in the cup.

11 / FAQCommon questions

Why does coffee upset my stomach?

Most likely one of six mechanisms: gastrin-driven acid secretion, lower esophageal sphincter relaxation, C5HT compounds from the bean's wax layer, diterpene oils in unfiltered brews, accelerated colonic motility, or dairy added to the cup. Coffee's own pH is rarely the cause — it's roughly a thousand times less acidic than your stomach acid already is.

What's the difference between pH, titratable acidity, and perceived acidity in coffee?

pH measures hydrogen ion concentration — the textbook definition of acidic. Titratable acidity measures the total amount of acid present and is a better index of acid load than pH alone. Perceived acidity is how bright or tangy a coffee tastes, a sensory judgment driven largely by origin and altitude. They don't move together, and none of the three reliably predicts whether coffee will upset your stomach.

Is dark roast easier on the stomach than light roast?

Generally yes. Darker roasting increases N-methylpyridinium, which suppresses gastric acid secretion, while reducing chlorogenic acids and C5HTs, which stimulate it. A controlled study found a dark roast stimulated less gastric acid than a medium roast with matched caffeine.

Does switching to decaf help with stomach discomfort?

Often not. Decaffeinated coffee stimulates gastrin release and gastric acid secretion much like regular coffee, indicating caffeine isn't the primary driver. Roast level and brewing method are more effective levers.

Does brewing method affect whether coffee bothers your stomach?

Significantly. Paper filtering removes most C5HTs and diterpene oils — French press brews measured up to 3,500 μg/L of C5HTs versus 65–144 μg/L in filtered coffee, and about 939 mg/L of cafestol in boiled coffee versus roughly 12 mg/L paper-filtered.

Is coffee on an empty stomach bad for you?

For most healthy people it doesn't cause damage. Coffee stimulates gastric acid secretion but isn't associated with ulcer formation — ulcers are primarily caused by H. pylori infection and NSAID use. People with existing GERD, gastritis, or ulcers may still find fasted coffee uncomfortable.

Does coffee cause stomach ulcers?

The evidence doesn't support it. A study of more than 8,000 people in Japan found no role for coffee in ulcer formation, and chlorogenic acids may even have a protective effect on gastric mucosa in animal models. H. pylori and NSAID overuse are the main causes.

General Warfield's Coffee Fair Trade Organic Peru medium roast General Warfield's Coffee Fair Trade Organic Uganda medium-dark roast

Specialty-Grade, Roasted With the Chemistry in Mind

Fair Trade USA and USDA Organic certified origins, cupped in-house by licensed Q-graders, roasted medium to medium-dark. Use code STOMACH10 for 10% off.

Browse the Full Lineup

References

  1. Rao, N.Z. & Fuller, M. "Acidity and Antioxidant Activity of Cold Brew Coffee." Scientific Reports, 2018. nature.com
  2. Nehlig, A. "Effects of Coffee on the Gastro-Intestinal Tract: A Narrative Review and Literature Update." Nutrients, 2022. mdpi.com
  3. Institute for Scientific Information on Coffee. "Coffee & digestive health: What the science says." coffeeandhealth.org
  4. Rubach, M. et al. "A dark brown roast coffee blend is less effective at stimulating gastric acid secretion in healthy volunteers compared to a medium roast market blend." Molecular Nutrition & Food Research, 2014. pubmed.ncbi.nlm.nih.gov
  5. "βN-Alkanoyl-5-Hydroxytryptamines (Cn-5HTs) in Coffee: A Review." Food Reviews International, 2023. tandfonline.com
  6. Lang, R. et al. "Quantitation of βN-Alkanoyl-5-hydroxytryptamides in Coffee by Means of LC-MS/MS-SIDA and Assessment of Their Gastric Acid Secretion Potential Using the HGT-1 Cell Assay." Journal of Agricultural and Food Chemistry, 2010. pubmed.ncbi.nlm.nih.gov
  7. Polese, B. et al. "Effect of Dewaxed Coffee on Gastroesophageal Symptoms in Patients with GERD: A Randomized Pilot Study." Nutrients, 2022. pmc.ncbi.nlm.nih.gov
  8. "Cafestol and kahweol concentrations in workplace machine coffee compared with conventional brewing methods." Nutrition, Metabolism and Cardiovascular Diseases, 2025. pubmed.ncbi.nlm.nih.gov
  9. "Effects of Coffee on Gut Microbiota and Bowel Functions in Health and Diseases: A Literature Review." Nutrients, 2024. mdpi.com
  10. Boekema, P.J. et al. "Coffee and Gastrointestinal Function: Facts and Fiction: A Review." Scandinavian Journal of Gastroenterology, 1999. researchgate.net
  11. MedlinePlus Genetics. "Lactose intolerance." National Library of Medicine. medlineplus.gov
  12. Mayo Clinic. "Lactose intolerance — Symptoms & causes." mayoclinic.org
  13. Suarez, F.L., Savaiano, D.A. & Levitt, M.D. "A Comparison of Symptoms after the Consumption of Milk or Lactose-Hydrolyzed Milk by People with Self-Reported Severe Lactose Intolerance." New England Journal of Medicine, 1995. nejm.org
  14. Cleveland Clinic. "Is It OK To Drink Coffee on an Empty Stomach?" health.clevelandclinic.org
  15. "Acids in brewed coffees: Chemical composition and sensory threshold." Current Research in Food Science, 2023. sciencedirect.com
  16. "Role of Roasting Conditions in the Level of Chlorogenic Acid Content in Coffee Beans: Correlation with Coffee Acidity." Journal of Agricultural and Food Chemistry, 2009. pubmed.ncbi.nlm.nih.gov

Fair Trade USA®, USDA Organic, Swiss Water®, and the Specialty Coffee Association name and logo are trademarks of their respective owners. Their use here reflects General Warfield's Coffee's certification and membership status only and does not imply endorsement of this article. Cupping scores are assessed in-house by GWC's licensed Q-graders using SCA protocol and are not third-party verified scores.


Leave a comment

Please note, comments must be approved before they are published

This site is protected by hCaptcha and the hCaptcha Privacy Policy and Terms of Service apply.


RuffRuff Apps RuffRuff Apps by WANTO