Pain Under the Right Ribs
SaveThe upper right quadrant is crowded. Liver, gallbladder, bile ducts, the top of the right kidney, the base of the right lung, and a cage of ribs and muscle all report pain to roughly the same place. Sorting them apart is less about where it hurts than about what brings it on, how long it lasts, and what arrives alongside it.
Last updated: July 2026
What sits under the right ribs?
More than most people picture, stacked closely together. The liver fills most of the space and reaches across toward the midline. The gallbladder tucks underneath it. The bile ducts run behind. The first stretch of intestine curls below. The right kidney sits toward the back, and the base of the right lung sits just above the diaphragm, close enough that a chest problem can arrive as a belly one.
That crowding is why reading abdominal pain by location gets you only partway. Location narrows the field; it does not name the organ. Two people with identical maps of where it hurts can have a gallbladder attack and a strained rib muscle.
What does the discriminating work is the shape of the episode:
- What sets it off. A meal, especially a fatty one? A deep breath? Twisting? Pressing on it?
- How long it lasts. Minutes, an hour, several hours, or constant?
- Where it travels. Toward the right shoulder blade? Through to the back? Around the flank?
- What comes with it. Fever, nausea, yellowing, dark urine, a cough?
Those four questions do more work than any amount of prodding, and they are the four a clinician will ask.
The gallbladder pattern
Gallstone pain has a signature specific enough to recognize. A gallbladder attack is felt as pain in the upper right abdomen, often after a fatty meal and often in the evening or during the night, and it happens when a gallstone blocks a bile duct 1Ref 1National Institute of Diabetes and Digestive and Kidney Diseases (NIDDK) (2017).Symptoms & Causes of Gallstones.That a gallbladder attack is upper-right abdominal pain occurring when a gallstone blocks a bile duct, often after fatty meals and often in the evening or at night.. The pain builds rather than stabs, plateaus at something formidable, and then eases as the stone falls back and the duct reopens.
That last part is the tell. Biliary colic is the name for the self-limiting attack, a duct that blocks and then unblocks. It hurts intensely for a stretch and then genuinely stops, leaving someone sore and shaken but essentially well. People describe going to bed after a rich dinner and waking a few hours later unable to find a comfortable position in any direction.
Pain that does not stop is a different event. When the blockage persists and the gallbladder wall becomes inflamed and infected, the pain stays, fever arrives, and the abdomen turns tender to the touch. The biliary colic vs cholecystitis difference is essentially duration plus fever, and it is the most useful distinction in this whole quadrant, because one is an appointment and the other is a hospital.
Pain radiating toward the right shoulder blade is common enough with gallbladder disease to be worth mentioning to whoever sees you. It is not diagnostic. It is a good clue.
When the liver is the source
Liver pain is rarely sharp. The liver has no pain fibers inside it. What hurts is the capsule around it, and the capsule complains only when the organ swells enough to stretch it. That produces a dull, heavy, persistent ache rather than an attack: more a presence than an event, and often described as fullness rather than as pain.
The things that swell a liver: viral hepatitis, alcohol-related injury, fat accumulation, congestion from a struggling heart, and drug reactions. They vary enormously in seriousness and can feel much the same from outside, which is why this branch gets settled by blood work rather than by description.
Company is what raises the stakes. Jaundice in adults, usually visible first in the whites of the eyes, alongside right-sided pain moves the question from what is causing this ache to what is obstructing or damaging the liver, and it shortens the timeline to days. Dark urine and pale stool tend to travel with it.
A dull right-sided ache with entirely normal blood work is a common finding, and it frequently turns out to be muscular or functional rather than hepatic. That reassurance is available after the blood work, though, not instead of it.
The impostors: reflux and the stomach
A great deal of pain that people place under the right ribs is actually arriving from the stomach and esophagus, a few inches to the left and in front. GERD is reflux that has become persistent enough to cause symptoms or damage. It shows up as heartburn and regurgitation, and it happens when the muscular ring at the base of the esophagus is weak or opens when it should stay shut, with a hiatal hernia contributing 2Ref 2National Institute of Diabetes and Digestive and Kidney Diseases (NIDDK) (2020).Symptoms & Causes of GER & GERD.That GERD presents as heartburn and regurgitation and arises from a weak or inappropriately relaxing lower esophageal sphincter, with hiatal hernia contributing..
Epigastric pain — burning or gnawing below the breastbone — spreads rightward often enough to confuse everyone involved. Reflux and gallbladder pain both worsen after meals and both favor the evening. The rough separators: reflux burns and rises, biliary pain builds and bores; reflux answers to acid suppression, a stone does not.
The stomach lining is the other impostor. H. pylori infection is the most common cause of gastritis, alongside NSAID- and alcohol-related reactive gastropathy, autoimmune gastritis, and stress-related erosive gastropathy 3Ref 3National Institute of Diabetes and Digestive and Kidney Diseases (NIDDK) (2019).Symptoms & Causes of Gastritis & Gastropathy.That H. pylori is the most common cause of gastritis, alongside NSAID/alcohol-related reactive gastropathy, autoimmune gastritis, and stress-related erosive gastropathy.. That matters because it is testable and treatable rather than something to live around. Current ACG guidance favors bismuth quadruple therapy as first-line treatment given rising clarithromycin resistance, and it recommends confirming afterward that eradication actually worked 4Ref 4Chey WD, Howden CW, Moss SF, Morgan DR, Greer KB, Grover S, Shah SC (2024).ACG Clinical Guideline: Treatment of Helicobacter pylori Infection.That H. pylori causes dyspepsia, gastritis, peptic ulcer disease, and gastric cancer; that bismuth quadruple therapy is favored first-line given rising clarithromycin resistance; and that eradication should be confirmed.. The same organism sits behind dyspepsia, peptic ulcer disease, and gastric cancer 4Ref 4Chey WD, Howden CW, Moss SF, Morgan DR, Greer KB, Grover S, Shah SC (2024).ACG Clinical Guideline: Treatment of Helicobacter pylori Infection.That H. pylori causes dyspepsia, gastritis, peptic ulcer disease, and gastric cancer; that bismuth quadruple therapy is favored first-line given rising clarithromycin resistance; and that eradication should be confirmed., which is what makes finding it worth the test.
Pain that isn't coming from the abdomen at all
The right lower lung sits directly above the liver, separated only by a sheet of muscle. Pneumonia at the lung base, or inflammation of the lining around it, produces pain felt under the ribs that sharpens with a deep breath or a cough. It is one of the more commonly missed causes of upper right abdominal pain, precisely because nobody thinks to listen to the chest.
The wall itself is the other underrated candidate:
- Muscle and rib. An intercostal strain, a bruised rib, or costochondritis where cartilage meets bone. The tell is that one specific spot hurts when pressed, and that it tracks with position and movement rather than with meals.
- Shingles. Burning or exquisitely sensitive skin in a band on one side, sometimes for days before any rash appears. Pain that lives on the surface and stops abruptly at the midline is worth naming out loud.
- The kidney. Pain further back in the flank, arriving in waves, sometimes travelling toward the groin, often with urinary symptoms.
A home test costs nothing: press firmly on the sore spot with one finger. Wall pain reproduces exactly. Organ pain generally does not care much what your finger is doing.
Ultrasound or endoscopy: how fast, and which question?
The two common tests answer different questions, and which you are offered follows from which pattern you describe. An ultrasound looks at the gallbladder, the ducts, and the liver. An endoscopy looks at the stomach and esophagus. The ACG and CAG dyspepsia guideline directs upper endoscopy for patients 60 and over or with alarm features such as weight loss, bleeding, or trouble swallowing, and test-and-treat for H. pylori or an empiric acid-suppression trial for those under 60 without alarm features 5Ref 5Moayyedi P, Lacy BE, Andrews CN, Enns RA, Howden CW, Vakil N (2017).ACG and CAG Clinical Guideline: Management of Dyspepsia.That upper endoscopy is directed for patients 60 and over or with alarm features (weight loss, bleeding, dysphagia), and test-and-treat for H. pylori or empiric PPI for those under 60 without alarm features..
The timeline, plainly:
- Now, emergency department. Severe pain lasting more than a few hours, especially with fever or shaking chills. An abdomen too rigid or tender to touch. Yellow skin or eyes with fever. Confusion or faintness with any of it.
- This week. Jaundice without fever. Pale stool with dark urine. Vomiting that will not settle. Pain that repeatedly wakes you from sleep.
- Weeks. A dull, unchanging ache with no fever, no yellowing, and a normal appetite.
Two things override all of that. Any alarm feature — weight you did not intend to lose, bleeding, difficulty swallowing — moves the visit forward regardless of how the pain itself is behaving 5Ref 5Moayyedi P, Lacy BE, Andrews CN, Enns RA, Howden CW, Vakil N (2017).ACG and CAG Clinical Guideline: Management of Dyspepsia.That upper endoscopy is directed for patients 60 and over or with alarm features (weight loss, bleeding, dysphagia), and test-and-treat for H. pylori or empiric PPI for those under 60 without alarm features.. And being 60 or over lowers the threshold for looking rather than treating 5Ref 5Moayyedi P, Lacy BE, Andrews CN, Enns RA, Howden CW, Vakil N (2017).ACG and CAG Clinical Guideline: Management of Dyspepsia.That upper endoscopy is directed for patients 60 and over or with alarm features (weight loss, bleeding, dysphagia), and test-and-treat for H. pylori or empiric PPI for those under 60 without alarm features.. Never let a plausible benign explanation postpone an alarm feature: reflux is common, and so is the person who had reflux for years and also had something else.
When every test comes back normal
This is a common and genuinely frustrating place to land: the ultrasound is clean, the bloods are fine, the endoscopy found nothing, and the pain is still there every evening. It does not mean the pain was imagined, and it does not mean the workup was wasted. Excluding the dangerous things is what makes the next conversation possible at all.
Rome IV reframed the functional GI disorders as disorders of gut-brain interaction, and revised the IBS criteria around abdominal pain related to defecation rather than vague discomfort 6Ref 6Schmulson MJ, Drossman DA (2017).What Is New in Rome IV.That Rome IV reframed functional GI disorders as disorders of gut-brain interaction and revised the IBS criteria around abdominal pain related to defecation rather than discomfort.. The change was not cosmetic. It reflects that real pain can be generated by how the gut and the brain signal to each other, with nothing for a camera to find, and that this is a positive diagnosis with actual treatments rather than a shrug.
Functional upper abdominal pain tends to be more constant than a stone, less tied to fatty meals specifically, and more responsive to stress and sleep. It also overlaps with the muscular causes, and the two frequently coexist.
One honest caveat: a normal ultrasound in someone with a classic biliary story is not always the end of it, and gallbladder function can be tested separately from gallbladder anatomy. Which direction gets explored depends on the pattern you described at the start.
Common questions
Related
Digestive health
Biliary Colic vs Cholecystitis: A Passing Attack or an Inflamed GallbladderDigestive health
Pain in the Upper Left BellyDigestive health
What Does Gallbladder Pain Feel Like? Recognizing a Gallbladder Attack
Say it back
How would you explain this to someone you love?
Two or three sentences, just as you’d say it. Gale reflects back what you focused on — a mirror, not a quiz.
Right upper pain that needs care today
- —Severe pain under the right ribs lasting more than a few hours, especially with fever or shaking chills - this suggests an inflamed or infected gallbladder rather than a passing stone
- —Yellowing of the whites of the eyes or of the skin, with or without pale stool and dark urine
- —An abdomen that is rigid, or too tender to let a hand rest on it
- —Pain under the right ribs with breathlessness, a cough, or pain that sharpens with every deep breath
Go to the emergency department for severe pain lasting hours, for pain with fever or shaking chills, or for yellowing skin or eyes. Call 911 if you are confused, faint, breathless, or the pain is unbearable.
This article explains what commonly causes pain under the right ribs and how clinicians tell the patterns apart. It is not a diagnosis and cannot tell you what is causing yours. Persistent or severe right upper abdominal pain needs an in-person evaluation.
References
- 1.National Institute of Diabetes and Digestive and Kidney Diseases (NIDDK) (2017). Symptoms & Causes of Gallstones. NIDDK, National Institutes of Health. link ✓That a gallbladder attack is upper-right abdominal pain occurring when a gallstone blocks a bile duct, often after fatty meals and often in the evening or at night.
- 2.National Institute of Diabetes and Digestive and Kidney Diseases (NIDDK) (2020). Symptoms & Causes of GER & GERD. NIDDK, National Institutes of Health. link ✓That GERD presents as heartburn and regurgitation and arises from a weak or inappropriately relaxing lower esophageal sphincter, with hiatal hernia contributing.
- 3.National Institute of Diabetes and Digestive and Kidney Diseases (NIDDK) (2019). Symptoms & Causes of Gastritis & Gastropathy. NIDDK, National Institutes of Health. link ✓That H. pylori is the most common cause of gastritis, alongside NSAID/alcohol-related reactive gastropathy, autoimmune gastritis, and stress-related erosive gastropathy.
- 4.Chey WD, Howden CW, Moss SF, Morgan DR, Greer KB, Grover S, Shah SC (2024). ACG Clinical Guideline: Treatment of Helicobacter pylori Infection. American Journal of Gastroenterology. doi:10.14309/ajg.0000000000002968 ✓That H. pylori causes dyspepsia, gastritis, peptic ulcer disease, and gastric cancer; that bismuth quadruple therapy is favored first-line given rising clarithromycin resistance; and that eradication should be confirmed.
- 5.Moayyedi P, Lacy BE, Andrews CN, Enns RA, Howden CW, Vakil N (2017). ACG and CAG Clinical Guideline: Management of Dyspepsia. American Journal of Gastroenterology. doi:10.1038/ajg.2017.154 ✓That upper endoscopy is directed for patients 60 and over or with alarm features (weight loss, bleeding, dysphagia), and test-and-treat for H. pylori or empiric PPI for those under 60 without alarm features.
- 6.Schmulson MJ, Drossman DA (2017). What Is New in Rome IV. Journal of Neurogastroenterology and Motility. doi:10.5056/jnm16214 ✓That Rome IV reframed functional GI disorders as disorders of gut-brain interaction and revised the IBS criteria around abdominal pain related to defecation rather than discomfort.
6 sources, numbered by first appearance. General health information, not medical advice. AI-assisted editorial content — every citation independently verified. Editorial policy