What Do You Cough Up When Sick: Phlegm Colors Explained

When you’re sick, what you cough up is mucus, also called phlegm or sputum. Your airways constantly produce a thin layer of mucus to trap dust, germs, and other particles, but during an illness, production ramps up dramatically and the consistency, color, and volume all change. The color of what you’re coughing up tells you a lot about what’s happening inside your body, from a routine cold to a bacterial infection.

Why Your Body Makes More Mucus When Sick

Your respiratory tract is lined with cells that produce mucus around the clock. Under normal conditions, you swallow most of it without noticing. When a virus or bacteria invades, your immune system triggers inflammation in the airways, and those mucus-producing cells shift into overdrive. The extra mucus serves a purpose: it traps invading pathogens and carries them out of the lungs and throat when you cough.

At the same time, your body sends white blood cells called neutrophils to the site of infection. These cells attack and destroy germs, then die off themselves. The debris from this battle, dead neutrophils, killed bacteria, and shed airway cells, gets mixed into the mucus. That’s why phlegm during an illness looks and feels so different from the thin, clear mucus your body makes on a healthy day. It’s thicker, stickier, and often colored.

What Each Color of Phlegm Means

Clear or White

Clear mucus is normal and usually signals a viral infection like the common cold, especially in the early stages. White or slightly cloudy phlegm means the mucus has thickened, often from congestion or mild inflammation. Neither color is a sign of bacterial infection.

Yellow

Yellow phlegm appears when your immune response intensifies. Neutrophils flooding the area release enzymes as they fight off germs, and those enzymes tint the mucus yellow. This is a normal part of your body clearing an infection and is common during colds and flu. Yellow phlegm alone does not mean you need antibiotics. The CDC states plainly that colored sputum does not indicate bacterial infection.

Green

Green phlegm takes the yellow process a step further. The green color comes from an enzyme called myeloperoxidase, which neutrophils release in large amounts during intense immune activity. This enzyme contains an iron-based pigment that turns purulent (pus-filled) mucus distinctly green. Research in respiratory medicine found that about 84% of dark green sputum samples contained bacteria, compared with 38% of lighter-colored samples. So green phlegm is more associated with bacterial infection than yellow, but it’s not a guarantee. Viral infections can produce green mucus too, especially a few days into an illness when dead immune cells accumulate.

Pink, Red, or Rust-Colored

Any shade of red in your phlegm means blood is present. Small streaks of blood are common and usually result from irritated or inflamed airways after repeated forceful coughing. The blood typically looks bubbly or frothy and is mixed with mucus rather than appearing as pure blood. Rust-colored phlegm can occur with pneumonia, where small amounts of blood mix with yellow or green mucus.

Coughing up large amounts of blood is different and more serious. This can signal a severe lung infection, a blood vessel issue, or in rare cases, lung cancer. If you’re producing more than a few streaks of blood, or if bloody phlegm lasts more than a day or two, that warrants prompt medical attention.

Brown or Black

Dark phlegm usually has an environmental cause rather than an infectious one. Smoking is the most common reason. The chemicals in cigarettes lodge in your airways and darken the mucus over time. Heavy air pollution, wildfire smoke, or workplace dust exposure can do the same thing. In less common cases, brown or black sputum can indicate old blood that has oxidized, or it may be related to a fungal infection. People on blood-thinning medications who notice dark phlegm should mention it to their doctor, as it can signal internal bleeding.

The Green Phlegm and Antibiotics Myth

One of the most persistent misunderstandings about coughing up mucus is that green phlegm automatically means you need antibiotics. It doesn’t. Most upper respiratory infections are caused by viruses, and antibiotics do nothing against viruses. Your body produces green mucus as part of its normal immune response regardless of whether the infection is viral or bacterial.

The intensity of the green color does correlate with neutrophil activity and bacterial presence to some degree. Studies in COPD patients found that green sputum detected bacterial infection with about 94% sensitivity but only 77% specificity, meaning some people with green phlegm didn’t actually have a bacterial infection. For otherwise healthy people fighting a cold or flu, green phlegm in the first week or two is usually nothing more than your immune system doing its job.

How Long a Productive Cough Lasts

Most people expect a cough to disappear once they start feeling better, but productive coughing (coughing up mucus) often lingers well beyond the worst days of an illness. A persistent post-infection cough typically lasts three to eight weeks. During this time, you may still bring up small amounts of mucus even though the infection itself has cleared. Your airways remain inflamed and hypersensitive for weeks after a virus, which keeps the cough reflex active.

The mucus you produce during this tail end of recovery is usually lighter in color, transitioning from yellow or green back to white or clear. If the color stays dark green or turns darker after initially improving, that could signal a secondary bacterial infection developing on top of the original viral illness. A cough that stretches beyond eight weeks is no longer considered a typical post-infection cough and is worth investigating.

What to Watch For

Most productive coughs during a cold or flu resolve on their own. But certain patterns signal something more serious is going on:

  • Thick green or yellow phlegm with a high fever lasting more than a few days, which may suggest pneumonia or a bacterial sinus infection
  • Blood in your phlegm that’s more than light streaking, or that persists beyond a couple of days
  • Difficulty breathing or wheezing alongside a productive cough
  • Painful or difficult swallowing that accompanies the cough
  • A cough lasting longer than three weeks with no improvement

One useful distinction: blood you cough up looks like blood-stained spit mixed with mucus, often bubbly or frothy. This is different from vomiting blood, which involves larger quantities and comes from the digestive tract rather than the lungs. If you’re unsure which you’re experiencing, the appearance and volume are the clearest clues.