Coughing when you’re sick is your body’s way of clearing your airways of mucus, irritants, and infected material. It’s a protective reflex, not a malfunction. When a virus infects your respiratory tract, it sets off a chain reaction of inflammation, extra mucus production, and heightened nerve sensitivity that makes your airways far more reactive than usual. Understanding why this happens can help you make sense of what your body is doing and when a cough might signal something more serious.
How the Cough Reflex Works
Your airways are lined with specialized nerve endings that act as sensors. These sensors sit primarily in your larynx (voice box) and the branching tubes leading to your lungs. They respond to two types of stimuli: mechanical irritation (like mucus pooling in the wrong place) and chemical irritation (like inflammatory compounds released during an infection).
When these sensors detect something that shouldn’t be there, they send an electrical signal through the vagus nerve to a processing area in your brainstem. That brainstem region coordinates the familiar three-part cough sequence: a deep breath in, a brief closure of the vocal cords to build pressure, then a forceful burst of air that can reach speeds high enough to dislodge mucus and debris from your airway walls. The whole thing happens in a fraction of a second, often before you’re consciously aware it’s coming.
During illness, this system becomes hypersensitive. Inflammatory chemicals released by your immune response can lower the threshold for triggering a cough, meaning stimuli that would normally go unnoticed, like a small amount of mucus or cool air, suddenly set off a coughing fit. A signaling molecule called substance P, released by irritated nerve fibers, further amplifies this sensitivity by ramping up the excitability of neurons in the brainstem’s relay station.
Inflammation and Nerve Sensitization
When a virus like influenza, a rhinovirus (common cold), or COVID-19 infects the cells lining your airways, your immune system launches a local inflammatory response. White blood cells flood the area, and the tissue swells. This swelling narrows your airways and exposes the nerve sensors embedded in the airway lining, making them easier to trigger.
The infection also causes your body to produce higher levels of neuropeptides and leukotrienes, both of which are chemical messengers that amplify inflammation and directly stimulate cough-related nerve fibers. At the same time, the expression of certain receptors on those nerve fibers changes, essentially turning up the volume on every signal they send. This is why a viral cough can feel so persistent and disproportionate to how much mucus you’re actually producing. Your airways are genuinely more irritable at a cellular level.
This heightened sensitivity often outlasts the infection itself. Inflammation can keep your airways reactive for weeks after the virus has been cleared, which is why a lingering cough after a cold is so common.
Mucus Overproduction
Your airways always produce a thin layer of mucus as part of their normal defense system. This mucus traps bacteria, dust, and other particles so tiny hair-like structures called cilia can sweep them up and out. During a respiratory infection, mucus production ramps up dramatically.
The mechanism behind this is an injury-repair cycle. When a virus damages the cells lining your airways, your body responds by converting more of those cells into goblet cells, which are specialized mucus-producing cells. This expansion of the goblet cell population is driven by inflammatory signals, particularly a pathway involving immune signaling molecules that upregulate the genes responsible for mucus production. It’s an adaptive defense: more mucus means more trapped pathogens being moved out of your lungs.
The problem is that all this extra mucus has to go somewhere. When it accumulates faster than the cilia can clear it, your body uses coughing as a backup removal system. This produces the wet, productive cough most people associate with being sick, where you can feel and sometimes see the phlegm you’re bringing up.
Post-Nasal Drip
Many respiratory infections start in or involve the nasal passages and sinuses. When excess mucus builds up in these areas, gravity pulls it down the back of your throat. This post-nasal drip creates a tickling sensation in your throat that triggers repeated coughing, often worse at night when you’re lying down and the drainage pools more easily.
Post-nasal drip can also cause throat irritation and swelling of the tissues in the back of your throat, including the tonsils. This irritation adds another cough trigger on top of whatever is happening in your lower airways. It’s one reason why cold-related coughs often feel like they’re coming from the throat rather than the chest, especially early in the illness before the infection moves deeper into the respiratory tract.
Dry Cough vs. Wet Cough
Not all coughs during illness sound or feel the same, and the difference tells you something about what’s happening in your airways.
A dry cough doesn’t produce mucus. It typically feels like a tickle or irritation in the throat, and it’s driven mainly by inflammation and nerve sensitization rather than excess secretions. Dry coughs are common in the early stages of viral infections, with COVID-19, and during the tail end of an illness when the infection is gone but your airways are still inflamed.
A wet (productive) cough brings up mucus or phlegm. It means your body is actively clearing infected material from your lungs and lower airways. Wet coughs are the hallmark of colds, flu, bronchitis, and pneumonia. Your lungs react to the virus by producing mucus to trap it, then coughing it up.
It’s common for a single illness to involve both types. You might start with a dry cough as inflammation builds, transition to a wet cough as mucus production peaks, and then return to a dry cough during recovery as the inflammation slowly resolves.
How Long a Sick Cough Typically Lasts
An acute cough from a standard viral infection generally lasts up to two weeks, though most resolve within one to three weeks without treatment. This timeline surprises many people who expect a cough to disappear as soon as they start feeling better overall. The lingering cough reflects the slow process of airway healing: even after your immune system defeats the virus, it takes time for swollen tissues to return to normal and for your nerve sensors to dial back their sensitivity.
If a cough persists beyond 10 to 14 days, it’s worth paying attention to the pattern. A fever that gets worse a few days into the illness rather than improving, or symptoms that persist well beyond two weeks, can indicate a secondary bacterial infection. This happens when bacteria take advantage of virus-damaged airways to establish their own infection, potentially leading to bronchitis or pneumonia.
Signs a Cough Needs Medical Attention
Most coughs during illness are the body doing exactly what it should. But certain features suggest something more serious is going on:
- Thick, greenish-yellow phlegm that persists or worsens after the first week
- Bloody or pink-tinged phlegm
- Shortness of breath or difficulty breathing
- Chest pain during coughing
- Fever that returns or worsens after initially improving
- Wheezing
Coughing up blood, choking, trouble breathing or swallowing, or chest pain all warrant emergency care. A persistent stomach ache alongside a cough can sometimes point to pneumonia, particularly in children, even without the classic signs of a lung infection.

