Walking pneumonia is usually caused by bacteria, not a virus
Walking pneumonia — the kind where you stay on your feet and keep working — is most often caused by a bacterium called Mycoplasma pneumoniae. This is different from other types of pneumonia, which may be viral or caused by different bacteria. The distinction matters because it affects how doctors treat you and what you can expect as you recover.
Mycoplasma is unusual. It is smaller than most bacteria and lacks a cell wall, which makes it harder for your immune system to fight and harder for some antibiotics to kill. It spreads through respiratory droplets — the same way a cold spreads — which is why walking pneumonia often starts like a regular respiratory infection and why people can have it for weeks without realizing how serious it is.
A smaller number of walking pneumonia cases are caused by viruses, particularly respiratory viruses like influenza or parainfluenza. Viral walking pneumonia tends to be milder and usually clears on its own, though recovery can take several weeks.
Key Takeaways
- Walking pneumonia is caused by the bacterium Mycoplasma pneumoniae in most cases, though some cases are viral.
- Mycoplasma pneumonia spreads through coughing and sneezing, much like a cold, and symptoms can linger for weeks.
- A chest X-ray or blood test can help your doctor determine whether the cause is bacterial or viral.
- Bacterial walking pneumonia is treated with antibiotics, while viral cases are managed with rest and supportive care.
- You remain contagious for the first few days of treatment, even if you feel well enough to work.
How doctors tell the difference between bacterial and viral walking pneumonia
Your doctor cannot tell by listening to your lungs whether walking pneumonia is bacterial or viral. They will likely order a chest X-ray, which shows a pattern of inflammation in your lungs. The X-ray appearance is similar for both types, so the X-ray alone does not answer the question.
To identify the cause, your doctor may order a blood test that looks for antibodies to Mycoplasma or a rapid test that detects the bacterium directly. Some doctors also test for common viruses like influenza. These tests take a few days to come back, so your doctor may start treatment before results arrive if your symptoms are severe.
In practice, many doctors treat suspected walking pneumonia with an antibiotic that works against Mycoplasma — such as azithromycin or doxycycline — without waiting for test results. If the infection is viral, the antibiotic will not help, but it will not cause harm either. If symptoms do not improve after a few days of antibiotics, your doctor may reconsider the diagnosis.
Why Mycoplasma pneumonia is harder to treat than other bacterial infections
Mycoplasma pneumoniae has a cell membrane but no cell wall, which is the rigid outer layer that most bacteria have. This structure makes it resistant to penicillin and cephalosporin antibiotics, which work by breaking down the cell wall. Instead, doctors use macrolide antibiotics (like azithromycin), tetracyclines (like doxycycline), or fluoroquinolones, which attack the bacterium in different ways.
Even with the right antibiotic, Mycoplasma can be slow to clear. You may feel better within a few days of starting treatment, but the cough and fatigue can persist for weeks. Some people develop a lingering cough that lasts a month or longer, even after the infection is gone.
Viral walking pneumonia does not respond to antibiotics at all. Treatment focuses on rest, fluids, and over-the-counter pain relievers or fever reducers. Most people recover within two to three weeks, though a dry cough may linger.
Symptoms that suggest walking pneumonia rather than a regular cold
Walking pneumonia often starts like a cold or bronchitis — sore throat, runny nose, mild fever — but the cough is the key difference. The cough in walking pneumonia is usually dry and persistent, lasting more than a week. It may get worse at night or when you lie down. Some people cough so hard they develop chest pain or rib soreness.
You may also notice shortness of breath, especially when climbing stairs or exerting yourself. Fatigue is common and can be more severe than with a regular cold. Some people develop a low fever that comes and goes, or no fever at all — which is why the infection can feel mild even though your lungs are inflamed.
If you have a cough that lasts more than a week, especially if it is accompanied by shortness of breath or chest discomfort, contact your doctor. A chest X-ray can confirm whether pneumonia is present.
When walking pneumonia spreads and how long you are contagious
Walking pneumonia spreads through respiratory droplets — tiny particles released when you cough or sneeze. You are most contagious during the first few days of illness, before symptoms fully develop. This is one reason walking pneumonia spreads so easily: people feel well enough to go to work or school and unknowingly infect others.
You remain contagious for about 24 to 48 hours after starting antibiotics, even though you may feel better. If you have walking pneumonia, stay home from work or school for at least the first few days of treatment. Wear a mask if you must be around others, and wash your hands frequently.
People with viral walking pneumonia are also contagious during the acute illness phase, typically for about a week. Since there is no antibiotic to shorten the contagious period, staying home for several days is especially important.
Risk factors that make walking pneumonia more likely
Walking pneumonia can affect anyone, but certain groups are at higher risk. People who smoke, have asthma or other chronic lung disease, or have a weakened immune system are more likely to develop pneumonia when infected with Mycoplasma. Older adults and very young children also tend to have more severe infections.
People living or working in crowded environments — dormitories, military barracks, schools, or nursing homes — are more likely to be exposed to Mycoplasma. Outbreaks of walking pneumonia sometimes occur in these settings.
If you have a chronic health condition or a weakened immune system, contact your doctor as soon as you develop a persistent cough. Early treatment may prevent the infection from becoming more serious.
What to expect during recovery from walking pneumonia
If your walking pneumonia is bacterial and caused by Mycoplasma, antibiotics usually reduce fever and improve energy within a few days. However, the cough often persists for weeks, even after the infection is cleared. This lingering cough does not mean the infection is still active — it reflects inflammation in your airways that takes time to heal.
During recovery, rest is important. Even though you may feel well enough to return to normal activities, your lungs are still healing. Pushing too hard too soon can delay recovery or trigger a relapse. Most doctors recommend easing back into exercise and strenuous activity over a week or two.
If you are not improving after a week of antibiotics, or if your symptoms worsen, contact your doctor. Rarely, walking pneumonia can lead to complications like fluid around the lungs or inflammation of the heart muscle, so follow-up care is important if recovery is not progressing as expected.
Frequently Asked Questions
Can you catch walking pneumonia from someone who has it?
Yes. Walking pneumonia spreads through coughing and sneezing, just like a cold. You are most likely to catch it from someone in the first few days of their illness, before they realize they have pneumonia. If someone you live or work with has walking pneumonia, wash your hands often and avoid sharing food or drinks.
Does walking pneumonia always require antibiotics?
If the cause is bacterial (Mycoplasma), antibiotics are recommended to shorten the illness and reduce contagiousness. If the cause is viral, antibiotics do not help, and treatment focuses on rest and supportive care. Your doctor can help determine whether antibiotics are needed based on your symptoms and test results.
How long does it take to feel better after starting antibiotics?
Most people feel noticeably better within two to three days of starting the right antibiotic — fever drops, energy improves, and the cough may ease slightly. However, a dry cough often persists for weeks. If you do not feel better after three to five days of antibiotics, contact your doctor to discuss whether a different treatment is needed.
Is walking pneumonia more serious than regular pneumonia?
Walking pneumonia is typically milder than other types of pneumonia, which is why people can stay active despite having it. However, it is still a real lung infection and should be treated. In people with weakened immune systems, chronic lung disease, or other serious health conditions, walking pneumonia can become more severe.
Can you get walking pneumonia more than once?
Yes, you can be infected with Mycoplasma pneumoniae more than once in your lifetime. Immunity after infection is incomplete and fades over time. However, reinfection is usually milder than the first infection because your immune system has some memory of the bacterium.