If your stomach hurts when you cough, you need to see a doctor right away. Your doctor will do an exam and run tests to find out what’s causing the pain. You may have a hernia, pancreatitis, gallstones or other health problems. Once your doctor knows what’s causing your pain, they can give you proper treatment. You can take acetaminophen (Aspirin Free Anacin, Liquiprin, Panadol) for your stomach pain and ice packs can help with hernia pain. Avoid taking non-steroidal anti-inflammatories (NSAIDs) like aspirin, ibuprofen or naproxen (Advil, Motrin, Aleve). They can irritate your stomach.
The most common cause of abdominal pain when you cough is overuse and strain of the stomach muscles. Excessive coughing, even for a short period of time such as when you have the common cold, can overwork and strain your stomach muscles. This pain usually goes away as the muscles recover.
The location of the pain is also important to consider. If the pain is generalized across the entire abdomen, it’s likely due to a virus or indigestion. Localized pain, on the other hand, can be caused by an inflamed organ or a cyst. A hernia can be especially painful when coughing because it occurs when the intestines or other internal organ pushes through a gap in the muscles of the abdomen or groin. A hernia needs to be addressed by a physician right away to prevent it from getting worse and requiring surgery.