14 reasons for pain under the right rib cage

Your ribs protect the organs in your chest cavity. However, the pain you feel might be caused by the organs themselves. They include the lungs, intestines, and stomach. Pain below the ribs will usually be dull and sharp, and it can quickly go away or persist over time. 

Usually, you will only feel discomfort on one side of the body. However, this depends on what is causing the pain. What you are experiencing will often come with other symptoms as well. These symptoms include fever, chest pain, or even pain that worsens when inhaling.

Below, we will discuss 14 reasons for pain under the right rib cage. You will be able to identify the exact reason why you experience it. With this information, you can also look for a solution and follow the right treatment. However, you should always seek medical attention if the problems worsen. 

man in pain

What organs are on the right side of the body?

Under the right side of your rib cage, there are several important organs, and they are:

  • Pancreas;
  • Gallbladder;
  • Right kidney;
  • Liver;
  • Small intestine;
  • Large intestine.

The abdomen is divided into four quadrants, and the upper quarter on the right side is the right upper quadrant. In this area, the pain might be caused by conditions such as:

  • appendicitis;
  • hernia;
  • kidney issues;
  • reproductive system issues;
  • irritable bowel syndrome;
  • indigestion;
  • gas.

There are many possible causes of pain in this area. It is important to note down the symptoms and seek medical attention if your condition worsens over time. If the pain is to sharp or continues or you are worried, you should always see your doctor.

woman in pain

Reasons for pain under the right rib cage

You might experience pain under the right rib cage for various reasons. Below, we will explain 14 of the most common ones.

First 7 reasons for stomach pain

Pulmonary embolismBlood clot in a blood vessel in the lungs. Drop of level of oxygen. Risk of damaged lungs
PneumoniaBacterial infection. From mild to life-threatening
Side stitchSharp abdominal pain often in connexion with physical exercise. Rest necessary
Gallbladder disease Sudden and severe abdominal pain. If the flow of bile is obstructed severe conditions may develop
GastritisInflammation. Certain medications and alcohol may be the cause
UlcerChronic infections of H. pylori may develop cancer
GerdCramps, regurgitation of acidic material, or difficulty swallowing. Treated with medication
  1. Pulmonary embolism

This condition is represented by a blood clot in a blood vessel in the lungs. As a result, the level of oxygen in your blood will drop and the lungs might become damaged.

But the clots are not forming in the lungs. Instead, they are developed in the lower leg, breaking off and traveling to your lungs. Other symptoms include leg swelling and difficulty breathing. It may worsen when you are active. 

Treatment depends on the severity of the clot. Surgery or specific medications might be required if it is large and life-threatening. In less difficult cases, your body can break them up with the help of anticoagulants. 

man suffering from stomach ache at home

  1. Pneumonia

A bacterial infection causes pneumonia, and it can be either mild or life-threatening. It is dangerous in infants and people older than 65, and those with a weak immune system. The first thing you should do after suspecting that you have pneumonia is to see a doctor.

Treatment depends on the type of pneumonia you have, with antibiotics being the most common solution for bacterial one. However, viral pneumonia might be different. You will need cough medicine and pain relievers. Your doctor should know what you need for recovery.

Other symptoms of pneumonia include:

  • Sharp chest pain that gets worse when you are inhaling.
  • Shortness of breath.
  • Even fever, chills, or pain in the diaphragm area below the sternum. 
  1. Side stitch

It occurs when you are exhausting yourself, such as when you do intense physical exercise. The cause of side stitches is still unknown. Still, experts think it might be related to not drinking enough water or eating too much before you exercise.

There is only one symptom, including sharp abdominal pain when bending over. It is relieved by resting, stretching, or drinking enough water. 

  1. Gallbladder disease 

It could be another reason for pain under the ribs on the right side. The gallbladder stores bile, which is necessary for digestion. You may develop gallstones, which are as small as a grain of sand. 

Sometimes they don’t cause symptoms, but they can block the gallbladder from releasing bile which will cause pain. It is often worse after eating. 

  1. Gastritis

It occurs when there is an inflammation of the lining of your stomach. It can happen suddenly or gradually, and the regular use of certain medications causes it. It can also occur if you are drinking too much alcohol.

Other symptoms include:

  • Nausea.
  • A tender spot under the right rib cage.
  • A feeling of fullness in your upper abdomen after you eat a large meal. 

  1. Ulcer

An ulcer will develop in the stomach or small intestine. Some of them will appear because of chronic infections of H. pylori, a type of bacteria. How this bacteria spreads is unknown, but it might happen through close contact or food.

Treatment of ulcers depends on their cause. Antibiotics will be recommended if the ulcer has occurred due to H. pylori. But suppose a medication leads to the development of an ulcer. In that case, your doctor might lower your dose or switch to another medication. 

  1. GERD

GERD is an acronym for Gastroesophageal Reflux Disease. It occurs when the acid in your stomach travels back up the esophagus and causes an uncomfortable feeling. It is a very common disorder, as everyone has some amount of reflux.

A muscle between the esophagus and stomach helps prevent acid from returning. But acid can travel more easily when this muscle is weakened and cause specific symptoms. Treatment for GERD includes medications and prescriptions for more severe cases.

Other symptoms of GERD include cramps, regurgitation of acidic material, or difficulty swallowing. 

7 more reasons for stomach pain

IndigestionEating habits, smoking and anxiety can cause it. Consider what you eat and try to manage stress
ConstipationLow-fiber diet and lack of water can be the cause. Try to compensate
Splenic or hepatic flexure syndromeTrapped gas in intestines. Over-the-counter medicine can be bought
Kidney problemsMade of minerals from your urine. Fairly common, affect 1 in 11 people. Contact doctor if severe pain.
AbscessPus is formed in the liver due to a bacterial infection. Common in connection with diabetes
HepatitisInflated liver due to alcohol or viral infection
Pancreas problemsAcute pancreatitis will cause severe pain. Chronic pancreatitis causes a constant dull pain. Always see a doctor
  1. Indigestion

It occurs depending on your eating habits. You might suffer from indigestion if you eat too much or too quickly. It also happens if you eat greasy or spicy food or drink too much caffeine.

But indigestion is not caused exclusively by eating. For example, smoking and anxiety can also cause it as well as some certain medications and vitamins. You might need to eat smaller and lighter meals in the future to reduce indigestions.

Avoid spicy and greasy foods while you can, as well as carbonated drinks or alcohol. Meditation is also recommended for managing stress and lowering anxiety, which can sometimes cause indigestion. 

woman holding hands over stomache
  1. Constipation

When bowel movements become harder, constipation occurs. It is common to get this condition for short periods. However, you should seek medical attention if it lasts long. This condition often occurs due to a low-fiber diet or not drinking enough water.

Other symptoms of constipation include nausea, bloating, and abdominal pain. To treat it, you should eat more foods that are rich in fiber, such as vegetables or fruits. Consider drinking more water as well, because staying hydrated is essential. 

  1. Splenic or hepatic flexure syndrome

It is caused by trapped gas in your intestines. It feels like there’s something under the right rib cage as it occurs in the upper part of your abdomen. This condition is not dangerous, but it can be extremely painful. 

Over-the-counter medication can easily treat this syndrome, while constipation can be fixed with laxatives if necessary. The best way to prevent this syndrome is to avoid gas-producing foods such as broccoli or dairy products. Other symptoms include pain that worsens when inhaling or bloating. 

  1. Kidney problems

Kidney stones might also cause pain under the right rib cage. A kidney stone is made of minerals from your urine, and they are fairly common as they affect 1 in 11 people. However, men will experience it more often than women.

These stones don’t always cause pain, but they will do so if they get trapped in the urinary tract. You might also need to urinate more often or experience pain while you are using the toilet. 

If it is severe, you should seek the help of a doctor immediately. It’s especially if you are aged 60 or over or if you are still in pain after taking painkillers. 

severe stomach pain in a woman
  1. Abscess

An abscess occurs when an area of pus is formed in the liver due to a bacterial infection. It is common in people with diabetes who might also experience fever and weight loss.

  1. Hepatitis

When the liver is inflamed, hepatitis occurs. The most common cause of this condition is excessive alcohol intake or a viral infection. There are various types of hepatitis. It can also be an indication of the pain that you are experiencing. 

  1. Pancreas problems

Acute pancreatitis occurs after the pancreas is inflamed for a short period of time. It will cause severe pain, and you will experience symptoms such as feeling sick and pain under the rib cage. 

Chronic pancreatitis causes a constant dull pain, and this happens over a long period of time. Unfortunately, it causes lifelong damage. You should always see a doctor if you have severe pain. 

Pain on the right side under ribs towards the back

Pain under the right rib cage can occur for numerous reasons, with kidney problems being one of them. Urinary tract infections can also lead to RUQ pain. There are many symptoms that come with this situation, and some of them include:

  • frequent urination
  • pain that radiates to the lower back
  • painful urination
  • nausea
  • vomiting
  • fever

It is crucial to check with a doctor if you suspect that a kidney problem causes your pain. Immediate treatment is necessary, and the doctor will be able to set a specific diagnosis. 

stomach pain illustration

Sudden sharp pain under the right rib cage

Gallstones are usually responsible for sharp and sudden pain under the right rib cage. These are small stones of bile or cholesterol created by the gallbladder. It’s a small organ located below the liver.

While gallstones are common in adults, they don’t usually cause symptoms. But if a stone gets blocked in a tube opening, this can result in sharp and stabbing pain on both sides under your rib cage. The pain can last up to 5 hours, so you should seek the help of a doctor. 

Dull pain under the right rib cage comes and goes in females.

For females that are at least 20 weeks into their pregnancy, preeclampsia can occur. It can also develop earlier in pregnancy, and it causes a rise in blood pressure. As a result, sharp pain under the right rib cage will also develop.

Additional symptoms of preeclampsia include:

  • kidney or liver problems
  • decreased urination
  • nausea
  • vomiting
  • severe headaches
  • shortness of breath

During your prenatal care visits, a doctor monitors your blood pressure. But if you experience preeclampsia symptoms, you should seek immediate medical attention as it can be life-threatening for you and your baby. 

woman in pain on a green couch

How to relieve gas pain under ribs

Trapped gas can easily be removed with certain home remedies. Some work better for some people than others. Take a look at these quick solutions for expelling trapped gas.


The movement from walking around slowly may help you remove the gas.


Gently massage the painful spot that is tender to touch, and the trapped gas should be released due to the pressure you apply.

Yoga poses

Some specific yoga poses will help you relax and pass the gas. There are several techniques that you can find online.


Noncarbonated liquids are highly recommended as well as warm water or herbal teas. You can make your own herbal tea by using dried chamomile and peppermint leaves. 


Mix turmeric, fennel, or coriander into a glass of warm water and drink. This way, you can release gas and feel more comfortable. 

Bicarbonate of soda

woman in pain

Drink a glass of water with half a teaspoon of sodium bicarbonate dissolved in it. Do not use more than half a teaspoon, as too much baking soda can cause stomach rupture. 


Stomach pain should never be taken lightly. Always consider consulting a doctor


When should I be worried about right-side pain?

Pain in the lower right side, accompanied by fever and vomiting, is a serious cause of concern. You should seek emergency medical attention because these are all symptoms of appendicitis. It is an appendix infection, which can be a life-threatening condition. In this case, surgery is necessary to remove the appendix. 

How do I get rid of sharp pain under my right rib cage?

If it is caused due to a minor injury, you can use a cold compress on the area to reduce swelling. It is the best solution for a pulled muscle or a bruise. You can also take over-the-counter medication if you are experiencing uncomfortable situations.

If this medicine does not relieve the situation, a doctor can prescribe other medications and a compression wrap. It is a large elastic bandage that wraps around your chest in order to reduce pain. 

A compression wrap will prevent further injury and lower your pain. But these wraps are only necessary in rare cases as their tightness will make it harder when taking a deep breath. 

Can the liver cause pain just under the right ribcage?

Liver pain is often experienced in the upper right area of the abdomen, right below the ribs. Usually, this pain is dull and vague. However, it can sometimes develop into a severe one that causes backache. 

Some people will experience this pain in the right shoulder. It can often be confused with general abdominal or even back pain. It is difficult to pinpoint the exact location of this pain, so it is essential to see a doctor. 

They will run several blood tests and biopsies to determine the exact cause of your pain. While there are a variety of causes for liver pain, some of them include hepatitis, liver failure, or even cirrhosis.