Pain under the left rib cage can be caused by pancreatitis, kidney stones, or inflammation in the stomach. However, it can also be associated with injury to any other organs located in the upper abdominal quadrant on the left side, such as the heart, spleen, pancreas, lung or left kidney.
Pain in injured, left-sided organs can be sudden and is usually accompanied by other symptoms like nausea, vomiting, difficulty breathing, or increased pain with movement, coughing or sneezing.
Since pain under the left ribs can be caused by so many different problems, it should always be assessed by a doctor (preferably a gastroenterologist), specially if it is very intense or if it lasts for more than two days.

What causes pain under the left rib cage?
The most common causes of pain in the left upper quadrant are as follows:
1. Costochondritis
Costochondritis is an inflammation of the cartilage that connects the ribs to the sternum. The sternum is a bone located in the middle of the chest that supports the rib cage and clavicles.
This inflammation can happen due to infection, physical trauma or arthritis. Symptoms can include left-sided chest pain (similar to a heart attack), a feeling of pressure under the rib cage, pain localized to one or more rib bones, and pain that increases with breathing or coughing.
What to do: You should reduce your activity and rest. Apply a warm compress to any painful areas and avoid any movement that can worsen the pain, like carrying heavy objects or playing any sports. It is important to seek the advice of a doctor, who may recommend medication like anti-inflammatories (e.g. naproxen) or physiotherapy and stretching.
If you also experience any shortness of breath, or any pain that radiates to your arm or neck, you should seek medical attention immediately, as these can be signs of a heart attack.
2. Pericarditis
Pericarditis is an inflammation of the pericardium, which is a fluid-filled sac that wraps around the heart. When the pericardium becomes inflamed, it can cause pain under the left rib cage. This pain usually worsens when laying down.
Pericarditis can occur due to an infection (like pneumonia or tuberculosis), lupus, rheumatoid arthritis, radiation therapy in the thorax, or use of medications like phenytoin, hydralazine, or phenylbutazone.
What to do: If you have any symptoms that could indicate pericarditis, you should see a cardiologist. Medications like anti-inflammatories (e.g. ibuprofen), colchicine or corticosteroids can help to decrease pain and inflammation. Pericarditis caused by infection can also be treated with antibiotics, like amoxicillin or ciprofloxacin.
In more serious cases, surgical procedures like a pericardiocentesis (for removal of excess fluid) or a pericardiectomy (for removal of the sac or a portion of it) may need to be performed.
Learn more about the symptoms of heart disease and assess your risk if you suspect your pain may be related to a heart problem.
3. Pancreatitis
Pancreatitis is an inflammation of the pancreas, an organ located behind the stomach, in the left upper quadrant. It is responsible for producing digestive enzymes and hormones like insulin, glucagon and somatostatin. This inflammation can cause an intense pain under the left rib cage that can radiate to the back. Other symptoms of pancreatitis include nausea, vomiting and fever. See how these symptoms vary from pancreatic cancer.
Usually,the most common cause of pancreatitis is excessive alcohol intake, however it can also be caused by viral infections (like measles or mumps), gallbladder stones, cystic fibrosis or use of certain medications (like liraglutide, losartan, or corticosteroids).
What to do: You should see a general physician or gastroenterologist, who may recommend admission to the hospital for IV treatment of fluids and analgesic medication. In more serious cases, surgery might be necessary. Diet changes (like avoiding fatty foods) can help to reduce risk of pancreatitis flares. Supplements like oral enzymes can also be recommended by your doctor.
4. Pleurisy
Pleurisy, also known as pleuritis, is a condition where the pleura (the membrane that wraps your lungs) becomes inflamed. This inflammation can cause pain under the left rib cage that worsens with breathing, coughing or sneezing. Other symptoms include shortness of breath, difficulty breathing and fever.
Plerisy can be caused by bacterial, viral or fungal pneumonia, lung cancer or a pulmonary embolism.
What to do: You should see a pulmonologist or general physician for treatment. This treatment might include anti-inflammatories to treat the swelling (like ibuprofen or naproxen), antibiotics to treat a pneumonia or anticoagulants to treat a pulmonary embolism. The doctor may also prescribe bronchodilators to help with breathing.
5. Kidney stones
Kidney stones occur when calcium and salt deposits harden and turn into stone-like masses. This can back-up the flow of urine, which may result in a deep back pain that may radiate to the front and up toward the ribs of the affected side.
Other symptoms can emerge, such as burning with urination, nausea, vomiting, fever over 38ºC (or 100.4ºF), or blood in the urine. Kidney stones are more common in adult men, but they can occur in women and children. One of the main causes of kidney stones is low fluid intake. Read more about the symptoms of kidney stones and what else can cause them.
What to do: Proceed to a hospital and seek medical attention, as IV analgesics can help to relieve pain instantly. In other cases, the doctor may opt to perform a procedure like lithotripsy, ureteroscopy or nephrolithotomy to remove or break-up any kidney stones that are causing a urinary obstruction. It is important to increase your fluid intake to encourage frequent urination, as this will help to prevent kidney stone formation.
Learn more about what can cause kidney pain and what to do.
6. Gastritis
Gastritis is an inflammation of the lining of the stomach, and it can cause sharp pain in the left upper quadrant. Other symptoms associated with gastritis include a burning sensation in the esophagus, nausea, slow digestion or a feeling of fullness, and frequent burping.
This inflammation can be caused by medications that aggravate the stomach lining (like anti-inflammatories), excessive alcohol intake, or an infection of H. pylori bacteria. Learn more about the symptoms of gastritis, and check-out our online quiz to assess whether you are at risk for this condition.
What to do: Maintain an overall light diet made-up of fresh greens, cooked fruits, and lean meats with minimal spices or sauces. You should drink mostly water and avoid any food or beverages that can irritate the stomach lining, like coffee, chocolate, alcohol and other fizzy drinks. See the recommended gastritis diet you should maintain to prevent and treat symptoms.
In addition, you should consult a gastoenterologist, who may recommend an endoscopy to confirm a diagnosis of gastritis. Treatment may include a prescription of stomach protectors (like omeprazole, lansoprazole or pantoprazole) or antibiotics if H. pylori is present.