Skip to main content
Read about

Pain Below the Ribs

Pain below your ribs can be caused by your GI tract, like GERD, indigestion, gallbladder disease, or constipation, or problems with your lungs, like pneumonia. You may also have nausea, bloating, chest pain, coughing, or pain that’s worse when you breathe in.
An illustration of a yellow lower torso and hip area. The lower portion of the ribs are purple. A yellow circle is in the middle of the torso, underneath the rubs. Three yellow triangles come out of the circle.
Tooltip Icon.
Last updated March 26, 2024

Pain below the ribs quiz

Take a quiz to find out what's causing your pain.

Pain below the ribs quiz

Take a quiz to find out what's causing your pain.

Take pain below the ribs quiz

⚡️ Powered by AI

Get personalized answers to your health questions

Our clinically-backed AI will ask you questions and provide an answer specific to your unique health situation.


Your response today was provided by ChatGPT trained on the proprietary content of this page. Please note, this tool is for information purposes only and not intended to be used as a substitute for professional advice. You assume responsibility for decisions made with your individual medical situation.

Was this information helpful?

Thank you! Buoy values your feedback. The more we know about what’s working – and what could improve – the better we can make our experience.

What causes pain below the ribs?

Pain below the rib cage may be caused by organs in the chest cavity (which are protected by your ribs) or ones just below it. These include the lungs, diaphragm, intestines, stomach, and gallbladder.

Pain below the ribs can feel dull or sharp. The pain may go away quickly or be ongoing. Depending on what’s causing the pain, you may only feel discomfort on one side of the body.

The conditions that cause pain below the ribs usually cause other symptoms as well. These symptoms include fever, nausea, vomiting, bloating, chest pain, coughing, back pain, or pain that gets worse when you inhale.

Some conditions that cause pain below the ribs, such as a pulmonary embolism, can be life-threatening and require emergency treatment.

If you experience chest pain, difficulty breathing, or have upper abdominal pain that radiates to the jaw, neck, or arm, call 911.

To dive deeper into what's causing the rib pain, we're going to separate the causes of rib pain under the right rib, rib pain under the left ribs, and pain in the middle, upper abdomen under the ribs. This should help you better delineate what is going on. Let's get to it.

Causes of pain under the left ribs or rib cage:

1. Indigestion


  • Pain in the upper abdomen, including below the left ribs and the upper, middle abdomen
  • Feeling full during a meal
  • Feeling uncomfortably full after a meal
  • Nausea
  • Bloating
  • Heartburn

Indigestion (dyspepsia) is an inflammation of the stomach, which starts on the left side of the abdomen and ends in the middle, upper section of the abdomen. Your eating habits often cause it. It can occur if you eat too much or too quickly, eat greasy or spicy food, or drink too much caffeine, alcohol, or carbonated drinks.

Smoking and anxiety can also cause indigestion. Certain medications (antibiotics, pain relievers) and vitamin and mineral supplements can also trigger this condition.

How you treat your indigestion depends on what caused it. If you follow these tips for two weeks and don’t notice any improvement, see your doctor to rule out more serious conditions.

  • You may need to eat smaller, lighter meals and eat them more slowly.
  • Avoid spicy and greasy foods, caffeinated and carbonated drinks, and alcohol, as these can irritate your stomach.
  • Quit smoking.
  • Try to manage stress with techniques such as meditation.
  • If you think that a medication is causing indigestion, talk to your doctor about taking a different drug that may be easier on your stomach.

Pro Tip

Some patients think the longer they have symptoms, the worse it must be. While any time you have symptoms lasting more than 2 weeks you should discuss it with your doctor, it does not necessarily mean your symptoms are more life threatening. —Dr. Chandra Manuelpillai

2. Constipation


Constipation occurs when bowel movements become harder, more difficult to pass, and/or happen less frequently than normal. It’s common to get constipation for short periods of time. However, for some people, constipation can be a chronic problem. When constipation is chronic enough, it can back up all the way to the upper left abdomen area, where the descending colon starts to make its way down to the anus.

Constipation is usually caused by a low-fiber diet, not drinking enough water, and lack of exercise.

How you treat constipation depends on what caused it.

  • Eat more foods rich in fiber (such as fruit and vegetables)
  • You may need to take a fiber supplement
  • Drink more water
  • Get more exercise
  • Set up a “bowel routine” by trying to have a bowel movement at the same time each day

3. Ulcer


  • Pain in the upper abdomen, including below the ribs
  • Bloating
  • Inability to tolerate fatty foods
  • Heartburn
  • Nausea

An ulcer is a sore that develops in the stomach (peptic ulcer) or small intestine (duodenal ulcer). The sores form when the acids that help digest your food eat away at the lining of either organ.

Some ulcers develop due to a chronic infection of H. pylori, a type of bacteria. It’s not known how H. pylori infections spread, but it may happen through close contact (such as kissing), water, or food.

Other ulcers are caused by regularly using certain medications. Nonsteroidal anti-inflammatories (Advil, Aleve, indomethacin) are the most common culprits.

Treatment depends on what caused your ulcer. If it’s due to H. pylori, you’ll be prescribed antibiotics. If a medication you take caused your ulcer, your doctor will likely lower your dose or switch you to a different medication. They may also recommend medications that block or reduce the amount of acid your body produces.

4. Gastritis


  • Pain in your upper abdomen that may get better or worse when you eat
  • Nausea
  • Vomiting
  • A feeling of fullness in your upper abdomen after eating

Gastritis is an inflammation of the lining of your stomach. It may occur suddenly (acute gastritis) or gradually (chronic gastritis).

The causes of gastritis are the same as those of ulcers: H. pylori infection or regular use of certain medications. Drinking too much alcohol can also cause gastritis.

Treatment is similar to that of ulcers. If your gastritis was caused by drinking alcohol, you may need to cut down on or stop drinking.

5. Side stitch


  • Sharp and/or crampy abdominal pain on the right or left side under the rib cage
  • Sudden onset

Side stitches usually occur when you’re exerting yourself, such as when you run. The sudden, sharp pain appears under the rib cage or on your left or right side.

The cause of side stitches is unknown. Experts think it may be related to not drinking enough, drinking sugary drinks, or eating too much or too soon before you exercise. You may also experience a side stitch if your abdomen and/or diaphragm are irritated.

You can relieve the pain of side stitches by resting, stretching, and drinking water.

6. Splenic flexure syndrome


  • Sharp pain sharp pain under left rib cage (splenic)
  • Pain that worsens when inhaling
  • Bloating
  • Constipation
  • Increased gas
  • Belching

Like hepatic flexure syndrome, splenic flexure syndrome occurs when gas or stool become trapped in the splenic flexure. This is in the upper left part of your abdomen (over your spleen). This creates pain under the left rib cage.

Splenic and hepatic flexure syndrome are not dangerous, but they can be extremely painful.

They can be treated with over-the-counter pain and gas-relief medications. Constipation can be treated with laxatives if necessary. Stretching that affects the abdomen, like certain yoga poses, may also help you release the gas. The best way to prevent them is to avoid gas-producing foods such as beans, broccoli, and dairy products.

7. Kidney stones


  • Severe pain, sharp and cramping in the back, below the ribs, or in the groin area
  • Pain during urination - sharp, intense and described as a burning sensation
  • Pink, red, or brown urine - caused by blood in the urine
  • Cloudy or foul-smelling urine
  • Nausea and vomiting
  • Frequent urination
  • Urinating small amounts
  • Fever and chills

Kidney stones are deposits made of minerals and salts that form in the kidneys. When the stones are small and can pass through the urinary system, you might not notice the stone at all. However, if the stone is large enough to get stuck along the exit path, excruciating pain and a myriad of symptoms (see above) occur depending on where in the system the stone is stuck. In the case of pain under the ribs, if a kidney stone is the culprit, the deposit is stuck up inside the kidney.

Immediate medical attention is recommended if you experience excruciating pain, difficulty passing urine, blood in your urine, or signs of infection such as fever and chills. Persistent symptoms that disrupt your daily activities also warrant visiting a healthcare provider.

Treatment varies based on the stone's size and type. Small stones typically require hydration and pain relievers to pass through the urinary system. Larger stones might need more invasive treatments, such as shock wave lithotripsy, ureteroscopy, or even surgery. Preventative strategies include staying hydrated, maintaining a balanced diet, and avoiding high-oxalate foods if recommended by your doctor.

8. Pneumonia


  • Difficulty breathing that may worsen when you’re active
  • Sharp chest pain that is worse when inhaling and coughing
  • Shortness of breath
  • Fatigue
  • Fever and chills
  • Nausea
  • Vomiting
  • Diarrhea
  • Pain under the left or right ribs or rib cage

Pneumonia is an inflammation of the lungs. It is caused by a bacterial or viral infection. Pneumonia may be mild or life-threatening. It is most serious in infants, young children, people older than age 65, and people who have a weak immune system. The lungs sit underneath the ribs/rib cage. Pain here can be caused by pneumonia in cases where the infection causes of leakage of fluid that inflames the sack surrounding the lungs, called the pleura.

If you think you have pneumonia, see your doctor.

Treatment depends on the type of pneumonia you have. Antibiotics are used to treat bacterial pneumonia but not viral pneumonia. Your doctor may also recommend treating your symptoms with cough medicine and fever and pain relievers like ibuprofen or acetaminophen.

Bacterial infections often improve within a few days of starting antibiotics. However, it may take weeks or months to fully recover from both bacterial and viral pneumonia.

9. Pulmonary embolism


A pulmonary embolism (PE) is a blood clot in a blood vessel in the lungs. PE blocks blood flow to your lungs and lowers the level of oxygen in your blood. The lungs may become damaged. Since the lungs sit under the ribs, this can manifest as pain under the right or left ribs.

These clots usually don’t form in the lungs. Instead, they develop in the lower leg, then break off and travel through your blood vessels to your lungs. Blood clots in the leg are called deep vein thrombosis (DVT). People with DVT may also have leg pain and swelling.

PE and DVT are life-threatening conditions. If you have symptoms, call 911 or go to the ER immediately.

Treatment depends on the severity of the clot. A large, life-threatening clot may require surgery or clot-dissolving medications called thrombolytics. Less dangerous clots can be broken up by your body with the help of blood-thinning medications called anticoagulants.

Causes of pain under the right ribs or rib cage:

1. Gallbladder disease


  • Pain in the right upper abdomen
  • Pain that worsens when you breathe in, press on the right side of your upper abdomen, and after you eat fatty foods
  • Nausea and/or vomiting
  • Fever and/or chills
  • Yellowing of skin and whites of eyes
  • Dark urine
  • Clay-colored stools

Conditions that affect the gallbladder cause pain under the ribs on your right side because that is where the gallbladder is located. The gallbladder stores bile, which is necessary for digestion.

Gallstones are a common cause of gallbladder pain. These stones may be as small as a grain of sand or as large as a golf ball. You may develop just one gallstone or several at the same time.

It isn’t clear why gallstones occur. It may be that your gallbladder has a problem releasing bile. Or your bile may contain too much cholesterol or a chemical called bilirubin.

Sometimes gallstones don’t cause any symptoms. Sometimes, when the gallstones are blocking your gallbladder from releasing bile, they cause pain in the right upper belly right under the ribs. You may also have nausea or vomiting. It is often worse after eating.

If the gallstone remains stuck, you may develop an infection called cholecystitis. This causes inflammation of the gallbladder. If cholecystitis is untreated, it can cause life-threatening problems such as gallbladder rupture and severe infections.

The treatment of gallstones depends on how severe your symptoms are and how often they occur. If the pain is mild and occurs only occasionally, treatment may be as simple as taking pain medication and avoiding fatty foods.

If you get symptoms often or your symptoms are severe, you may need to have surgery to remove your gallbladder. If your gallbladder becomes infected, you will need to be admitted to the hospital for antibiotics, IV fluids, and pain medications. You’ll likely have to have your gallbladder removed as well.

Pro Tip

The ribs are a very important structure in our body. They protect multiple of our vital organs including those in our chest wall, such as the heart and lungs, as well as those in the upper abdomen including the diaphragm, stomach, liver, gallbladder, and spleen. —Dr. Manuelpillai

2. Hepatic flexure syndrome


  • Sharp pain under right rib cage (hepatic, or liver)
  • Pain that worsens when inhaling
  • Bloating
  • Constipation
  • Increased gas
  • Belching

Hepatic flexure syndrome is caused by trapped gas or stool in your intestines, like splenic flexure syndrome but on the other side. The large intestines have two significant turns, once under the liver (hepatic flexure) and once under the spleen (splenic flexure).

In hepatic flexure syndrome, the gas or stool is trapped in the hepatic flexure (over the liver). This is located in the upper right part of your abdomen, creating an uncomfortable feeling under the right rib cage.

As described above in regards to splenic flexure syndrome, hepatic flexure syndrome can be treated with over-the-counter pain and gas-relief medications while constipation can be treated with laxatives.

3. Kidney stones

The kidneys sit on both the left and right sides of the body (unless there's an anatomical anomaly or removal). As mentioned above in the left ribs section, kidney stones cause significant pain, frequent urination, changes in the color or smell of your urine, and fever/chills. You should seek emergency care if you think you have a kidney stone, as a delay can permanently damage the kidneys. Treatment varies from symptomatic for minor stones to procedures for larger stones.

4. Pneumonia

As mentioned above, pneumonia can cause pain under the right ribs since the lungs sit beneath the ribs. An infection in the right lung that causes inflammation in the pleural sac (the lining outside of the lung) leads to a sharp discomfort, likely worse when breathing in. This is in addition to the classic symptoms of pneumonia such as cough, fever, muscle aches, and fatigue.

6. Pulmonary embolism

Like pain under the left ribs, a pulmonary embolism can cause pain in the right side if the right lung is where the blood clot landed. Difficulty breathing, pain worse when breathing, fever, chest pain, a bloody cough, and a racing heart beat are all symptoms in addition to pain below the right rib cage. This is a life-threatening emergency and needs to be treated immediately.

Causes of pain in the upper, middle abdomen below ribs



  • Heartburn
  • Regurgitation of acidic/sour material
  • Chest pain or pain in the upper, middle abdomen
  • Difficulty swallowing
  • Sore throat
  • Hoarse voice

Gastroesophageal reflux disease (GERD) is when acid in the stomach travels back up the esophagus and causes symptoms. It is a very common disorder and reported in up to 28% of the population in North America. GERD typically is described as a burning pain in the chest or middle, upper abdomen where the esophagus connects to the stomach (in its path coming from the mouth).

Everyone has some amount of reflux but it usually does not cause bothersome symptoms. There is a muscle in between the esophagus and stomach, the lower esophageal sphincter (LES), that helps to prevent food or acid from going back up. When the LES is weakened, acid can travel up the esophagus more easily and cause symptoms.

Treatment can include lifestyle modifications, over-the-counter medications for milder symptoms, or prescription medications for more severe symptoms. Lifestyle modifications include changing what you eat, like fatty or spicy food, and avoiding triggers that worsen your reflux symptoms. Weight loss and not smoking are also important lifestyle modifications.

OTC medications include antacids like Tums or Milk of Magnesia or Pepto-Bismol. Prescription medications include histamine 2 receptor antagonists (H2RA) or proton pump inhibitors (PPI). These medications decrease the amount of acid produced in the stomach, which helps to decrease symptoms. PPIs are prescribed for more severe symptoms.

2. Pancreatitis


  • Upper abdominal pain which may radiate to the back and worsen when lying flat on your back and after eating
  • Nausea and vomiting
  • Fever
  • Fast heart rate
  • Tenderness or swelling in the upper abdomen
  • Oily, smelly stools

Pancreatitis is an inflammation of the pancreas that can occur in acute or chronic forms. Immediate medical attention is required if you experience severe abdominal pain that doesn't go away, is accompanied by nausea and vomiting, or if you have any of the other symptoms listed above. Pancreatitis can become life-threatening if not treated promptly.

Treatment for pancreatitis usually entails hospitalization, IV fluids to prevent dehydration, pain control, fasting to rest the pancreas, antibiotics, surgery (in cases caused by gallstones), and slow re-introduction of food.

3. Indigestion

With the stomach spanning the area under the left ribs and ending in the middle, upper abdomen, indigestion can cause pain all along that area. The diagnosis of indigestion is primarily based on symptoms and physical exam and is treatable with lifestyle changes like quitting smoking, eating smaller meals, and cutting out foods that lead to discomfort.

4. Gastritis

As mentioned above, gastritis refers to the inflammation of the stomach lining. This condition can cause a variety of symptoms, with one of the most common being pain or discomfort in the upper part of the abdomen. The pain associated with gastritis is typically located in the mid to upper region of the abdomen, which corresponds to the anatomical location of the stomach.

Other possible causes

There are other conditions that may also cause pain in the mid-upper abdomen, but it is usually not one of the main symptoms:

  • Heart attack (pain is usually in the chest but may be in upper abdomen)
  • Abdominal aortic aneurysm (searing abdominal pain that radiates to the back)

When to call the doctor

  • Symptoms don’t improve after 1 week

Dr. Rx

The more details you include, the easier it is to determine the cause of your symptoms. So make sure you include the location of your pain and if it seems to move or radiate to another location, pain description (sharp, dull, burning, pressure, etc), how long it lasts, when it occurs (after eating, with exertion, etc), if anything makes it better or worse, and any associated symptoms. —Dr. Manuelpillai

Should I go to the ER for pain below the ribs?

You should go to the ER if you have the following:

  • Sudden severe abdominal pain
  • Uncontrolled vomiting
  • Unable to eat or drink
  • Vomiting blood or a substance that looks like ground coffee
  • Coughing up blood
  • Bloody or black diarrhea
  • Dizziness or confusion
  • Blue lips or nail beds
  • Heart palpitations
  • Chest pain
  • Upper abdominal pain that radiates to the jaw, neck, or arm
  • Upper abdominal pain with dizziness, sweating, chest pain, or difficulty breathing
  • Fever with yellowing of the skin and whites of eyes


At-home care

  • If the pain is from a digestive issue like indigestion, over-the-counter antacids and other acid blockers can help.
  • If the pain is from constipation, lifestyle changes like eating more fiber, drinking more water, and exercising can help. Use of over-the-counter stool softeners can provide additional relief.
  • Avoid certain foods that are likely to cause gas and/or irritate your stomach, such as fatty and spicy foods.
  • Limit your use of medications that can lead to ulcers (if that’s not possible, ask your doctor if you can switch to a different medication).
  • Gentle stretching or light exercise may help to alleviate pain and reduce muscle tension. However, be sure to avoid any activities that may exacerbate the pain.
  • Apply heat or ice: Depending on the cause of the pain, applying heat or ice to the affected area may help to reduce pain and inflammation. You can use a heating pad, warm towel, or ice pack for 10-20 minutes at a time, several times a day.
  • Practice deep breathing: Taking slow, deep breaths can help to relax the muscles in the area and may help to alleviate pain.


What if I have dull pain under the right rib cage as a female?

If you're experiencing dull pain under your right rib cage, it could be due to various reasons. Common causes in women include gallbladder issues like gallstones, liver conditions, or musculoskeletal problems such as strained muscle. Other possibilities include kidney infections, gastrointestinal disorders, and in rare cases, heart or lung issues. Gynecological factors, including ovarian cysts, should also be considered.

What if the pain is on the right side under the ribs?

Pain on the right side under the ribs or rib cage can indicate various health issues, as several important organs are in this area. These include the liver, the largest internal organ, playing a vital role in metabolism and detoxification; the gallbladder, which stores bile necessary for digestion; and part of the pancreas, involved in both digestive and hormonal functions. Also located on the right side are parts of the intestines, including the ascending colon, which can be sources of pain due to gastrointestinal issues. The right kidney, though positioned more towards the back, can cause pain in this area if affected by conditions like infections or stones.

So, pain on the right side under the ribs or under the right rib cage includes gallbladder problems like gallstones or inflammation, liver conditions such as hepatitis, or musculoskeletal injuries like a strained muscle. Kidney disorders, including infections or stones, may also present with pain in this area. Less commonly, this pain could be related to gastrointestinal issues like ulcers or pancreatitis; in rare cases, it could signal lung or heart problems.

An ache on the right side under the ribs suggest the liver, gallstones, colon, or rarely the heart or pancreas. Sharp pain suggests the kidney, a gallbladder infection, ulcers, or pancreatitis.

What if the pain is on the left side under the ribs?

If you're experiencing pain on the left side under your ribs, it's important to consider the organs located in this area, as the pain could be associated with various conditions. Key organs on the left side include the stomach, which is involved in digestion and can be a source of pain due to issues like gastritis or ulcers; the spleen, important for blood filtration and immune responses, susceptible to enlargement or injury; part of the pancreas, playing a role in digestion and insulin production; and the left kidney, which filters waste from the blood and can be affected by conditions such as infections or stones.

What if the pain under my ribs goes towards my back?

Pain under the ribs that radiates towards the back can indicate issues with several organs in this region. Such pain is commonly associated with kidney problems, such as kidney stones or infections, given the kidneys' position against the back. Another potential source is the pancreas; conditions like pancreatitis can cause pain in the abdomen that extends to the back. Additionally, gastrointestinal issues, including ulcers and gallbladder disorders, can also manifest as pain spreading from the rib area to the back. Last, the aorta sits behind the abdomen and can cause pain that radiates to the back, although this usually manifests as severe abdominal pain that moves to the back. Most of the above explanations are very serious; so you should talk to a doctor immediately.

Hear what 5 others are saying
Once your story receives approval from our editors, it will exist on Buoy as a helpful resource for others who may experience something similar.
The stories shared below are not written by Buoy employees. Buoy does not endorse any of the information in these stories. Whenever you have questions or concerns about a medical condition, you should always contact your doctor or a healthcare provider.
WorriedPosted January 16, 2024 by B.
Sometimes experience sharp pains under lower rib cage ,both sides,jabbing pain on rapid movement then goes away!!
दवाई का नामPosted January 8, 2024 by स.
मुझे जादा खासी आई थी अब दर्द हौ रहा हे पसली के नीचे भाग मे कौई ईन्फेक्शन हुआ ह क्या
TestingPosted December 11, 2023 by N.
ChatGPT live test here
Dr. Manuelpillai is a board-certified Emergency Medicine physician. She received her undergraduate degree in Health Science Studies from Quinnipiac University (2002). She then went on to graduated from Rosalind Franklin University of Medicine and Sciences/The Chicago Medical School (2007) where she served on the Executive Student Council, as well as was the alternate delegate to the AMA/ISMS-MSS G...
Read full bio

Was this article helpful?

326 people found this helpful
Tooltip Icon.
Read this next
Slide 1 of 4