When you cough, the muscles between your ribs contract forcefully. Repeated coughing can strain these muscles or the joints where your ribs meet your breastbone. This is why your ribs can feel sore, sharp, or achy after a bad cough.
Why Do Your Ribs Hurt When Coughing?
Coughing is a powerful reflex. It uses your diaphragm, abdominal muscles, and the intercostal muscles between your ribs. These muscles pull on your rib cage to create the force needed to clear your airways. With each cough, the pressure inside your chest spikes. If you cough many times in a row, those muscles can become overworked. The result is a dull ache or sharp pain in the ribs.
The joints where your ribs connect to your breastbone, called costochondral joints, can also get irritated. These joints move slightly with each breath and cough. When they are strained, the pain can feel like it is coming from the rib itself. This is a common cause of rib pain after a prolonged cough.
What Types of Rib Pain Are Common When Coughing?
Most people experience muscle strain. This feels like a soreness or tenderness along the side of the chest. It often gets worse when you cough, sneeze, or twist your torso. The pain is usually dull and spread out over several ribs.
Costochondritis is another common cause. This is inflammation of the cartilage that connects your ribs to your sternum. The pain is sharp, focused, and can be reproduced by pressing on the spots where your ribs meet your breastbone. Coughing can trigger it or make it worse.
A rib fracture is less common but possible, especially in older adults or people with weak bones. The pain from a fracture is sharp and intense. You may feel or hear a crackling sensation when you move or breathe. Bruising may appear on the skin over the injured rib.
Less common causes include pleurisy (inflammation of the lining around the lungs) or muscle spasms. Pleurisy pain is sharp and gets worse with deep breaths and coughs. It often comes with fever or a dry cough.
Could It Be Costochondritis or a Fracture?
Costochondritis and rib fractures both cause chest pain that worsens with coughing. They feel different in important ways.
Costochondritis pain is usually reproducible. You can press on the sore cartilage spots along your sternum and recreate the same pain. It is not accompanied by bruising or a grinding sensation. It is more common in women and people under 40.
A fracture often produces a sharp, localised pain at one specific rib. You may hear or feel a pop or grinding when you move. Bruising may appear. Taking a deep breath or coughing makes it significantly worse. A fracture is more likely if you have osteoporosis, a chronic cough like whooping cough, or a history of heavy coughing fits.
Neither condition is something you should diagnose on your own. If you suspect a fracture or if costochondritis pain lasts more than a few days, see a doctor for an accurate diagnosis.
How Can You Tell If Your Rib Pain Is Serious?
Most rib pain from coughing is a muscle strain that improves on its own within a week. But some signs require medical attention.
- Severe pain that does not improve with rest or over-the-counter pain relievers
- Difficulty breathing or shortness of breath
- Coughing up blood or bloody mucus
- Fever along with chest pain
- Tenderness or swelling that worsens over days
- Unexplained weight loss or night sweats
These symptoms could point to a more serious condition such as pneumonia, a blood clot in the lung, or a rib fracture that needs medical treatment. If you have any of these, do not wait. See a doctor promptly.
What Helps Relieve Rib Pain from Coughing?
If you have a simple muscle strain, the goal is to reduce irritation while your body heals.
Rest is important, but total bed rest is not necessary. Avoid activities that make the pain worse, like heavy lifting or twisting. Sleep in a position that supports your ribs. Lying on the injured side can actually help splint the area. Use a pillow to brace your ribs when you cough.
Ice can reduce inflammation. Apply a cold pack wrapped in a cloth for 15 to 20 minutes several times a day during the first 48 hours. After that, heat may help relax tight muscles.
Over-the-counter pain relievers like acetaminophen (Tylenol) or ibuprofen (Advil, Motrin) can ease discomfort. Ibuprofen is an NSAID that also helps with inflammation. Follow the label directions. Talk to your doctor before taking any pain medicine if you have kidney disease, stomach ulcers, or take blood thinners.
Gentle stretching of the intercostal muscles may help once the worst pain has passed. Try slow, deep breathing to expand your rib cage without forcing it. Do not stretch into pain.
Treat the underlying cough. The fastest way to stop rib pain is to stop coughing. If your cough is from an infection, rest, fluids, and time are usually enough. For a dry, hacking cough, a cough suppressant might help. For a productive cough, you may need to keep coughing to clear mucus. Talk to your doctor about what is right for you.
When Should You See a Doctor for Rib Pain While Coughing?
See a doctor if your rib pain does not improve after a few days of self-care or if it gets worse. Also see a doctor if you have any of the serious symptoms listed earlier.
If you have a chronic condition like osteoporosis, rheumatoid arthritis, or a history of cancer, rib pain from coughing should be evaluated sooner. The risk of fracture or metastasis is higher in these groups.
If you develop a fever or difficulty breathing, seek medical care immediately. These could be signs of pneumonia or a collapsed lung (pneumothorax) related to a rib fracture.
A doctor can perform a physical exam, order an X-ray if a fracture is suspected, or check for costochondritis by pressing on the joints. They can also recommend stronger pain relief or cough medicine if needed.
Can You Prevent Rib Pain from Coughing?
You cannot always prevent a cough, but you can reduce the strain on your ribs when you do cough.
Support your ribs. When you feel a cough coming, hug a pillow or cushion firmly against your chest. This splints the rib cage and reduces the force on your muscles and joints.
Strengthen your core. Strong abdominal and back muscles help distribute the force of a cough more evenly across your torso. Core exercises like planks, bridges, and gentle Pilates can help over time.
Stay hydrated. Thick mucus makes coughing harder and more forceful. Drinking enough water keeps mucus thin and easier to clear with gentler coughs.
Manage chronic cough. If you have asthma, allergies, GERD, or other conditions that cause chronic coughing, work with your doctor to keep them under control. Fewer coughing fits means less rib strain.
Frequently Asked Questions
Can coughing cause a rib fracture?
Yes, but it is rare. Rib fractures from coughing are most common in people with osteoporosis, older adults, or those with a very forceful chronic cough like whooping cough.
How long does rib pain from coughing usually last?
Muscle strain typically improves within a few days to a week. Costochondritis can last longer, sometimes several weeks. If pain persists beyond two weeks, see a doctor.
Is it safe to exercise with rib pain from coughing?
Avoid activities that make the pain worse, such as running, heavy lifting, or contact sports. Gentle walking and stretching are usually fine. Stop if pain increases.
When should I go to the ER for rib pain while coughing?
Go to the emergency room if you have trouble breathing, chest tightness, coughing up blood, or severe pain that does not improve with rest.

