Pain in the upper right part of your stomach, just below the ribs, most commonly comes from the gallbladder or liver. This area of the abdomen is packed with organs, though, so the cause could also involve your kidney, part of your intestine, or even your rib cage itself. Where exactly the pain sits, what it feels like, and when it shows up all help narrow down what’s going on.
What’s Located in That Area
The upper right abdomen contains the liver (your largest internal organ), the gallbladder (tucked just beneath the liver), the head of the pancreas, and part of the colon. The first section of the small intestine, called the duodenum, sits here too. Behind all of that, closer to your back, is the right kidney. Even the lower portion of the right lung overlaps this zone. Pain from any of these structures can feel like it’s coming from the same general spot, which is why the character of the pain matters more than pointing to a precise location.
Gallbladder Problems: The Most Common Cause
Gallbladder issues are the single most frequent reason for upper right abdominal pain, and they come in two main forms.
Biliary colic is the milder version. It happens when a gallstone temporarily blocks the duct that drains your gallbladder. You’ll feel a steady, gripping or gnawing pain near the rib cage that can radiate to your upper back or behind the breastbone. It often hits after a fatty meal, since fat triggers the gallbladder to squeeze out bile. Episodes typically last anywhere from 30 minutes to a few hours and then resolve on their own.
Gallbladder inflammation (acute cholecystitis) is more serious. It develops when a stone stays stuck, and 1 to 3 percent of people with symptomatic gallstones progress to this point. The pain feels similar to biliary colic but is more severe, more constant, and can last for days rather than hours. It often gets worse when you take a deep breath. Fever, nausea, and vomiting are common. This typically requires medical treatment and sometimes surgery.
The key pattern to notice: gallbladder pain is usually provoked by eating (especially rich or greasy food), sits right under the ribs, and may wrap around toward your back or right shoulder blade.
Liver-Related Causes
The liver itself doesn’t have many pain receptors, but the capsule surrounding it does. When the liver swells or becomes inflamed, that capsule stretches, producing a dull ache or sense of fullness under the right ribs. Several conditions can cause this:
- Fatty liver disease is extremely common and often produces no symptoms at all until the liver becomes noticeably enlarged. When it does cause pain, it’s usually a vague heaviness rather than sharp discomfort.
- Hepatitis (whether from a virus, alcohol, medications, or autoimmune disease) inflames liver tissue. Pain is often accompanied by fatigue, dark urine, or a yellowish tint to the skin and eyes.
- Liver congestion from heart failure can back blood up into the liver, making it swell and ache.
Liver pain tends to be more constant and less tied to meals than gallbladder pain. If you notice yellowing of your skin or eyes, that’s a strong signal that the liver or bile ducts are involved.
Ulcers and Other Digestive Causes
A duodenal ulcer forms in the first stretch of the small intestine, right in the upper right abdomen. Ulcer pain is classically a dull or burning sensation between the breastbone and belly button. The timing is the giveaway: ulcer pain often flares between meals or wakes you up at night, and eating can temporarily relieve it. That’s the opposite of gallbladder pain, which eating makes worse.
Gas trapped in the hepatic flexure (the bend in the colon that sits near the liver) can also mimic deeper organ pain. This kind of discomfort tends to be crampy, shifts around, and improves after passing gas or having a bowel movement. It’s one of the more benign explanations, but it can be surprisingly intense.
Kidney Stones and Infections
Your right kidney sits behind the other abdominal organs, closer to the back. Kidney stones typically cause sudden, colicky pain that starts in the flank (the side of your body between the ribs and hip) and can radiate forward into the upper abdomen. It often comes in waves rather than staying constant. Painful urination, blood in the urine, or fever alongside flank pain points strongly toward a kidney stone or kidney infection rather than a gallbladder or liver problem.
Lung and Chest Wall Causes
This one surprises people. Pneumonia in the lower right lung or a pulmonary embolism (a blood clot in the lung) can both produce pain that feels like it’s coming from the abdomen rather than the chest. The clue is usually that the pain gets worse with breathing and comes with shortness of breath or a cough.
Costochondritis, an inflammation of the cartilage connecting your ribs to the breastbone, can also mimic internal organ pain. It produces sharp or aching pain that worsens with deep breaths, coughing, sneezing, or twisting movements. While it’s most common on the left side, it can occur on the right. Pressing on the rib joints and reproducing the pain is a good indication that the problem is in the chest wall, not inside the abdomen.
How It Gets Diagnosed
If you see a provider for upper right abdominal pain, the first imaging test is almost always an ultrasound. It’s the gold standard for this area, with a reported accuracy of 96 percent for detecting gallstones. It can also reveal liver enlargement, bile duct blockage, kidney stones, and fluid collections. It’s quick, painless, and doesn’t involve radiation.
Blood work often accompanies the ultrasound. Liver enzyme levels can show whether the liver is inflamed, and a complete blood count can flag infection. If the ultrasound doesn’t provide a clear answer, a CT scan or other specialized imaging may follow.
Symptoms That Need Urgent Attention
Upper right abdominal pain is common, and many causes are manageable. But certain combinations of symptoms warrant a trip to the emergency room:
- Severe pain that doesn’t let up
- Pain that started mild and is steadily worsening
- Vomiting blood or shortness of breath alongside the pain
- Pain spreading upward toward your chest, neck, or shoulder
- Blood in your urine or stool
- Yellow skin or yellowing whites of the eyes
- Fever or chills with the pain
- Unexplained weight loss over recent weeks
Any of these suggests something that needs prompt evaluation rather than a wait-and-see approach.