Most coughs from pneumonia last for 2 weeks. Some people have significant coughs for 3 weeks. About 20% of people may have lingering coughs for a month. It is very uncommon for pneumonia cough to last longer than six weeks. If you still have coughs six weeks after pneumonia, you need to see your doctor to make sure you haven’t developed anything else.
With regular community-acquired pneumonia, early coughs are usually associated with lots of phlegm. When pneumonia is active, there is significant inflammation inside your lungs. White blood cells (WBCs) and fluids rush to your lungs to fight the infection. Your cough helps get rid of these waste products in the form of thick, yellow phlegm. After about a week, your cough may produce more of a rusty-colored phlegm, as WBCs decrease while dried blood and dead cells increase. As more time passes, you may have more dry coughs than coughs with phlegm.