Pain under the left rib cage has a wide range of causes, from trapped gas to heart problems. The left upper area of your abdomen houses your spleen, stomach, pancreas, left kidney, and part of your colon, and any of these can produce pain that feels like it’s coming from just beneath the ribs. Musculoskeletal problems in the rib cage itself are also common culprits. The key is recognizing what kind of pain you’re dealing with and whether it needs urgent attention.
Trapped Gas in the Colon
One of the most common and least dangerous causes is something called splenic flexure syndrome. Your colon makes a sharp turn near your spleen, right under the left rib cage. When gas builds up faster than it can move through that bend, it stretches the colon wall and causes a cramping or pressure-like pain in that exact spot. It can feel surprisingly intense for something so harmless.
You’re more likely to get gas buildup if you eat or drink quickly, chew gum frequently, or consume foods with carbohydrates your small intestine doesn’t fully digest (beans, cruciferous vegetables, dairy if you’re lactose intolerant). The pain typically comes and goes and often improves after passing gas or having a bowel movement. Walking around and gentle movement can help move things along.
Costochondritis and Muscle Strain
If the pain feels sharp and gets worse when you press on your ribs, twist your torso, or take a deep breath, the problem may be in your rib cage itself rather than the organs behind it. Costochondritis is inflammation where the ribs attach to the breastbone via cartilage. During a physical exam, a doctor will press along your breastbone and move your rib cage or arms in specific ways to see if they can reproduce the pain. If they can, that’s usually the answer.
Intercostal muscle strain, where you pull one of the small muscles between your ribs, causes similar symptoms. This often follows heavy lifting, intense exercise, forceful coughing, or an awkward sleeping position. Both conditions are painful but not dangerous, and they typically resolve on their own within a few weeks.
For relief, rest the area and avoid movements that trigger pain. In the first few days, apply an ice pack wrapped in a towel for 15 to 20 minutes at a time. After the initial swelling phase, switch to a heating pad, which can speed recovery. If you’re having trouble sleeping, try lying on the uninjured side or propping your upper body up with pillows. Deep breathing exercises, while uncomfortable at first, help prevent you from guarding the area so much that your breathing becomes too shallow.
Stomach and Digestive Causes
Your stomach sits directly beneath the left rib cage, so gastritis (inflammation of the stomach lining) and peptic ulcers can both cause a burning or gnawing pain in this area. Gastritis pain often flares after eating, especially with spicy or acidic foods, alcohol, or anti-inflammatory painkillers like ibuprofen. Ulcer pain may actually improve briefly after eating, then return.
Pancreatitis produces a more severe, boring pain in the upper abdomen that often radiates through to the back. Acute pancreatitis comes on suddenly and can be intense enough to send you to the emergency room. Chronic pancreatitis causes recurring episodes of upper belly pain that spreads to the back. Heavy alcohol use and gallstones are the two leading triggers.
Spleen Problems
The spleen sits just below the left rib cage, next to the stomach. When it becomes enlarged, a condition called splenomegaly, you may feel pain or a sense of fullness in the left upper belly that can spread to the left shoulder. You might also feel full after eating only a small amount, because the swollen spleen presses against the stomach.
Viral infections are a common cause, particularly mononucleosis (mono). Bacterial infections, liver disease, and certain blood disorders can also enlarge the spleen. An enlarged spleen is more vulnerable to rupture, which causes life-threatening internal bleeding. If you’ve been diagnosed with mono or know your spleen is enlarged, avoid contact sports and heavy lifting until your doctor clears you.
Lung and Chest Wall Causes
Your left lung sits above and behind the left rib cage, and problems there can feel like they originate under the ribs. Pleurisy, an inflammation of the thin tissue layers lining the lungs and chest wall, causes a sharp pain that worsens every time you breathe in, cough, or sneeze. A distinctive feature: the pain lessens or stops completely when you hold your breath. It can also spread to the shoulders or back and worsen with any upper body movement. Pleurisy itself isn’t a disease but rather a symptom of something else, often a viral infection, pneumonia, or a blood clot in the lung.
A pneumothorax (collapsed lung) can also cause sudden sharp pain on the left side along with difficulty breathing. This is less common but more urgent.
Heart-Related Causes
Pain under the left rib cage can occasionally signal a heart problem, and this possibility is worth taking seriously even though it’s less common than the other causes on this list. Angina (reduced blood flow to the heart) and heart attacks can produce pain, pressure, or tightness that people sometimes describe as being under the left ribs rather than in the center of the chest. Pericarditis, inflammation of the sac around the heart, causes sharp chest pain that often worsens when lying down or breathing deeply.
Heart-related pain is more likely if you also feel pressure or squeezing in your chest, pain spreading to your left arm, jaw, or neck, shortness of breath, nausea, lightheadedness, or a cold sweat.
When the Pain Needs Urgent Attention
Most left rib pain turns out to be gas, a strained muscle, or mild inflammation. But certain combinations of symptoms point to something that can’t wait:
- Intense chest pain with shortness of breath, nausea, or sweating could indicate a heart attack or pulmonary embolism. Call emergency services immediately.
- Severe abdominal pain with vomiting and fever suggests acute pancreatitis or another abdominal emergency.
- Sudden sharp pain after an injury to the left side raises concern for a splenic rupture, especially if you feel dizzy or lightheaded.
- Pain that worsens with exertion or breathing and doesn’t improve with rest can signal a pulmonary embolism, particularly if you’ve recently had leg swelling or pain followed by sudden difficulty breathing.
- Blood in your stool, or black, tarry stools alongside upper abdominal pain suggest a bleeding ulcer.
Pain that is mild, comes and goes, and has an obvious trigger (eating too fast, a tough workout, sleeping in a bad position) is far less likely to be dangerous. But pain that is new, persistent, worsening, or accompanied by any of the symptoms above warrants prompt medical evaluation rather than a wait-and-see approach.

