Why does my right side hurt when i cough

Cough headaches are a type of head pain triggered by coughing and other types of straining. This may include sneezing, blowing your nose, laughing, crying, singing, bending over or having a bowel movement.

Cough headaches are fairly uncommon. There are two types: primary cough headaches and secondary cough headaches. Primary cough headaches are usually harmless, are caused only by coughing and get better quickly without treatment. A primary cough headache is diagnosed only when a provider has ruled out possible causes other than coughing.

A secondary cough headache may be triggered by a cough, but it is caused by problems with the brain or structures near the brain and spine. Secondary cough headaches can be more serious and may require treatment with surgery.

Anyone who has a cough headache for the first time should see their health care provider. The provider can determine whether a cough or something else caused the pain.

Products & Services

  • Book: Mayo Clinic Guide to Pain Relief

Symptoms

Symptoms of cough headaches:

  • Begin suddenly with and just after coughing or other types of straining
  • Typically last a few seconds to a few minutes — some can last up to two hours
  • Cause sharp, stabbing, splitting or "bursting" pain
  • Usually affect both sides of your head and may be worse in the back of your head
  • May be followed by a dull, aching pain for hours

Secondary cough headaches often present with only a cough headache, but you may also experience:

  • Longer lasting headaches
  • Dizziness
  • Unsteadiness
  • Fainting
  • Ringing in the ears or hearing loss
  • Blurred vision or double vision
  • Tremor

A cough headache only happens right after coughing. Other headache pain is not a cough headache if you already had a headache when you coughed, or if you have a headache condition such as migraine. For example, people with migraine might find that their headaches get worse when they cough. This is normal, and not a cough headache.

When to see a doctor

Consult your doctor or health care provider if you experience sudden headaches after coughing — especially if the headaches are new, frequent or severe or you have any other troubling signs or symptoms, such as imbalance or blurred or double vision.

Request an Appointment at Mayo Clinic

 

There is a problem with information submitted for this request. Review/update the information highlighted below and resubmit the form.

From Mayo Clinic to your inbox

Sign up for free, and stay up to date on research advancements, health tips and current health topics, like COVID-19, plus expertise on managing health.

Email

ErrorEmail field is required

ErrorInclude a valid email address

Learn more about Mayo Clinic’s use of data.

To provide you with the most relevant and helpful information, and understand which information is beneficial, we may combine your email and website usage information with other information we have about you. If you are a Mayo Clinic patient, this could include protected health information. If we combine this information with your protected health information, we will treat all of that information as protected health information and will only use or disclose that information as set forth in our notice of privacy practices. You may opt-out of email communications at any time by clicking on the unsubscribe link in the e-mail.

The ribs enclose many organs, so rib pain from coughing, breathing, sneezing or laughing can have a variety of causes, including pulmonary, musculoskeletal and cardiac issues that range in severity. Read more below to learn what may be causing your rib pain from coughing, breathing, sneezing, or laughing, and how your doctor may treat it.

5 most common causes

Acute Costochondritis

Bronchitis

Pneumonia

Illustration of a doctor beside a bedridden patient.

Pleurisy

Illustration of various health care options.

Rib bruise or fracture

Rib pain quiz

Take a quiz to find out what's causing your pain.

Take rib pain quiz

Rib pain that gets worse when breathing, coughing, or sneezing explained

The 24 ribs of the rib cage and the muscles of the chest wall enclose and protect various organs of the upper body, including the lungs and the heart.

Although damage to the ribs can produce pain, rib pain most often originates from organs in the chest such as the lungs or heart. When the components of the chest or lungs become injured or inflamed, the pain may be felt most in the rib/chest wall. This is known as referred pain, or pain felt not at the site of origin.

Characteristics

Some types of referred pain from the lungs or heart can manifest in the rib area and worsen with actions such as breathing, coughing, sneezing or laughing. The pain may feel sharp, stabbing or burning and may also be associated with symptoms including:

  • Fever
  • Shortness of breath
  • Upper respiratory infection symptoms: These include a cough, congestion, and a runny nose.

The pain can be sudden and intense thus a serious cause for concern. It is important to get medical attention immediately as this type of pain can signal serious underlying conditions that require prompt assessment and treatment.

Why can breathing, coughing, or sneezing increase rib pain?

Since the ribs enclose so many organs, rib pain that gets worse when breathing, coughing, sneezing or laughing can have a variety of causes. These causes can be most easily grouped into the following categories.

Pulmonary

The lungs are in closest proximity to the ribs/chest wall and are often the most common cause of rib pain associated with exhalation or inhalation. The medical term for such pain is pleurisy or pleuritic chest pain. Pleuritic pain relates to large tissues, called pleura, that separate the lungs from the chest wall. One layer of pleura wraps around the lungs and the other layer of pleura lines the chest wall. Under normal conditions, the layers slide or glide against each other smoothly during inhalation or exhalation. However, certain conditions can cause inflammation or irritation of the pleura causing friction. As a result, the two pleural layers rub against each other like sandpaper, causing pain during any activities or movements that cause expansion of the lungs such as coughing, sneezing, laughing and basic breathing. Many types of conditions can cause such irritation, including:

  • Inflammation: Inflammatory pathogens such as viruses, bacteria, and fungi can infect the pleura and cause pleuritic pain in addition to symptoms such as a cough, fever, and congestion. A primary infection of the lung itself such as in pneumonia can also spread to the pleura and cause pleuritic pain.
  • Obstruction: Chronic or acute obstruction to the vessels of the lungs, especially in the form of a blood clot (embolism) can result in sudden shortness of breath and pain worsened with inhalation or exhalation.

Musculoskeletal

The muscles, bones, skin and soft tissues of the chest wall can also become inflamed or injured, resulting in rib pain that worsens with specific activities.

  • Overuse: Physical activity that is strenuous and puts stress on the muscles of the chest, such as pushups or weightlifting, can result in soreness that can worsen with taking deep breaths or laughing or sneezing.
  • Inflammation: Inflammation to the cartilage that attaches the ribs to the sternum can result in a condition called costochondritis. Costochondritis results in pain and tenderness around the ribs that can be exacerbated with taking deep breaths or coughing.
  • Traumatic: Direct injury to the chest wall can result in damage such as a fractured rib or torn muscles that may present as rib pain that worsens with inhalation or exhalation.

Cardiac

Similarly to the lungs, damage or inflammation to the heart can also result in distinctive pleuritic pain that comes on suddenly and is felt primarily over the front of the chest. A sac called the pericardium surrounds the heart; see an image of the pericardium here. Inflammation of the pericardium is known as pericarditis and similar etiologies such as infection, trauma, systemic inflammatory conditions, etc. can cause it [8].

This list does not constitute medical advice and may not accurately represent what you have.

Chronic costochondritis (chest wall syndrome)

Costochondritis is an inflammation of the cartilage that connects a rib to the breastbone. Pain caused by costochondritis may mimic that of a heart attack or other heart conditions.

Rarity: Uncommon

Top Symptoms: rib pain, chest pain, chest pain that is worse when breathing, rib pain when moving, pain when pressing on the chest

Urgency: Phone call or in-person visit

Rib pain quiz

Take a quiz to find out what's causing your pain.

Take rib pain quiz

Viral pneumonia

Viral pneumonia, also called "viral walking pneumonia," is an infection of the lung tissue with influenza ("flu") or other viruses.

These viruses spread through the air when an infected person coughs or sneezes.

Those with weakened immune systems are most susceptible, such as young children, the elderly, and anyone receiving chemotherapy or organ transplant medications.

Symptoms may be mild at first. Most common are cough showing mucus or blood; high fever with shaking chills; shortness of breath; headache; fatigue; and sharp chest pain on deep breathing or coughing.

Medical care is needed right away. If not treated, viral pneumonia can lead to respiratory and organ failure.

Diagnosis is made through chest x-ray. A blood draw or nasal swab may be done for further testing.

Antibiotics do not work against viruses and will not help viral pneumonia. Treatment involves antiviral drugs, corticosteroids, oxygen, pain/fever reducers such as ibuprofen, and fluids. IV (intravenous) fluids may be needed to prevent dehydration.

Prevention consists of flu shots as well as frequent and thorough handwashing.

Rarity: Uncommon

Top Symptoms: fatigue, headache, cough, shortness of breath, loss of appetite

Urgency: Primary care doctor

Rib bruise or fracture

Broken or bruised ribs are usually caused by a fall or a blow to the chest, although occasionally this can happen due to severe coughing. With a broken rib, the pain is worse when bending and twisting the body.

You can safely treat this condition on your own. Breathing will be painful, but it is important to avoid taking shallow breaths or not coughing to avoid the pain as this can raise your risk of developing a chest infection. You can look after yourself by taking over-the-counter pain medication, applying an ice pack to the chest, resting periodically (especially if your work involves a lot of physical labor), and holding a pillow against the chest if you needs to cough.

Rarity: Uncommon

Top Symptoms: rib pain that gets worse when breathing, coughing, sneezing, or laughing, rib pain from an injury, sports injury, rib pain on one side, injury from a common fall

Symptoms that always occur with rib bruise or fracture: rib pain from an injury

Urgency: Primary care doctor

Pleurisy

Pleurisy is an inflammation of the pleura, the protective membranes which surround the lungs and line the inner chest cavity.

The inflammation is most often caused by a viral, bacterial, or fungal infection, such as influenza or pneumonia; by some medications; or by a rib fracture.

Symptoms include sharp, "pleuritic" pain in the chest, back or shoulders that gets worse with deep breathing, sneezing, or coughing; shortness of breath due to shallow breathing in an effort to ease the pain; and sometimes fever and/or cough.

Sudden, intense chest pain during breathing is a medical emergency. Take the patient to the emergency room or call 9-1-1.

Diagnosis is made through patient history; physical examination; and imaging such as x-ray, CT scan, or ultrasound. In some cases, a needle is used to withdraw fluid from the pleura for testing.

Treatment involves addressing the underlying cause, such as prescribing antibiotics for a bacterial infection. Over-the-counter pain relievers can be used, along with supportive care in the form of rest, fluids, and good diet.

Rarity: Uncommon

Top Symptoms: shortness of breath, muscle aches, fever, cough with dry or watery sputum, rib pain that gets worse when breathing, coughing, sneezing, or laughing

Urgency: Primary care doctor

Normal occurence of chest pain

Sometimes chest pain is not a sign of a heart attack. The following symptoms are usually typical of more benign conditions:

If the pain is brief, like a short shock, and subsides right away, it is most likely from an injury such as a broken rib or pulled muscle in the chest.

Sharp pain in the chest that improves with exercise is probably from acid reflux or a similar condition, and will be eased with antacids.

A small, sharp pain anywhere in the chest that actually feels worse on breathing is probably from a lung inflammation such as pneumonia or asthma.

An actual heart attack involves intense, radiating chest pain that lasts for several minutes; worsens with activity; and is accompanied by nausea, shortness of breath, dizziness, and pain in the arms, back, or jaw. Take the patient to the emergency room or call 9-1-1.

If there is any question as to whether the symptoms are serious or not, a medical provider should be seen as soon as possible.

Rarity: Common

Top Symptoms: chest pain, rib pain

Symptoms that always occur with normal occurrence of chest pain: chest pain

Symptoms that never occur with normal occurrence of chest pain: being severely ill, shortness of breath, fainting, severe chest pain, crushing chest pain, excessive sweating, nausea or vomiting

Urgency: Phone call or in-person visit

Bronchitis

Bronchitis is an inflammation of the bronchial tubes, the tiny airways in the lungs.

Acute bronchitis, or "chest cold," comes on suddenly and is caused by the same virus that causes the flu or the common cold. Chronic lasts at least three months and recurs over two years. It is caused by cigarette smoking and/or exposure to other pollutants.

Other risk factors are weakened immune system and gastric reflux (heartburn.)

Symptoms include cough with clear, greenish, or yellowish mucus; fatigue; mild headache; body aches; shortness of breath; low-grade fever; chest discomfort.

Acute bronchitis can lead to pneumonia. Chronic bronchitis is a form of chronic obstructive pulmonary disease (COPD) and requires medical treatment.

Diagnosis is made with chest x-ray and sputum test.

Acute bronchitis lasts 7 to 10 days and needs good supportive care – rest, fluids, and over-the-counter pain relievers. Antibiotics do not work against viral illness.

Chronic bronchitis is treated with lifestyle changes – especially smoking cessation – and an inhaler or other lung medication.

Flu shots, frequent handwashing, and not smoking are the best prevention.

Bacterial pneumonia

Bacterial pneumonia is an infection of the lungs caused by one of several different bacteria, often Streptococcus pneumoniae. Pneumonia is often contracted in hospitals or nursing homes.

Symptoms include fatigue, fever, chills, painful and difficult breathing, and cough that brings up mucus. Elderly patients may have low body temperature and confusion.

Pneumonia can be a medical emergency for very young children or those over age 65, as well as anyone with a weakened immune system or a chronic heart or lung condition.

Complications may include organ failure and respiratory failure. Take the patient to the emergency room or call 9-1-1.

Diagnosis is made through blood tests and chest x-ray.

With bacterial pneumonia, the treatment is antibiotics. Be sure to finish all the medication, even if you start to feel better. Hospitalization may be necessary for higher-risk cases.

Some types of bacterial pneumonia can be prevented through vaccination. Flu shots help, too, by preventing another illness from taking hold. Keep the immune system healthy through good diet and sleep habits, not smoking, and frequent handwashing.

Rarity: Common

Top Symptoms: fatigue, cough, headache, loss of appetite, shortness of breath

Symptoms that always occur with bacterial pneumonia: cough

Urgency: In-person visit

Atypical chest pain

Atypical chest pain describes the situation when someone's chest pain is unlikely to be related to heart or lung disease. There are many other possible causes that could explain chest pain, like sore chest wall muscles or psychological factors like stress and anxiety.

It looks like your chest pain is atypical, however further testing might be needed. Therefore, you should schedule an appointment within two days with your primary care physician who can coordinate these further tests. These will likely include a stress EKG (electrocardiogram), which is a readout of the heart's electrical activity during exercise.

Rarity: Common

Top Symptoms: chest pain, shortness of breath

Symptoms that always occur with atypical chest pain: chest pain

Symptoms that never occur with atypical chest pain: fever

Urgency: Primary care doctor

Acute costochondritis (chest wall syndrome)

Acute costochondritis is also called anterior chest wall syndrome. It is an inflammation of the flexible cartilage that connects each rib to the breastbone.

Costochondritis is caused by excessive coughing or by straining the upper body, as with weightlifting. It is a common occurrence and is seen in children, teenagers, and adults.

Symptoms include a sudden, sharp, aching pain anywhere in the chest wall, especially near the breastbone where it connects to the ribs. The pain gets worse with deep breathing or with almost any movement.

Any sort of chest pain should be seen by a medical provider, especially if the person is over 35 and/or has had any cardiopulmonary symptoms. Heart attack symptoms can be mistaken for costochondritis in some cases.

Diagnosis is made through physical examination. X-rays or CT scans may be done to rule out any other causes for the pain.

Treatment involves rest along with over-the-counter, nonsteroidal anti-inflammatory drugs. Injection of corticosteroid medication to ease pain and inflammation is occasionally done.

Rib pain quiz

Take a quiz to find out what's causing your pain.

Take rib pain quiz

Treatment for rib pain that gets worse when breathing, coughing, or sneezing

Treatment of pleuritic pain is very dependent on the cause, making it of utmost importance to get prompt medical attention.

The goals of treatment for many causes of pleurisy are to alleviate pain and resolve inflammation. Depending on the specific cause, your healthcare provider may prescribe the following medications:

  • Pain medication: Medications such as aspirin or nonsteroidal anti-inflammatory drugs (NSAIDs) are often used to combat both the pain and inflammation associated with many of these conditions. Another anti-inflammatory medication colchicine, more often used to treat gout, can also be used to treat pericarditis.
  • Antibiotics: If the pleuritic pain is associated with bacterial infection, your healthcare provider will prescribe antibiotics targeted to the specific pathogen.

There are many causes of lung or heart inflammation such as pulmonary embolism (PE) or myocardial infarction (heart attack) that require emergency intervention such as medications to dissolve clots (thrombolytics) or thin the blood (anticoagulant).

FAQs about rib pain that gets worse when breathing, coughing, sneezing, or laughing

Is pain that worsens when I laugh, sneeze, cough or breathe life-threatening?

Never ignore such symptoms because pleuritic pain can be a symptom of seriously life-threatening conditions such as a pulmonary embolism. Get emergency treatment immediately especially if you experience additional symptoms such as shortness of breath, calf or thigh pain/ swelling or have a history of blood clots in the leg.

If my pleuritic pain is due to a musculoskeletal etiology, is there anything I can do at home to help my symptoms?

You can try doing stretching exercises that target the chest and its muscles like yoga or Tai Chi. Putting a heating pad or ice pack on the painful area periodically may also help relax and ease your pain.

How is costochondritis treated?

Often, costochondritis is self-limiting, meaning it goes away without treatment; however, over-the-counter medications such as Tylenol or ibuprofen can provide pain relief.

How long will my symptoms of pleuritic chest pain last?

The duration of symptoms depends on the specific cause. For example, irritation of the pleura by a viral infection is self-limited and not treated with antibiotics. Most often, once the viral infection resolves, the inflammation and pleuritic pain will also resolve. Make sure to talk with your physician about your specific symptoms and possible duration.

Why does my rib pain worsen when I take a deep breath?

When the lining of the lungs (the pleura) becomes inflamed, this causes a condition called pleuritis sharp chest pain that worsens during breathing. The pleura is divided into two thin layers. One layer wraps around the lungs and the other layer lines the inner chest wall. Breathing causes the lungs to expand and the inflamed pleura rub against each other, causing pain during inhalation and exhalation.

Questions your doctor may ask about rib pain that gets worse when breathing, coughing, sneezing, or laughing

  • Do you have a cough?
  • Any fever today or during the last week?
  • How would you explain why your chest hurts?
  • Did you have any cold-like symptoms in the past week or two?

Self-diagnose with our free Buoy Assistant if you answer yes on any of these questions.

Share your story

Submit story

Request sent successfully

An error occurred, please try again later

Jeffrey M. Rothschild, MD, MPH.

Associate Professor of Medicine, Brigham and Women’s Hospital

Dr. Rothschild has been a faculty member at Brigham and Women’s Hospital where he is an Associate Professor of Medicine at Harvard Medical School. He currently practices as a hospitalist at Newton Wellesley Hospital. In 1978, Dr. Rothschild received his MD at the Medical College of Wisconsin and trained in internal medicine followed by a fellowship in critical care medicine. He also received an MP...

Read full bio

Was this article helpful?

19 people found this helpful

Heart Icon.19

Tooltip Icon.

Share Icon.Share

Facebook Icon.

Facebook

LinkedIn Icon.

Linkedin

Pinterest Icon.

Pinterest

Pocket Icon.

Pocket

Share Link Icon.

Copy link

Copied to clipboard

Close Icon.

Read this next

Slide 1 of 2

Ribs

10 Rib Pain Causes

Rib pain or pain in the chest wall that feels like it comes from a rib may be caused by traumatic injury, muscle strain, joint inflammation, or chronic pain, and ranges in severity. Rib cage pain can be associated with bruising, difficulty taking a deep breath, joint pain, and more. Read more below to learn what may be causing your rib pain and when to seek treatment.

Read more

Chest

Atypical Chest Pain

This article will review the symptoms, causes, and management of atypical chest pain. Atypical chest pain differs from chest pain indicative of a heart attack. Symptoms include sharp or tearing pain, shortness of breath, and back pain.

Why does my right lower side hurt when I cough?

Appendicitis. Appendicitis means your appendix is inflamed. When this happens, you may experience severe abdominal pain that gets worse when you cough, sneeze, and exercise.

When should I be worried about right side pain?

If you have severe abdominal pain,especially on the right side, it's a good idea to consult a physician and rule out causes that need immediate attention, such as appendicitis, an ectopic pregnancy, ulcer or kidney stones.

What does it mean when it hurts on your right side?

Pain on the right side of the abdomen can be caused by conditions such as appendicitis, hernia, kidney issues, reproductive system issues, irritable bowel syndrome (IBS), indigestion, or even gas. There are many possible reasons for discomfort in your right abdominal region.