Coughing is an important part of your body’s defense against disease. The forceful nature of a cough helps to rid your airways of harmful microbes, extra mucus, and irritants.

A cough is also a common symptom of viral respiratory infections. Usually, this cough goes away shortly after you’ve recovered from the infection. But in some cases, your cough might stick around long after you’ve healed.

A cough that lasts longer than three weeks after a viral respiratory infection is called a post-viral or post-infectious cough.

Coughs are generally categorized as productive (meaning they produce mucus) or dry (meaning they don’t). Post-viral coughs can be productive or dry.

Having a long-lasting cough of any kind can also cause other symptoms, including:

Post-viral coughs are usually caused by viral respiratory infection, such as:

Experts aren’t sure why viral respiratory infections sometimes lead to a chronic cough, but it may be related to:

  • inflammatory response to the infection that damages the lining of your airways, causing you to cough
  • increased sensitivity of the coughing reflex following an infection

If you’re coughing but have had a viral illness in the last few weeks, you likely don’t need to see a doctor. However, asthma, gastroesophageal reflux disease, and other conditions can cause a similar cough.

So, if you’re concerned about your cough or you’re not sure if it’s related to a recent illness, consider seeing a doctor.

The doctor will start by asking whether you’ve been sick in the last month or two. Tell them about any illnesses you’ve had, even if they weren’t respiratory. Next, they may do a physical examination and use a stethoscope to listen to your chest as you breathe in and out.

Depending on what they hear, they might also order a chest X-ray to get a better view of your chest and lungs.

If they suspect an underlying infection, they might also take a sputum sample to check for signs of infectious organisms.

You’ll likely be diagnosed with a post-viral cough if:

  • you’ve recently had a respiratory infection
  • your cough lasts between three and eight weeks
  • a chest X-ray doesn’t show anything unusual

Post-viral coughs often clear up on their own over time, usually within two months. But in the meantime, prescription or over-the-counter (OTC) medications can offer some relief.

These include:

  • prescription inhaled ipratropium (Atrovent), which opens up your airways and prevents mucus accumulation
  • prescription oral or inhaled corticosteroids, which can reduce inflammation
  • OTC cough-suppressants containing dextromethorphan (Mucinex DX, Robitussin)
  • OTC antihistamines, such as diphenhydramine (Benadryl)
  • OTC decongestants, such as pseudoephedrine (Sudafed)

While you recover, you should also try:

  • drinking plenty of warm liquids, such as tea or broth, to soothe throat irritation from coughing
  • using a humidifier or taking a steamy shower to add moisture to the air around you
  • avoiding or protecting yourself against throat irritants, such as cigarette smoke or polluted air

If you’re still coughing after two months, make an appointment with a doctor. Your cough is likely due to something other than a recent viral infection.

While post-viral coughs are frustrating, and especially so when they interfere with sleep, they usually go away on their own within two months.

As you recover, there are several things you can do to reduce coughing and throat inflammation.

If your cough isn’t getting any better after two months, see a doctor to determine what’s causing it.