Pain under your right rib cage isn't uncommon, but figuring out the culprit can take some trial and error. The area underneath your right rib is home to several major organs, including your pancreas, gallbladder, right kidney, liver and small and large intestines.
Determining which body part might be affected and how serious the problem is involves paying close attention to your symptoms, and in many cases, seeking medical attention. "There are many possible causes of pain under the right rib cage. It's a problem that primary care doctors encounter from time to time, but it can also present in the ER," says Louis Morledge, MD, an internist with Lenox Hill Hospital in New York.
Video of the Day
Here's a list of some of the most likely causes of discomfort on the right side under your ribs and when to consider seeing a doctor.
Trauma or injury to your right rib, like a pulled muscle or a bruised or broken rib, can cause severe pain that's concentrated in that area. It might be sharp or hurt more when you move or touch the area, Dr. Morledge says.
Most often, the cause is a car accident, fall or contact sports, per the Mayo Clinic.
How to treat it: See a doctor, who may want to run an X-ray to diagnose the extent of the injury. A broken rib can heal on its own in about six weeks, but you'll need to rest and ice the area regularly to help it heal properly and without complications. Your doctor might also recommend doing breathing exercises. The pain of a rib injury might keep you from breathing deeply, which can increase your risk for pneumonia.
You can also ask your doctor about prescription or over-the-counter pain relievers, which can help ease your discomfort as your rib heals.
2. Gallbladder Conditions
Gallbladder problems top the list of possible causes of pain under the right rib. "It could be related to gallstones or inflammation of the gallbladder," Dr. Morledge says.
Your gallbladder stores bile, a digestive fluid produced by your liver. Several gallbladder conditions can cause right rib cage pain:
Gallstones are hardened bits of bile that can form in the gallbladder. Most people with gallstones don't realize they have them, but in some cases gallstones can block the flow of bile and cause inflammation and pain under the right rib cage that can radiate out toward the right arm or shoulder, according to the Cleveland Clinic.
The pain usually eases up after a few hours once the blockage clears, but if it doesn't clear, you may start to develop a fever, chills or increased heart rate.
How to treat it: Most gallstones don't require treatment, but stones that cause repeated blockages should be surgically removed to reduce the risk of future complications. In some cases, certain medications can also help dissolve small gallstones.
Other Gallbladder Conditions
Right-side upper abdominal pain sometimes signals a less common gallbladder condition, such as an infection or cancer of the gallbladder or a nearby organ like the liver or pancreas.
How to treat it: See your doctor, who can perform the appropriate tests to diagnose the problem and discuss your treatment options.
3. GI Conditions
Because parts of your GI tract sit under your right rib, it's possible that pain, discomfort or cramping on the right side under your ribs could stem from a GI issue, Dr. Morledge says.
Indigestion is a term for upper abdominal discomfort, which can happen on your right or left side (or both). It's typically caused by overeating, anxiety, stomach infections and a number of other possible conditions, and it's marked by feeling uncomfortably full after eating just a little bit, nausea, pain between your breast bone and bellybutton and a burning or bloating feeling, according to the Mayo Clinic.
How to treat it: Eating smaller, more frequent meals, avoiding fatty foods, managing stress and taking over-the-counter meds like antacids can help manage mild indigestion, per the Mayo Clinic, which will typically clear up in a week or two. But if your symptoms linger beyond that, make an appointment with your doctor.
GERD (short for gastroesophageal reflux disease) occurs when stomach contents splash up into the esophagus, often causing a burning feeling (think: heartburn) in your chest or back. Over time, GERD can lead to trouble swallowing, a sore throat or persistent coughing, according to Johns Hopkins Medicine.
Certain foods or medications can trigger GERD, as can pressure on the abdomen, like during pregnancy.
How to treat it: Start by avoiding possible reflux triggers, such as fatty or spicy foods, and try not to eat meals close to bedtime, as lying down after eating can make GERD worse. If lifestyle changes like this don't help, talk to your doctor to see if an over-the-counter or prescription antacid is right for you.
IBS or IBD
While very different conditions, both irritable bowel syndrome (IBS) and irritable bowel disease (IBD) can cause abdominal pain and bloating that could extend up toward your right rib cage, along with gas, constipation or diarrhea.
Irritable bowel syndrome is a chronic GI disorder that causes uncomfortable symptoms and is typically managed with lifestyle changes.
Irritable bowel diseases like Crohn's disease and ulcerative colitis are more serious and can lead to rectal bleeding, weight loss and sometimes colon cancer if they're not well managed, according to the Centers for Disease Control and Prevention (CDC).
How to treat it: See your doctor if you suspect you could have IBS or IBD. IBS will likely require dietary changes to keep symptoms in check, while IBD typically is treated with medication and sometimes surgery, according to the CDC.
Gastritis is a general term for inflammation of the lining of the stomach, which can stem from a stomach infection, injury, taking NSAID pain relievers too often, drinking too much alcohol or even extreme stress, according to Johns Hopkins Medicine. It can cause pain in your upper abdomen (on the right or left side) along with nausea, vomiting, burping or hiccupping, and a feeling of fullness after eating.
How to treat it: Sometimes gastritis will go away on its own; your doctor might recommend taking an over-the-counter antacid to reduce your discomfort in the meantime. You'll need antibiotics if the gastritis is caused by a bacterial infection like H. pylori.
The appendix is a small, finger-shaped pouch located in your lower right abdomen. Appendicitis, when the appendix becomes inflamed, typically causes sudden pain on the lower right side that gets worse with jarring movements (like coughing or jumping), per the Mayo Clinic. Pregnant people with appendicitis might notice pain higher up on their right side, closer to the rib cage.
How to treat it: Seek medical attention if you think you have appendicitis. In most cases, treatment requires surgery to remove the appendix, and waiting too long could increase the risk for life-threatening infection.
Your pancreas is a long, flat gland that sits behind your stomach in your upper abdomen, according to the Mayo Clinic. Pancreatitis happens when the gland becomes inflamed, and it can be acute or chronic. It usually causes pain under your left rib cage, but the pain can sometimes be felt on the right side instead.
Other symptoms, per the Mayo Clinic, include pain that radiates to your back, a tender abdomen, fever, a fast heartbeat and nausea or vomiting.
Several things can cause pancreatitis, including alcohol abuse, gallstones, pancreatic cancer, obesity and an infection or injury. Smoking, diabetes and a family history of pancreatitis also put you at higher risk.
How to treat it: Acute pancreatitis can last for several days, while chronic pancreatitis can last for years. Either way, you should see your doctor for treatment, as pancreatitis can cause serious complications.
4. Lung Conditions
A muscle called the diaphragm separates your chest and abdominal cavities in your lower rib cage area. On the right side of your body, your right lung sits atop the diaphragm and the liver is just below the muscle, according to the National Institutes of Health. As such, lung conditions affecting the right lower lung can sometimes cause irritation and pain under the right rib cage. These could include:
Pneumonia is an infection that causes the air sacs in one or both lungs to become inflamed. It can develop from viral upper-respiratory infections such as the flu, a cold or COVID-19.
Symptoms of pneumonia can range from mild to severe and may include fever or chills, a cough with greenish or blood-tinged mucus, shortness of breath and sharp or stabbing chest pain that gets worse when you take a deep breath, according to the American Lung Association.
How to treat it: Bacterial pneumonia usually requires antibiotics, while viral pneumonia may go away on its own with rest and fluids (although your doctor might prescribe an antiviral medication in some cases).
Pleurisy is an inflammation of the lung lining caused by an infection — a viral infection like the flu or a bacterial infection such as pneumonia. It usually causes sharp, stabbing chest pain that comes from one specific place, and it gets worse when you breathe or cough. The pain can be so severe that you might breathe carefully to try to manage the discomfort, according to the Cleveland Clinic.
How to treat it: Pleurisy is treated based on the underlying cause. Some bacterial infections will require antibiotics. On the other hand, your doctor may recommend pain relievers or corticosteroids to manage your symptoms. If fluid builds up in your lungs, you may need to have it drained.
5. Kidney Conditions
The upper part of each kidney sits at the level of your lowest ribs in the back of your body. Certain conditions involving your right kidney can, therefore, cause pain in your right flank — the area starting at the lower rib cage next to your spine and wrapping around your side, possibly extending to the front of your abdomen, per the National Institute of Diabetes and Digestive and Kidney Diseases.
Possible culprits can include:
- Pyelonephritis, an infection of the right kidney
- A right-sided kidney stone
6. Liver Disease
Like the gallbladder, your liver resides in your right upper abdomen beneath your lower ribs and can cause pain in this area. According to the American Liver Association, examples of liver diseases that can cause right rib cage pain include:
- Hepatitis, liver inflammation most commonly caused by a viral infection or long-term alcohol use
- Liver abscess, a pocket of infection and accumulated pus
- Liver tumors, including noncancerous growths, liver cancer and cancer that has spread from another organ to the liver
- Abnormalities of the liver blood vessels, such as Budd-Chiari syndrome or hepatic hemangioma
7. Cardiovascular Problems
Heart-related pain is more likely to occur under your left rib cage than your right, Dr. Morledge explains. But "it's a distant possibility" that pain in your right side under the ribs could be a sign of a cardiovascular problem.
A heart attack happens when a clogged artery blocks the flow of blood to the heart. The symptoms of a heart attack usually include chest pressure or tightness; pain that spreads to the shoulder, jaw or upper abdominal area; a cold sweat; dizziness; nausea or shortness of breath, according to the Mayo Clinic.
How to treat it: A heart attack is a life-threatening emergency. If you think you're having a heart attack, call 911 immediately.
A type of chest pain caused by temporary reduced blood flow to the heart, angina symptoms often feel similar to a heart attack, and the condition can progress to a heart attack. Unlike a heart attack, though, the symptoms of angina can come and go, according to the Cleveland Clinic.
How to treat it: Angina stems from heart disease, so you should treat it seriously. Rest or medications like nitroglycerin can often ease angina pain, but your doctor will likely recommend lifestyle changes or other medications to lower blood pressure or cholesterol, which will help treat the larger problem.
Pericarditis or endocarditis are two types of heart infections that occur when parts of the heart become inflamed. They're often caused by infections like pneumonia. You might feel a sharp or stabbing pain in the chest or upper abdomen that gets worse when you lie down, cough or take a deep breath.
How to treat it: See a doctor if you think you have a heart infection. They might prescribe you an anti-inflammatory medication to reduce the inflammation around your heart or other drugs — such as antibiotics or antifungals — to help clear the infection, according to the National Institutes of Health.
How to Treat Discomfort or Pain Below Your Right Rib Cage
How you treat pain on your right side under your ribs depends on the underlying cause, Dr. Morledge says. If you're not sure what's causing the discomfort, make an appointment with your doctor, who will ask about your symptoms and possibly run tests to come to a diagnosis.
If you suspect the pain stems from an injury, start by resting and applying ice to the area, per the Mayo Clinic. You can also take an over-the-counter pain reliever like acetaminophen or ibuprofen. "If those measures relieve the pain, it's possible that the problem could be a musculoskeletal issue," Dr. Morledge says.
If not, then it may be that one of the organs under your right rib cage is causing the problem.
When Should You Worry About Pain on Your Right Side Under Your Ribs?
Pain under the right ribs isn't always cause for concern, and sometimes the underlying problem will go away on its own with time. But in other cases, the discomfort could signal a more serious problem.
According to Dr. Morledge, you should seek medical attention if:
- The pain started after an injury
- The pain is sudden, severe or accompanied by other symptoms, such as a fever, rash, vomiting, shortness of breath or a mass you can feel with your fingers
- The pain hasn't gotten better after a day or two
- Merck Manual Professional Version: Acute Abdominal Pain
- American Family Physician: Evaluation of Acute Abdominal Pain in Adults
- Michigan State University: Differential Diagnosis of Acute Right Upper Quadrant Pain
- Ultrasound: A Practical Approach to Clinical Problems
- Medical Institution: Abdominal Pain Differential Diagnosis
- Merck Manual Professional Version: Acute Cholecystitis
- Mayo Clinic: "Broken Rib"
- Cleveland Clinic: "Gallstones"
- Mayo Clinic: "Indigestion"
- Johns Hopkins Medicine: "Gastroesophageal reflux disease"
- Johns Hopkins Medicine: "Gastritis"
- Mayo Clinic: "Appendicitis"
- National Institutes of Health: "Diaphragm"
- American Lung Association: "Pneumonia Symptoms and Diagnosis"
- Cleveland Clinic: "Pleurisy"
- National Institute of Diabetes and Digestive and Kidney Diseases: "Your Kidneys & How They Work"
- American Liver Association: "About Your Liver"
- Mayo Clinic: "Heart Attack"
- Cleveland Clinic: "Angina"
- National Institutes of Health: "Pericarditis"
- Mayo Clinic: "Pancreatitis"
Is this an emergency? If you are experiencing serious medical symptoms, please see the National Library of Medicine’s list of signs you need emergency medical attention or call 911.