I f you have a cold or the flu, a cough can be useful, if annoying—helping to clear irritants and mucus from the bronchial tubes that lead to your lungs, and possibly preventing a more serious infection, says Marvin M. Lipman, M.D., Consumer Reports’ chief medical adviser.

more on cold & flu

Most coughs ease on their own within several weeks, but they can also be persistent or signal an underlying problem.

“We all naturally lose lung function after age 30, and, as we age, the muscle tone in our throat weakens, so certain cough-related conditions are more common and can signal more concerning causes for cough as we get older,” says Kathleen Akgün, M.D., assistant professor of pulmonary, critical care, and sleep medicine at VA-Connecticut Healthcare System and the Yale School of Medicine.

What should you do about a persistent cough and when? The experts weigh in.

The Infection Connection

Respiratory tract infections such as colds and flu are the leading reason for short-term coughs. Older adults are slightly more likely to develop acute bronchitis—an inflammation of the bronchial tubes that’s marked by coughing—as a result.

The infection usually clears in a few days, but a mucus-producing cough may be persistent. In fact, it can last for three weeks or more after either bronchitis or a sinus infection—another possible byproduct of cold or flu.

There are several possible reasons for this persistent cough. Mucus production may continue after infection, only gradually fading away. In some people, a respiratory infection can cause prolonged airway irritation—which can be accompanied by a persistent cough.

Or airways may become so sensitized by coughing during infection that simply breathing or talking can set off coughing episodes.

“This sensitization can trigger coughing, and—in a vicious cycle—coughing can further sensitize the nerves,” says Neil Schachter, M.D., Maurice Hexter professor of pulmonary medicine at the Icahn School of Medicine at Mount Sinai in New York City.

So, make a doctor’s appointment if your cough doesn’t begin to improve after three or four weeks.

See your doctor right away if you also have a fever over 101° F, shortness of breath, wheezing, or chest pain with breathing, or if you are coughing up blood. Do the same if you have uncontrollable barklike coughing fits several times a day, which could indicate pertussis (whooping cough). This generally requires antibiotics.

What's a Chronic Cough?

When a cough lasts for eight weeks or longer, it’s considered chronic. See your doctor if you have a cough that persists for this long and are unsure why.

One of the most common causes of these persistent coughs is gastroesophageal reflux disease (GERD), which occurs when acid, enzymes, or other stomach contents come back up your esophagus and irritate your throat. This happens more often with age, according to Kenneth W. Altman, M.D., Ph.D., of the Institute for Voice and Swallowing at Baylor College of Medicine.

Blood pressure medications called ACE inhibitors can cause a dry chronic cough. (In this case, your doctor may be able to switch you to another class of drugs.)

Untreated allergies and asthma may also be behind a lasting cough, as can chronic obstructive pulmonary disease (COPD), a group of conditions that cause breathing problems. COPD has no cure, but lifestyle changes and medications can slow its progress.

Other reasons for chronic cough include long-standing or back-to-back respiratory infections, or infections caused by the aspiration of food or liquid. In some instances, a chronic cough may indicate lung cancer.

Treatments That Work

Generally, for coughs associated with simple respiratory infections, you probably don’t need more than warm liquids to relieve irritation and keep mucus thin enough to easily expel—and perhaps honey and/or menthol cough lozenges if the coughing is bothersome.

“Warm liquids open the blood vessels, and the vessels ooze a liquid that coats and moistens the esophagus,” explains Schachter. Can’t sleep? You can consider an over-the-counter (OTC) cough suppressant with dextromethorphan for nighttime coughing (Robitussin Long-Acting CoughGels and generic).

For a cough related to allergies, the newer antihistamines, such as cetirizine (Zyrtec and generic), fexofenadine (Allegra and generic), and loratadine (Claritin and generic), may be helpful. Diphenhydramine (Benadryl Allergy and generic) may help reduce the cough reflex more. But it may be more likely to cause drowsiness.

Editor's Note: This article also appeared in the March 2018 issue of Consumer Reports On Health