Why Am I Coughing Up Phlegm? Causes and Treatment

Coughing up phlegm means your airways are producing extra mucus in response to some kind of irritation, whether that’s an infection, an allergen, stomach acid, or something you’ve inhaled. Your respiratory tract normally produces a thin layer of mucus every day to trap bacteria and particles (your lungs deal with millions to billions of inhaled bacteria daily), but you rarely notice it. When something goes wrong, mucus production ramps up, the mucus gets thicker, and your body uses coughing to push it out.

How Your Airways Produce Phlegm

The lining of your airways contains specialized cells that secrete two main types of mucus proteins. One type is produced constantly in small amounts, forming the baseline protective layer. The other is normally almost absent but surges when your lungs are under stress, whether from infection, pollution, or allergic inflammation. When that stress signal hits, cells in the airway lining physically transform into mucus-producing “goblet cells,” dramatically increasing the volume and thickness of what your lungs generate.

This mucus isn’t just sticky goo. About a third of the proteins embedded in it are functional: antimicrobial compounds that attack bacteria directly, antioxidants that protect tissue from damage, and immune molecules like antibodies that help tag and remove pathogens. The mucus also interacts with bacteria through low-level chemical bonds, trapping them so the whole layer can be swept upward by tiny hair-like structures and eventually coughed out. When you’re coughing up phlegm, you’re watching this defense system work in overdrive.

The Most Common Cause: Acute Bronchitis

If your productive cough started recently, acute bronchitis is the most likely explanation. It’s caused by a virus about 95% of the time, typically the same viruses behind colds and flu: rhinovirus, influenza, RSV, adenovirus, and coronaviruses. The infection inflames the bronchial tubes, triggering a flood of mucus that your body tries to expel through coughing.

Most people recover in about two weeks, but the cough can persist for three to six weeks. That lingering cough doesn’t necessarily mean the infection is still active. After the virus clears, inflammation takes time to resolve, leftover mucus continues to irritate the airways, and the nerves that trigger your cough reflex can remain hypersensitive for weeks. This post-infectious cough is extremely common and typically resolves on its own within several weeks, though it can occasionally last months.

What Phlegm Color Actually Tells You

You’ve probably heard that green or yellow phlegm means a bacterial infection, but the reality is more nuanced. The green color comes from an enzyme released by a specific type of immune cell called neutrophils. Clear or white phlegm means few neutrophils are present. Pale yellow indicates a modest number. Deep green means a large number are active in your airways.

Neutrophils respond to both viral and bacterial threats, so yellow or green phlegm doesn’t automatically mean you need antibiotics. That said, research published in BMJ Open Respiratory Research found that green phlegm can predict the presence of bacteria with reasonably good accuracy, while clear phlegm reliably suggests bacteria aren’t a major factor. The color is a clue, not a diagnosis. Rust-colored or blood-streaked phlegm is a different story entirely and warrants prompt medical attention.

When It’s Not a Respiratory Infection

Several conditions produce chronic phlegm without a cold or flu ever being involved.

Silent Reflux

Laryngopharyngeal reflux, often called silent reflux, occurs when stomach acid travels all the way up into the throat. Unlike typical heartburn, you may not feel any burning in your chest. Instead, the acid and digestive enzymes irritate the throat lining, and even small amounts are enough to disrupt the normal mechanisms that clear mucus from your throat and sinuses. The result is a persistent sensation of excess phlegm, throat clearing, and sometimes a hoarse voice. Many people with this condition have no idea acid is the culprit.

Smoking and Air Pollution

Cigarette smoke, including secondhand smoke, contains chemicals and particulate matter that directly increase your airways’ mucus-producing capacity. Over time, exposure causes the number and size of goblet cells and mucus glands to grow permanently, a structural change that means your lungs are physically built to overproduce mucus. This is a hallmark of COPD and chronic bronchitis, and it explains why many smokers have a persistent productive cough that doesn’t go away between illnesses.

Allergies and Asthma

Allergic inflammation triggers many of the same mucus-producing pathways as infections. If your phlegm is worse during certain seasons, around pets, or in dusty environments, an allergic component is likely. Asthma can also cause mucus overproduction, particularly when inflammation goes uncontrolled. In asthma, phlegm color can sometimes help distinguish between types of airway inflammation, though it’s not reliable enough to guide treatment on its own.

Acute, Subacute, or Chronic: Timelines Matter

Doctors classify coughs by duration, and where yours falls can help narrow the cause. A cough lasting less than three weeks is considered acute and is almost always from a respiratory infection. A cough lasting three to eight weeks is subacute, often a post-infectious cough that’s still resolving. A cough lasting longer than eight weeks is chronic and points toward conditions like asthma, reflux, postnasal drip, or smoking-related lung changes.

If you’ve been coughing up phlegm for more than eight weeks, the cause is unlikely to be a lingering cold. Chronic productive coughs deserve investigation because they can signal treatable conditions that won’t resolve without addressing the underlying trigger.

How to Clear Phlegm More Effectively

Staying hydrated is the simplest and most effective step. Thinner mucus is easier to cough up and clear. Over-the-counter expectorants work on the same principle: they add water to the mucus in your airways, making it looser and less sticky. They won’t stop your cough, but they’ll make each cough more productive, which is actually the goal when phlegm is present.

Cough suppressants are a different tool with a different purpose. They reduce the urge to cough, which can help you sleep at night but may slow down mucus clearance during the day. If your cough is productive, suppressing it entirely can leave mucus sitting in your airways longer than it should. Steam inhalation, warm fluids, and sleeping with your head slightly elevated can also help mucus drain more easily, especially if postnasal drip is contributing to the problem.

Blood in Your Phlegm

Small spots or streaks of blood in your phlegm can result from the sheer force of repeated coughing irritating your airway lining, and are worth mentioning to your doctor but aren’t usually an emergency. Coughing up more than a few spots or streaks of blood, or coughing blood alongside difficulty breathing, a rapid heartbeat, or chest pain, requires immediate emergency care. These symptoms can indicate a pulmonary embolism or other serious conditions that need rapid treatment.