Health information to help you understand symptoms. It isn't a diagnosis.
Check symptoms

Upper right belly pain (under the right ribs)

Also called: Right upper quadrant pain, pain under the right ribs, gallbladder pain

Pain in the upper right belly, under the right ribs, often comes from the gallbladder, which sits there under the liver. Gallstones are a common cause, especially pain that comes after a fatty meal. The liver, right kidney, and the bottom of the right lung can also cause pain here. Severe pain that lasts more than a few hours, or pain with fever or yellow skin, needs care right away.

Common causesGallstones, gallbladder inflammation, liver problems, muscle strain
Usually serious?Sometimes; gallbladder and liver problems need treatment
Get checked ifIt's severe, lasts hours, or comes with fever or yellow skin
If you think it's an emergency, call 911.Thinking about suicide? Call or text 988.

Overview

The upper right part of the belly holds the liver, the gallbladder, part of the bowel, and the right kidney behind them. The bottom of the right lung is just above. Pain here can be sharp, cramping, or a dull ache, and it may spread to the back or under the right shoulder blade.

Gallbladder pain (biliary colic) often starts after a meal, especially a fatty one, builds over 30 minutes to an hour, and can last for hours. When the gallbladder gets inflamed (cholecystitis), the pain is steady and severe and often comes with fever, nausea, and vomiting.

When to get medical care

Call 911Severe pain with chest pain, pressure, or shortness of breath. Pain so bad you can't sit still or get comfortable, with vomiting. Pain with a fast heartbeat, confusion, or fainting. Vomiting blood or passing black, tarry stools.
Get care todaySevere belly pain that lasts more than 30 minutes and doesn't go away, or any upper right pain that lasts more than 6 hours. Pain with a fever or chills. Yellow skin or eyes (jaundice), dark urine, or pale, clay-colored stools. Repeated vomiting or a swollen belly. You're pregnant and have upper right belly pain, especially with a headache, vision changes, or swelling (possible preeclampsia).
See a doctor soonPain that keeps coming back after meals. A dull ache that lasts more than a few days. Pain with weight loss, loss of appetite, or tiredness.

Causes

Common causes include gallstones and biliary colic, acute cholecystitis (gallbladder inflammation), a strained muscle or bruised rib, gas and bloating, and indigestion. Other causes include hepatitis and other liver problems (including fatty liver and liver abscess), a kidney stone or kidney infection on the right side, pneumonia or a blood clot in the right lung, a stomach or duodenal ulcer, pancreatitis, appendicitis (early on, or in pregnancy when the appendix sits higher), shingles before the rash appears, and, in pregnancy, preeclampsia or HELLP syndrome.

OwieClear has pages on 12 conditions that can cause upper right belly pain (under the right ribs). Each shows how soon to get care.

Common causes

Less likely causes

  • Fatty liver diseaseSee a doctor if it doesn't get better

    Extra fat in the liver, often linked to weight, diabetes, high cholesterol, or alcohol.

  • Gallbladder polypsSee a doctor if it doesn't get better

    Small growths on the inside of the gallbladder, usually found by chance on an ultrasound.

  • Amebiasis (Entamoeba infection)Often needs care today

    An infection of the gut by the parasite Entamoeba histolytica, picked up from food or water contaminated with stool, mostly in places with poor sanitation.

  • Bile duct cancer (cholangiocarcinoma)Often needs care today

    A rare cancer of the tubes that carry bile from the liver to the gut.

  • HELLP syndromeMay need emergency care

    A severe form of preeclampsia that affects the liver and blood, in late pregnancy or soon after birth.

  • Hydatid disease (echinococcosis)See a doctor if it doesn't get better

    Cysts caused by a tiny tapeworm whose eggs come from dog stool, mostly in sheep-farming areas.

  • Slipping rib syndromeSee a doctor if it doesn't get better

    Pain in the lower chest or upper belly when the lower rib cartilage moves and irritates a nerve.

What you can do at home

  • Don't eat for a few hours if the pain is mild. Then try clear liquids and bland, low-fat foods.
  • Avoid fatty, greasy, or fried foods, which can set off gallbladder pain.
  • Rest with a heating pad on the area for muscle or rib pain.
  • Keep track of the pain: when it starts, what you ate, how long it lasts, and what makes it better or worse.
  • Don't take aspirin or ibuprofen on an empty stomach, and avoid them if an ulcer is possible. Acetaminophen is a safer choice for mild pain, but don't exceed the package dose, since it affects the liver.
  • Avoid alcohol until you know the cause.

Medicines

Acetaminophen (Tylenol) can help with mild pain, but stick to the label dose. Antacids may help if it's indigestion. Gallstones that cause repeated attacks are usually treated by removing the gallbladder, and an inflamed gallbladder needs hospital care with IV fluids and antibiotics.

At the doctor

The doctor will press on your belly and use blood tests and an ultrasound to check the gallbladder and liver.

Questions you may be asked

  • Exactly where it hurts and whether it spreads to the back or shoulder
  • Whether it comes after eating, especially fatty meals
  • How long each episode lasts and how often it happens
  • Any fever, nausea, vomiting, yellow skin, or dark urine
  • Any recent injury to the ribs or back
  • Your alcohol use and medicines
  • Whether you could be pregnant

The exam

A physical exam of the belly, including pressing under the right ribs while you breathe in, plus a check for jaundice and fever.

Tests

  • Blood tests for liver function, pancreas enzymes, and infection
  • An ultrasound of the belly to look for gallstones and inflammation
  • A CT scan if the ultrasound isn't clear
  • A HIDA scan (a test of gallbladder function)
  • A urine test
  • A chest X-ray if lung problems are suspected

Prevention

You can lower your risk of gallstones and liver problems.

  • Keep a healthy weight, and lose weight slowly if you need to; crash diets raise gallstone risk
  • Eat a diet high in fiber and low in saturated fat
  • Exercise regularly
  • Limit alcohol
  • Get vaccinated against hepatitis A and B

Check your symptoms

Most symptoms have more than one possible cause. The symptom checker looks at all of your symptoms together, plus your age, and shows how soon to get care.

Start the symptom checker

Sources

Last updated 2026-11-13.

See something wrong or unclear on this page? Suggest a correction. OwieClear is for education only and isn't medical advice.