Skip to main contentSkip to accessibility services
10 min read
No Ads

Pain Below the Ribs

Pain below your ribs is usually indigestion, stomach ulcer, gallstones, or constipation.
Tooltip Icon.
Last updated March 22, 2021

Try our free symptom checker

Get a thorough self-assessment before your visit to the doctor.

One way to skip the doctor's office.

Get a US board-certified doctor to review your symptoms right now and tell you if it is caused by GERD, IBS, or constipation. You will receive a treatment medication today so you can start getting better.

Start virtual exam

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.

1. Splenic or hepatic flexure syndrome


  • Sharp pain or cramps under the left or right side of the ribs
  • Pain that worsens when inhaling
  • Bloating
  • Constipation
  • Increased gas
  • Belching

Splenic and hepatic flexure syndromes are caused by trapped gas or stool in your intestines. Flexures are areas of the intestine that make sharp turns.

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). 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.

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.

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.

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

Feeling backed up?

Let a doctor tell you if constipation is causing your pain. $25 to get a doctor's diagnosis. And if needed, you'll get a prescription, too.

Find out the cause of your pain

3. Indigestion

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


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

Indigestion (dyspepsia) is often caused by your eating habits. 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.

4. 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.

5. 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.

One way to skip the doctor's office.

Get a US board-certified doctor to review your symptoms right now and tell you if it is caused by GERD, IBS, or constipation. You will receive a treatment medication today so you can start getting better.

Start virtual exam

6. Gallbladder disease

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


  • 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.

7. Side stitch


  • Sharp and/or crampy abdominal pain, usually on the left or right side

Side stitches usually occur when you’re exerting yourself, such as when you run.

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.

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

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.

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.

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, you should 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.

Other possible causes

There are other conditions that may also cause pain below the ribs, but it is usually not one of the main symptoms:

One way to skip the doctor's office.

Get a US board-certified doctor to review your symptoms right now and tell you if it is caused by GERD, IBS, or constipation. You will receive a treatment medication today so you can start getting better.

Start virtual exam

When to call the doctor

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

  • Symptoms don’t improve after 1 week

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, over-the-counter stool softeners can help.
  • 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).
  • If your pain is from constipation, eat more fiber, drink more water, and exercise regularly.
Hear what 1 other is saying
Concerned about rib painPosted June 30, 2021 by M.
I am a 52-year-old female who was just diagnosed with autoimmune hepatitis, but I have known that something was wrong for over a year and a half. The specialist I am seeing is trying to get my liver in remission with prednisone and another medication. My liver enzymes are returning to normal levels with medications, but I have a constant pain under my right rib cage. Sometimes, it makes it hard to breathe. I thought it was my liver pain. I am a flight attendant, so when you get to 37,000 feet, your body naturally expands, causing more pain and trouble breathing. The pain is a dull ache. It feels as though someone is squeezing my right side. I am supposed to have a CT scan in 2 and a half weeks but I wonder if I should be more concerned and try to get one sooner.

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 Governing Council and the student representative to the Illinois State Medical Society (ISMS) Education and Health Workforce committee. She completed an internship year with UCLA-Harbor Medical Center's Department of Internal Medicine followed by an emergency medicine residency program at Boston Medical Center (2011) while also serving as the resident representative to the Massachusetts Medical Society (MMS) committee on Student Health & Sports Medicine. She then started working at Saints Medical Center (later Lowell General Hospital/Saints Campus and Main Campus) in Lowell Massachusetts where she served as the Continuous Quality Improvement Director for the emergency medicine group, as well as was the representative for the emergency department on the Sepsis, Stroke and PCI Quality Assurance and Compliance Committees. She joined Buoy Health in 2019. She currently works in multiple emergency departments both in the community and academics, as well as previously worked in multiple urgent care centers. She believes this mix of experiences has given her a unique perspective on the care of acute illnesses.

Was this article helpful?

19 people found this helpful
Tooltip Icon.
Read this next