Pain under or around your right rib cage can come from the muscles between your ribs, the organs tucked behind them, or even structures you wouldn’t expect, like your kidneys. The right side of your rib cage shelters your liver, gallbladder, part of your right kidney, and the lower edge of your right lung, so the list of possible causes is longer than on the left side. What the pain feels like, when it shows up, and how long it lasts are the best clues to narrowing it down.
Muscle Strain Between the Ribs
The most common and least worrisome cause is a pulled intercostal muscle, the small muscles that run between each rib and help you breathe and twist. You can strain them by coughing hard, lifting something heavy overhead, or doing any repetitive twisting motion like golf swings, tennis strokes, rowing, or even painting a ceiling. Sometimes the cause is nothing more dramatic than sleeping in an awkward position.
The hallmark of an intercostal strain is pain that gets worse when you cough, sneeze, take a deep breath, or twist your upper body. You’ll often feel a specific tender spot you can press on. Mild strains typically heal within a few days. Moderate ones can take three to seven weeks, and a complete tear may take longer. Most rib muscle injuries resolve within about six weeks.
Costochondritis
Costochondritis is inflammation where your ribs attach to your breastbone through cartilage. It can feel alarmingly like a heart or lung problem, but it’s a surface-level issue in the chest wall. The onset is usually gradual, and more than 90 percent of people with costochondritis have tenderness at multiple rib junctions, not just one. A history of repeated minor strain or unaccustomed activity, like moving furniture, is common.
The pain worsens with trunk movement, deep breathing, or exertion, and it eases when you stay still and breathe quietly. Many people don’t even realize their chest wall is tender until someone presses on the spot during an exam. Costochondritis is different from Tietze syndrome, which looks similar but involves visible swelling, warmth, and redness over the affected joint.
Gallbladder Pain
Your gallbladder sits just beneath your liver, right under the lower edge of your right rib cage. When a gallstone temporarily blocks the duct that drains bile, the result is biliary colic: a steady, intense ache under the right ribs that can radiate to your right shoulder or back. An episode lasts anywhere from 20 minutes to a few hours and often strikes shortly after a large or fatty meal. Fats entering your small intestine trigger the gallbladder to squeeze, and if a stone is in the way, that squeeze becomes painful.
Gallbladder pain tends to come and go in distinct episodes rather than lingering as a constant soreness. If the duct stays blocked and the gallbladder becomes inflamed (acute cholecystitis), the pain persists, often with fever and nausea. In that situation, surgical removal of the gallbladder is the standard treatment. Current guidelines recommend performing the procedure within a few days of symptom onset when possible.
Liver-Related Causes
The liver itself doesn’t have pain-sensing nerves inside it, but it’s wrapped in a thin capsule that does. When the liver swells for any reason, that capsule stretches, and you feel a dull ache or fullness under the right ribs. The liver spans from roughly the fifth rib down to the lower rib margin, so pain from liver swelling can cover a large area on the right side.
Conditions that cause the liver to enlarge include hepatitis, fatty liver disease, cirrhosis, and in some cases, tumors or metastatic disease. People with chronic liver problems often describe a persistent bloated feeling along with the rib pain, partly from gas buildup related to changes in blood flow through the liver. If the swelling is significant enough to push against the diaphragm, you may feel referred pain in your right shoulder, a phenomenon transmitted through the nerve that runs along the diaphragm.
Lung and Pleural Problems
Pleurisy is inflammation of the thin, two-layered membrane that lines your lungs and chest wall. Normally these layers glide silently against each other, but when inflamed, they rub together like sandpaper. The result is a sharp, stabbing pain that spikes every time you breathe in, cough, or sneeze, and noticeably eases when you hold your breath. That “pain tied directly to each breath” pattern is the clearest way to distinguish pleurisy from a muscle strain, which hurts more with movement than with quiet breathing.
Sometimes fluid accumulates between the two pleural layers (a pleural effusion). Oddly, this can actually reduce the sharp pain because the layers are no longer rubbing together, but it may cause a sensation of pressure or breathlessness instead. Pleurisy on the right side can follow a respiratory infection, pneumonia, or, less commonly, a blood clot in the lung.
Kidney Stones
Your right kidney sits toward the back of your body, just below the lowest ribs. A kidney stone that’s still inside the kidney or has just entered the upper part of the ureter often causes flank pain: a deep ache in the back, below the rib cage, on the affected side. As the stone moves down the ureter, the pain shifts toward the lower abdomen and eventually into the groin or pelvic area.
Kidney stone pain is distinct from most other right rib pain because it comes in waves, can be excruciating, and often brings nausea or blood in the urine. It also doesn’t change with breathing or body position the way musculoskeletal pain does.
How to Tell These Causes Apart
A few quick questions can help you sort through the possibilities:
- Does pressing on the spot reproduce the pain? That points toward a muscle strain or costochondritis. Internal organs don’t usually produce pinpoint tenderness you can recreate with a finger.
- Does it spike with every breath? Pain that tracks your breathing cycle, especially sharp pain that vanishes when you hold your breath, suggests pleurisy or a pleural issue rather than a muscle or organ problem.
- Does it follow meals? Aching under the right ribs within an hour of eating, particularly fatty food, is a classic gallbladder pattern.
- Is it a deep, wave-like pain that moves? Pain that starts in the flank and migrates downward, especially with nausea or bloody urine, suggests a kidney stone.
- Is there a dull, constant fullness? A persistent sense of pressure or bloating under the right ribs, possibly with fatigue or changes in appetite, raises the possibility of liver involvement.
Signs That Need Urgent Attention
Most right rib pain is musculoskeletal and resolves on its own. But certain combinations of symptoms signal something more serious: severe pain that keeps escalating, shortness of breath, vomiting blood, yellowing of the skin or eyes, fever with chills, blood in your urine or stool, or pain that spreads upward toward your chest, neck, or shoulder. Unexplained weight loss alongside persistent rib pain also warrants prompt evaluation. Any of these patterns calls for same-day medical assessment rather than a wait-and-see approach.