Your left ribs protect the organs that sit below them, like your heart and your stomach. Pain in this area can be caused by injury, infection, or an underlying condition.

If you have pain in your chest, you might worry about a serious condition, such as a heart attack. While it’s true that pain under your left ribs can be a heart attack symptom, discomfort in that area is not always related to your heart.

Depending on the cause, left rib pain might feel sharp and stabbing, or dull and aching. For many people, pain in this area is due to a benign (not harmful), treatable cause. But if you’re having chest pain, it’s best to see a doctor or healthcare professional to make sure it’s nothing serious.

Read on to learn about possible causes of left rib pain, diagnosis, and treatments.

Chest pain can sometimes signal a medical emergency, such as a heart attack. If you’re feeling pain in your left ribs, it’s best not to ignore it.

Heart attack symptoms include:

If you think you could be having a heart attack, call 911 or local emergency services right away.

Your rib cage consists of 24 ribs — 12 on the left and 12 on the right side of your body. Their function is to protect the organs that lie beneath them.

On the left side, this includes your heart, left lung, pancreas, spleen, stomach, and left kidney. Infection, inflammation, or injury to any of these organs can cause pain to radiate under and around your left rib cage. It’s also possible to injure your ribs themselves.

Costochondritis refers to inflammation of the cartilage that attaches your ribs to your breastbone. This condition doesn’t always have a clear cause. It can happen for several reasons, such as:

  • an infection
  • an injury
  • severe coughing

Costochondritis causes a sharp, stabbing pain that’s usually felt on the left side of your rib cage. It may get worse when you cough, sneeze, or press on your ribs.

A forceful blow or injury to your chest is the most common cause of bruised or broken ribs.

If you have a bruised rib, you’ll usually feel pain in your chest that’s worse when you inhale or move.

When a rib is broken, the pain is likely to be severe. It may make you feel like it’s hard to breathe in all the way. Broken ribs can sometimes cause serious complications, such as:

  • a collapsed lung
  • injuries to your blood vessels or organs, such as your spleen
  • flail chest, which is a medical emergency that happens when you have many fractures in your ribs

Irritable bowel syndrome (IBS) and inflammatory bowel disease (IBD) are two different digestive conditions. The causes of IBS and IBD aren’t fully known.

IBS and IBD both cause persistent, long-term pain in your abdomen, which is the area from your chest down to your hips. It’s possible for IBS or IBD to cause pain under your left ribs. These conditions also cause digestive symptoms, such as constipation, diarrhea, and gas.

Symptoms may come and go. IBS symptoms tend to improve after you have a bowel movement. IBD is a more serious condition that causes physical changes to your intestines. A doctor can see these changes using imaging tests.

Your pancreas is a gland located near your small intestine, on the left side of your belly. It makes insulin, which your body uses to turn sugar into energy. It also releases digestive juices into your small intestine to help break down food you’ve eaten.

Pancreatitis refers to inflammation of your pancreas. It can have many causes, including:

Pain caused by pancreatitis can happen suddenly (acute pancreatitis), or it can slowly get worse over time (chronic pancreatitis). Additional symptoms of pancreatitis include:

  • fever
  • fast heart rate
  • nausea
  • vomiting
  • weight loss
  • jaundice

It’s important to treat pancreatitis to prevent serious complications.

Your spleen also sits in the left side of your body, near your rib cage. This organ is an important part of your immune system. It produces white blood cells that fight infection, and it processes other parts of your blood.

An enlarged spleen, also called splenomegaly, can cause symptoms such as:

  • pain or discomfort
  • bloating
  • feeling full after eating only a small amount of food

Several things can cause an enlarged spleen, including:

  • viral infections, such as mononucleosis
  • bacterial infections, such as syphilis
  • parasitic infections, such as malaria
  • blood diseases
  • liver diseases

Sometimes, your spleen can rupture, usually as a result of trauma. It’s a medical emergency, and you should get medical attention immediately.

If your spleen ruptures, the area might feel tender when you touch it. In addition to pain, other signs and symptoms can include:

More rarely, a splenic infarct happens when a portion of your spleen necrotizes or “dies.” This happens when the blood supply is lowered or stopped, usually as a result of an injury or conditions that affect your blood.

Gastritis refers to inflammation of the lining of your stomach, which is also near the left side of your rib cage.

It doesn’t always cause symptoms, but possible symptoms include:

  • pain in your upper abdomen
  • feeling full after eating only a small amount of food
  • nausea
  • vomiting

The causes of gastritis include:

Your kidneys are part of your urinary tract. They’re located on either side of your spine, but when they become inflamed or infected, the pain can radiate to the front of your body. When your left kidney is involved, you might feel pain near the left side of your rib cage.

Kidney stones are hardened calcium and salt deposits that form into stones. They can cause a cramping pain as they move out of your kidneys and make their way toward your bladder. In addition to pain in your left rib cage, kidney stones can also cause:

Kidney infections occur when bacteria from your urinary tract make their way into your kidneys. This usually happens due to a bladder infection. Additional symptoms of a kidney infection can include fever and nausea.

If you’re having symptoms of a kidney problem, it’s important to see a doctor. You can get a diagnosis and start any treatment that may be needed.

Your heart is surrounded by a fluid-filled sac called the pericardium. Pericarditis refers to inflammation of this sac. This can cause a dull ache or a stabbing pain that’s usually worse when you’re lying down. Pericarditis can also cause a high fever.

Researchers aren’t sure why it happens, but it often occurs after you’ve had a viral infection.

Pericarditis can lead to complications if it is not treated.

Pleurisy happens when the tissue that surrounds your lungs becomes inflamed. Causes of pleurisy include:

  • pneumonia
  • blood clot in your lung
  • injury
  • cancer that has spread from another part of your body to the tissue surrounding your lungs
  • cancers that specifically affect the tissue surrounding your lungs, such as mesothelioma

Pleurisy on your left side may cause pain under your left rib cage, but the main symptom is a sharp, stabbing pain when you breathe. Be sure to see a doctor if you experience any intense chest pain while breathing.

To figure out what’s causing pain in your left rib cage, a doctor will give you a physical exam that includes feeling the affected area. This will help them check for any signs of swelling or inflammation that might be caused by conditions such as costochondritis.

If they suspect the pain could be due to a heart problem, a doctor will order an electrocardiogram (ECG) and blood tests. An ECG can detect problems with your blood flow or heart rhythm. They may follow up an ECG with an echocardiogram to check for pericarditis, a weak heart muscle, or problems with your heart valve.

Along with an ECG, a doctor may order a chest X-ray to check for fractures or other signs of damage.

Next, they may take blood, stool, or urine samples for testing. Analyzing these results can alert a doctor to signs of kidney problems, pancreatitis, or gastritis.

If the cause of your rib cage pain still isn’t clear, you may need an imaging test, such as:

This will give a doctor a better view of your bones, organs, and tissues.

What kind of doctor should I see for left rib pain?

There are many possible causes of pain around your left rib cage. A primary care doctor can usually help you determine the cause. If needed, they can refer you to a specialist, depending on the suspected cause. Potential specialists include:

If you think you could be having a heart attack or other medical emergency, call 911 or your local emergency services right away.

Treating your left rib cage pain depends on what’s causing it. If it’s related to any type of inflammation, a doctor will likely recommend you take NSAIDs to lower your pain and swelling. In some cases, you may need an antibiotic to clear up a bacterial infection.

Bruised ribs will likely heal with rest, as will broken ribs, if there are no complications.

In rare cases, you may need surgery. For example, if a kidney stone is too large to pass through your body on its own, a doctor may need to surgically remove it.

Given the number of organs in the upper left part of your body, it’s not uncommon to feel pain under the left rib cage. It may be caused be an easily treatable condition.

But if you have pain in this area that’s severe, worsens over time, lasts more than 24 hours, or is associated with any of the serious symptoms above, you should get medical treatment immediately to rule out any underlying conditions.