How pneumonia spreads from person to person
Pneumonia spreads the same way cold and flu viruses do: through respiratory droplets. When someone with pneumonia coughs, sneezes, or talks, they release tiny droplets containing bacteria or viruses into the air. If you breathe in those droplets, or touch a surface where they landed and then touch your face, you can become infected.
Not everyone exposed to pneumonia will develop it. Your risk depends on your immune system, age, overall health, and whether you have other lung or heart conditions. People over 65, infants under 2, smokers, and those with chronic illnesses like diabetes or heart disease are at higher risk of developing pneumonia after exposure.
The bacteria or virus that causes pneumonia settles in your lungs' air sacs (called alveoli). Your immune system responds by filling these sacs with fluid or pus, which makes it hard for oxygen to reach your bloodstream. This is what causes the symptoms you feel and what doctors see on a chest X-ray.
Key Takeaways
- Pneumonia spreads through respiratory droplets when an infected person coughs, sneezes, or talks, and you breathe them in or touch contaminated surfaces.
- Your risk of developing pneumonia after exposure depends on your age, immune system strength, and whether you have chronic health conditions.
- Bacterial pneumonia can develop after a cold or flu, or on its own, while viral pneumonia usually follows a respiratory virus.
- Vaccines against pneumococcal bacteria and influenza reduce your risk of pneumonia, though they do not prevent all cases.
- Washing your hands regularly, avoiding close contact with sick people, and not smoking are the most effective ways to lower your risk.
When you are most contagious
If you have pneumonia, you are most contagious during the first few days of illness, when symptoms are worst and you are coughing the most. People with bacterial pneumonia tend to be contagious for a shorter period than those with viral pneumonia, especially once antibiotics start working.
You can spread pneumonia even before you realize you have it — during the early days when you think you just have a bad cold. This is why people often catch pneumonia from family members or coworkers without knowing the source was sick.
Risk factors that make you more likely to develop pneumonia
Age is one of the strongest risk factors. Adults 65 and older and children under 2 have weaker immune responses and are more likely to develop severe pneumonia. Infants are especially vulnerable because their lungs are still developing and their immune systems are immature.
Chronic conditions increase your risk significantly. If you have asthma, chronic obstructive pulmonary disease (COPD), heart disease, diabetes, or a weakened immune system, your body is less able to fight off the infection once it takes hold. Smoking damages the lining of your airways and makes it easier for bacteria to settle in your lungs.
Recent respiratory infections also raise your risk. If you have just recovered from a cold or flu, your lungs are already inflamed and more vulnerable to a secondary bacterial infection. This is why pneumonia sometimes develops a week or two after you thought you were getting better from the flu.
Bacterial versus viral pneumonia and how each spreads
Bacterial pneumonia is most commonly caused by a bacterium called Streptococcus pneumoniae. It can develop on its own or after you have had a cold or flu. Bacterial pneumonia tends to come on suddenly with high fever, chest pain, and thick sputum (mucus you cough up). It spreads the same way as viral pneumonia — through respiratory droplets — but antibiotics can stop it once diagnosed.
Viral pneumonia usually develops during or right after a cold or flu. The virus that caused your initial respiratory infection spreads down into your lungs. Viral pneumonia spreads through the same droplet route but cannot be treated with antibiotics. Your immune system has to fight it off, which is why recovery takes longer.
You can also get aspiration pneumonia, which is different. This happens when you accidentally inhale food, saliva, or stomach contents into your lungs instead of swallowing it normally. It is not contagious because it does not involve a pathogen spreading from person to person.
Steps to reduce your risk of catching pneumonia
The pneumococcal vaccine protects against the most common bacterial cause of pneumonia. Two vaccines are now recommended for most adults: pneumococcal conjugate vaccine (PCV20) or a combination of PCV15 followed by PPSV23. Ask your doctor which schedule is right for you based on your age and health history. The flu vaccine also reduces your risk, since pneumonia often follows influenza.
Hand hygiene is your first line of defense. Wash your hands with soap and water for at least 20 seconds, especially after being around sick people, before eating, and after touching your face. Hand sanitizer works if soap and water are not available, but washing is more effective.
Avoid close contact with people who are coughing or sneezing, especially during cold and flu season. If you live with someone who is sick, keep distance when possible and ask them to cover their mouth when they cough. Do not share drinking glasses, utensils, or toothbrushes.
If you smoke, quitting is one of the most important things you can do to lower your pneumonia risk. Smoking paralyzes the tiny hairs (cilia) that sweep bacteria out of your airways, making infection much more likely. Even secondhand smoke exposure increases your risk.
When to see a doctor if you think you have pneumonia
See a doctor if you develop a cough that lasts more than a week, especially if it brings up mucus or blood. Other warning signs include chest pain that gets worse when you breathe or cough, shortness of breath, fever above 100.4°F (38°C), or feeling unusually tired and weak.
Seek immediate care if you have severe shortness of breath, confusion, blue lips or fingernails, or chest pain. These can be signs of serious pneumonia that needs urgent treatment. Older adults and people with chronic conditions should contact a doctor sooner rather than later, since pneumonia can become severe quickly in these groups.
Your doctor will listen to your lungs with a stethoscope and may order a chest X-ray to confirm pneumonia. A sputum sample or blood test can help identify whether it is bacterial or viral. Once diagnosed, treatment depends on the type — antibiotics for bacterial pneumonia, supportive care for viral.
Frequently Asked Questions
Can you catch pneumonia from someone who had it weeks ago?
No. Once someone recovers from pneumonia, they are no longer contagious. The infection has cleared from their lungs and respiratory tract. You cannot catch pneumonia from someone who is fully recovered, even if they still have a lingering cough.
Is pneumonia contagious if you are on antibiotics?
Bacterial pneumonia becomes less contagious within 24 to 48 hours of starting antibiotics, as the bacteria die off and coughing decreases. However, you can still spread it during those first couple of days, so stay home and avoid close contact with others until you have been on antibiotics for at least 48 hours and your fever is gone.
Can you get pneumonia from touching a doorknob or handrail?
It is possible but less common than breathing in droplets directly. The bacteria or virus must survive on the surface, and you must touch your face soon after. Regular handwashing is much more important than disinfecting surfaces, since most respiratory viruses do not survive long on hard surfaces.
Does the pneumonia vaccine prevent all cases of pneumonia?
No. The pneumococcal vaccine protects against the most common bacterial cause, but pneumonia can be caused by other bacteria, viruses, and fungi. The vaccine significantly reduces your risk and makes infection less severe if it does occur, but it is not 100 percent effective.
Can you get pneumonia from cold air or wet hair?
No. Pneumonia is caused by infection with bacteria, viruses, or fungi — not by temperature or moisture. Cold air or wet hair may irritate your airways if you already have a respiratory infection, but they cannot cause pneumonia on their own.