Amazon Cyber Monday deals See deals →ad

Mets Minor League Blog

Music theory, instruments and musicians

Mets Minor League Blog

Music theory, instruments and musicians

Muscle Under Rib Cage? What It Is & Why It Hurts

The muscle you feel under your rib cage is most likely the diaphragm, a large dome-shaped sheet that sits right beneath the lungs and ribs and does the heavy lifting for every breath you take. If you’re feeling pain, tightness, or a cramp in that area, it’s usually the diaphragm, the intercostal muscles between the ribs, or the abdominal wall muscles that attach under the lower ribs.

Anatomy: What Muscles Actually Sit Under the Ribs

Several muscles live in or near the space under your rib cage, and knowing which one is bothering you helps narrow down the cause.

  • Diaphragm: The primary breathing muscle. It attaches to the lower ribs, sternum, and spine, and forms the floor of the chest cavity. When it contracts, it flattens downward, creating a vacuum that pulls air into the lungs.
  • Intercostal muscles: These lie between the ribs, not under them, but they can feel like they’re under the rib cage when strained. They help expand and compress the chest during breathing.
  • Transversus abdominis: The deepest layer of the abdominal wall. It wraps around your torso like a corset and attaches to the lower ribs, helping with core stability and forced exhalation.
  • External and internal obliques: These side-abdominal muscles also attach to the lower ribs and can cause sharp pain under the rib cage when overworked.

What the Diaphragm Does and How It Feels

The diaphragm is not a muscle you can flex like a bicep, but you use it constantly. Each breath you take involves this muscle contracting and relaxing about 12 to 20 times per minute at rest. When it works harder—like during running, swimming, or heavy lifting—it can fatigue and spasm, causing a sharp, stabbing pain just below the ribs on one side.

That classic “side stitch” is a diaphragm spasm, often worsened by shallow breathing or eating right before exercise. The pain usually eases when you slow down, breathe deeply, and press on the spot.

Why You Feel a Cramp or Knot Under the Ribs

A cramp or knot under the rib cage is typically a muscle spasm in the diaphragm or the intercostals. Common triggers include:

  • Dehydration, which reduces blood flow to muscles and increases irritability
  • Electrolyte imbalances, especially low potassium, magnesium, or calcium
  • Sudden intense exercise without a warm-up
  • Poor posture, like slouching for hours, which shortens the chest muscles and strains the diaphragm
  • Stress or anxiety, which makes you breathe shallowly and overwork the diaphragm

If the cramp is brief and goes away with rest and hydration, it’s usually harmless. But if it’s persistent, sharp, or accompanied by other symptoms, it may not be a muscle at all.

When It’s Not a Muscle: Other Causes of Pain Under the Ribs

Many organs sit right under the rib cage, and pain there can be mistaken for a muscle issue. The most common non-muscle causes include:

  • Costochondritis: Inflammation of the cartilage that connects the ribs to the sternum. It feels like a sharp, localized pain that worsens with deep breaths or pressure.
  • Gallbladder problems: Gallstones or inflammation can cause pain in the upper right abdomen, often radiating to the back or right shoulder.
  • Acid reflux or gastritis: Stomach acid irritating the esophagus can cause a burning sensation under the lower ribs, especially after eating.
  • Spleen issues: An enlarged or injured spleen (on the left side) can cause pain under the left rib cage.
  • Kidney stones or infection: These cause pain in the flank, which is the side and back, just under the ribs.

If you have fever, nausea, vomiting, difficulty breathing, or pain that radiates to your arm or jaw, seek medical help immediately—these can be signs of a heart attack, pneumonia, or a pulmonary embolism.

How to Relieve Muscle Pain Under the Ribs

For genuine muscle-related discomfort, try these steps in order:

  1. Stop the activity that triggered it and sit upright.
  2. Take slow, deep breaths—inhale through your nose, exhale through your mouth.
  3. Press gently on the painful spot with two fingers and massage in small circles for 30 seconds.
  4. Stretch your side: raise your arm on the affected side overhead and lean gently away from it.
  5. Drink water with a pinch of salt and a squeeze of lemon to replenish electrolytes.
  6. Apply a warm compress for 10–15 minutes to relax the muscle.

If the pain is from costochondritis, avoid heavy lifting and twisting, and consider over-the-counter anti-inflammatories like ibuprofen, but only if you have no medical reason to avoid them.

Stretches and Exercises to Prevent Rib-Cage Muscle Pain

Strengthening and stretching the muscles around your rib cage can reduce the chance of spasms and strains.

  • Diaphragmatic breathing: Lie on your back with knees bent. Place one hand on your chest and one on your belly. Breathe in so your belly rises, not your chest. Do this for 5 minutes daily.
  • Side stretch: Stand with feet shoulder-width apart, raise one arm overhead, and lean to the opposite side. Hold for 20 seconds, then switch.
  • Cat-cow stretch: On all fours, alternate arching your back up and letting your belly sink. This mobilizes the ribs and spine.
  • Thoracic rotation: Sit on the floor with legs crossed, place one hand behind your head, and rotate your torso to that side. Hold for 15 seconds, then switch.

Regular cardio, like brisk walking or swimming, also conditions the diaphragm so it fatigues less easily during exertion.

Frequently Asked Questions

Can you pull a muscle under your rib cage? Yes, the intercostal muscles and the diaphragm can be strained from sudden twisting, heavy lifting, or intense coughing. A pulled intercostal muscle feels like a sharp pain that worsens with deep breaths or sneezing. Recovery usually takes a few weeks with rest and gentle stretching.

Why does it hurt under my left rib cage when I breathe? A sharp pain on the left side during breathing is often a diaphragm spasm or costochondritis. However, the spleen sits on the left side, so if the pain is severe, persistent, or accompanied by dizziness, see a doctor to rule out a splenic issue.

Is a side stitch a muscle cramp? Yes, a side stitch is generally considered a spasm of the diaphragm, though some experts think it involves the lining of the abdominal cavity. It’s most common during running and usually resolves when you slow down and breathe deeply.

What does a diaphragm spasm feel like? It feels like a sudden, sharp cramp or a fluttering sensation just below the ribs, often on one side. It can last from a few seconds to several minutes. Some people describe a “knot” that they can press on.

Can anxiety cause pain under the ribs? Yes, anxiety can cause shallow, rapid breathing that overworks the diaphragm and intercostal muscles, leading to tightness and aching under the ribs. It can also cause hyperventilation, which depletes carbon dioxide and triggers muscle spasms.

When should I worry about pain under my ribs? Seek emergency care if the pain is sudden and severe, if it radiates to your shoulder, arm, or jaw, if you have trouble breathing, or if it’s accompanied by sweating, nausea, or fainting. Also see a doctor if the pain lasts more than a few days or interferes with daily activities.

Muscle Under Rib Cage? What It Is & Why It Hurts
Scroll to top