Can coughing cause rib pain?

I feel a pain in my ribs when I cough. Could I be coming down with something?

A bad cough can definitely cause pains in your ribs when you cough. There are muscles between your ribs called your intercostal muscles that are accessory muscles with breathing, and are also involved with coughing. When you breath in your diaphragm contracts and pulls your lungs down drawing air in. Also simultaneously there are muscles in your neck that help pull your chest wall up and out, and the intercostal muscles help to spread your ribs and make your thoracic cavity larger, which makes negative intra-thoracic pressure drawing air into the lungs.
When you exhale/cough the opposite process takes place where the abdominal muscles contract which increases intra-abdominal pressure pushing up on the diaphragm, and the accessory muscles (intercostals, etc) cause the chest wall to get smaller increasing the intrathoracic pressure and forcing air out. The vocal folds which normally open with inhalation and approximate for phonation close completely when coughing, so that the air builds up pressure (like a valve), then they open quickly letting a forceful rush of air out (hopefully propelling out whatever stimulated the cough reflex).
You can imagine that these muscles can all get fatigued/sore and that may be what is causing your ribs to hurt when you cough. I would recommend seeing your primary care physician to get evaluated as to why you have a cough in the first place.

This answer is for general informational purposes only and is not a substitute for professional medical advice.

If you think you may have a medical emergency, call your doctor or (in the United States) 911 immediately. Always seek the advice of your doctor before starting or changing treatment. Medical professionals who provide responses to health-related questions are intended third party beneficiaries with certain rights under ZocDoc’s Terms of Service.