Pneumonia is a lung infection caused by bacteria, viruses, or fungi. Some pneumonia cases are mild, while others can be severe — or even deadly. Symptoms may include a cough (either dry or productive), fever, chills, and difficulty breathing.
You should call your doctor if you have a fever, difficulty breathing, or if any of your symptoms worsen.
On this page:
What Is Pneumonia?
Pneumonia is a contagious lung infection caused by bacteria, viruses, or fungi. Before the COVID-19 pandemic, about 1.5 million people received a pneumonia diagnosis in the ER each year, or about 2 to 3 per 1,000 people.
Pneumonia causes the alveoli (air sacs in your lungs) to become inflamed. This inflammation is what makes breathing difficult and sometimes painful.
When you get pneumonia, it may infect only one lung or both. It can also spread from one lung to the other.
Some forms of pneumonia are contagious. A person with pneumonia can spread the germs when they cough, laugh, sneeze, or sing. These actions expel the viruses or bacteria that cause the disease.
Tiny droplets can also land on common surfaces like tables, phones, or computers. You can inhale the droplets and bring them into your respiratory tract.
How long you are contagious depends on the type of pneumonia you have and how you got it. Some types of pneumonia are more contagious than others. Two highly contagious strains are mycoplasma and mycobacterium.
Though some forms of pneumonia are contagious, the disease doesn't spread as easily as a cold or the flu. Transmission to another person usually requires more exposure to the infectious germs of the person with pneumonia. That's why the disease is more common among people who have been in the same area — like a hospital — with other people who have pneumonia.
What are the types of pneumonia?
There are several types of pneumonia. Doctors classify them based on how someone gets the infection.
They include:
Viral infections
Many different types of viruses can cause pneumonia, including:
- Adenovirus.
- COVID-19.
- Human metapneumovirus.
- Human parainfluenza virus.
- Influenza (the flu).
- Measles.
- Respiratory syncytial virus (RSV).
- Rhinovirus (the common cold).
- Varicella (chicken pox).
If you have viral pneumonia, the contagious period starts to subside when your symptoms subside. This is especially true for fevers. Someone who had pneumonia may still cough occasionally for several weeks, even after they're no longer contagious, but the cough usually becomes drier.
Bacterial infections
Bacterial forms of pneumonia include:
- Streptococcus pneumoniae.
- Haemophilus influenzae.
- Legionella pneumophila.
- Bordetella pertussis (causes whooping cough).
- Chlamydia psittaci (causes psittacosis).
- Mycoplasma pneumoniae.
- Staphylococcus aureus.
When a person with bacterial pneumonia starts antibiotics, they are only contagious for the next 48 hours. This period can last longer for certain types of organisms, including those that cause tuberculosis (TB). In the case of TB, you can remain contagious for up to two weeks after starting antibiotics.
Fungal and parasitic infections
These are rare types of pneumonia. They usually only occur in people with already weakened immune systems, such as those with HIV, receiving chemotherapy, or other immunosuppressing medications. If your immune system is weak, you are more susceptible to infections of all kinds.
These types of pneumonia indicate which pathogen first infected the lungs and caused the disease.
They include:
- Bird droppings.
- Fungi inhaled from the soil.
- Parasites.
Other types of pneumonia
Sometimes providers describe pneumonia in terms of where you got it.
- Community-acquired pneumonia — Occurs when a person gets infected outside of a health care setting.
- Health care-acquired pneumonia – Occurs when a person gets infected while in a hospital, nursing home, or other health care setting.
- Ventilator-acquired pneumonia – Occurs when a person gets the disease while on a machine that helps them breathe.
- Walking pneumonia — A common term for mild cases of pneumonia in which you still feel well enough to function. Although the symptoms are milder than those of other forms of pneumonia, it is still very contagious.
What causes pneumonia?
Pneumonia can result from exposure to someone with the condition, a viral illness, or environmental factors.
In most cases, an infection is the root cause of pneumonia. The infection can come from viruses, bacteria, or fungi.
Many viruses can cause pneumonia, but the most common are:
- Flu.
- COVID-19.
- Respiratory syncytial virus (RSV).
Several different types of bacteria can cause pneumonia. Repeated antibiotic use can lead to the development of certain types of resistant bacterial pneumonia. You should receive antibiotics only if doctors know which bacteria caused your pneumonia.
Some people are at risk of fungal pneumonia, especially if their immune systems are weakened. Sometimes doctors never find out which germ caused a person's pneumonia.
Anyone can develop pneumonia as a complication of an infection, but certain factors increase your risk.
Pneumonia risk factors
Pneumonia affects all age groups, but the risk increases sharply with age. Adults ages 65 and older have the highest rates of pneumonia and account for the majority of pneumonia-related deaths. In the United States, pneumonia contributes to approximately 53,000 deaths annually, with the vast majority occurring in those over 65.
People with a higher risk of pneumonia include those who:
- Are 65 years old or older.
- Are receiving treatment for cancer.
- Have a weakened immune system.
- Have breathed in toxic chemicals recently or frequently over time.
- Have received an organ transplant.
- Smoke or spend time around people who smoke.
- Take medicine that weakens or suppresses their immune system.
People with chronic health conditions also have a higher risk of pneumonia, including:
- Cancer.
- Congestive heart failure.
- Conditions that weaken the immune system.
- COPD.
- Diabetes.
- HIV/AIDS.
- Sickle cell anemia.
Complications of pneumonia
If people with pneumonia don't receive treatment, many will develop complications — and some may even die. People who get pneumonia in the hospital often have a higher risk of dying than those who get it in the community.
Pneumonia is also the most common cause of sepsis, a very serious condition that can cause death. Sepsis occurs when the immune system overreacts to an infection.
Even if they receive treatment for pneumonia, some people suffer long-term effects, such as:
- Feeling tired or unable to exercise as much.
- Heart disease.
- Other lung diseases.
- Poor quality of life.
- Trouble thinking or concentrating.
How can I prevent pneumonia?
The best way to prevent pneumonia is to avoid people who are sick, practice good hand hygiene, and stay up to date on recommended vaccinations.
Lifestyle changes
Avoid habits that weaken your immune system and make you more vulnerable to getting diseases.
Things you can do to reduce your risk of catching pneumonia are:
- Avoid people who are sick, especially if you have a weak immune system.
- Avoid touching your eyes, nose, mouth, or face.
- Clean surfaces that people touch often.
- Limit your use of alcohol.
- Maintain your home's air conditioners, humidifiers, fountains, or water pipes.
- Quit smoking or stay away from people who smoke.
- Wash your hands routinely.
Some chronic conditions make you more vulnerable to illnesses like pneumonia. If you have a chronic condition that might weaken your immune system, you should monitor your health.
It's important to check in with your doctor regularly. Follow your doctor's instructions for managing chronic lung conditions, diabetes, and heart disease (if you have any of these conditions).
Vaccines
You can keep yourself healthy by staying up to date with vaccines for illnesses that can lead to pneumonia.
You can prevent certain types of pneumonia infections by getting the following vaccines:
- Flu.
- COVID-19.
- RSV (in children and older adults).
- Pneumococcal (>50 years old or those with certain risk factors).
- H. influenzae type b (Hib) in children.
- Measles.
- Chickenpox.
- Pertussis, or whooping cough.
How common is pneumonia?
Pneumonia is common and serious. It is the most common infectious cause of hospitalization in U.S. adults and one of the leading preventable causes of hospital admission, alongside heart failure and COPD.
Pneumonia is also a major cause of death in the United States. Each year, pneumonia claims approximately 50,000 to 53,000 lives. During severe flu seasons, pneumonia-related hospitalizations and deaths rise significantly.
Pneumonia can be fatal at any age, but the risk is greatest for adults ages 65 and older, who account for the majority of pneumonia deaths. Mortality increases sharply with age and the presence of chronic medical conditions.
What Are the Signs and Symptoms of Pneumonia?
When you first come down with pneumonia, you may think you have a cold or the flu. The symptoms are similar. But with pneumonia, symptoms last longer and become more severe over time rather than less severe.
Symptoms of pneumonia include:
- Chest pain or tightness.
- Cough.
- Fever or chills.
- Muscle aches.
- Not feeling hungry.
- Post-cough vomiting.
- Rapid breathing or trouble breathing.
- Rapid heartbeat.
- Shortness of breath.
- Sputum (mucus) production.
The incubation period is the time from when you catch pneumonia until you have symptoms.
Many factors can affect this timing, including:
- The type of pneumonia.
- Your age.
- Your overall health.
When should I see a doctor about my pneumonia symptoms?
If you have a fever and a cough after having flu-like symptoms, you should see your primary care provider (PCP).
These symptoms include:
- Aches and pains in the chest when you draw in a breath.
- Chills and fever.
- Cough that produces brown, green, or yellow phlegm.
- Diarrhea.
- Fatigue.
- Nausea and vomiting.
You should seek care as soon as possible if you have:
- A chronic condition like HIV or diabetes, along with pneumonia symptoms.
- A depressed immune system, along with pneumonia symptoms.
- Confusion.
- High fever (102° F or 39° C).
- Pain after a pneumonia diagnosis.
- Several pneumonia symptoms at once.
- Shortness of breath.
These symptoms typically appear within three days to a week of when you first start feeling ill.
Because the symptoms of pneumonia worsen with time, it's important to see a doctor sooner rather than later.
How Do You Diagnose Pneumonia?
To diagnose pneumonia, your doctor will:
- Ask you about your symptoms.
- Check your vital signs.
- Do a physical exam to listen to your lungs and heart.
Your doctor will also do some tests. The most helpful is an x-ray of your chest. If your chest x-ray shows swelling or fluid in your lungs, that may mean you have pneumonia.
Other tests that are sometimes needed include:
- Blood tests.
- Viral testing (Flu, COVID, RSV, etc.).
- Culture of your sputum.
How Do You Treat Pneumonia?
The best things you can do when you have pneumonia are to:
- Drink lots of fluids.
- Follow your doctor's treatment plan.
- Get plenty of rest.
Doctors at UPMC follow the latest guidelines for treating pneumonia. The goal of treatment is to cure the infection or treat the symptoms until the infection goes away on its own. Treatment often depends on the cause.
Antibiotics can treat bacterial pneumonia, but will not help viral pneumonia. If a viral or fungal infection is the cause, some antiviral medications or treatments may help in some instances. You may also receive drugs to reduce a fever or relieve other symptoms, such as coughing.
Hospitalization for pneumonia
If you have severe pneumonia, you may need treatment in the hospital, which allows your doctors to watch you closely and give you:
- Breathing treatments.
- Certain drugs.
- IV fluids, if needed.
Some people with pneumonia only need to stay in the hospital for a few days. Others may need to stay for a few weeks.
Pneumonia recovery
When you go home from the hospital after pneumonia, you may still need time to heal.
The following can help you feel better faster:
- Practice taking deep breaths every hour and coughing to help clear your lungs.
- Avoid people who are coughing or sneezing or who look sick.
- Don't smoke or spend time around people who smoke.
- Drink lots of water or other fluids.
- Get plenty of rest.
- Stop exercising if you get exhausted or start coughing.
Contact your doctor if you develop a fever or other worsening symptoms.
Why Choose UPMC for Pneumonia Care?
The medical team at UPMC wants to get you up and around and feeling better as soon as possible. The doctors and other staff members have treated thousands of pneumonia cases. Here are some other reasons to choose UPMC for your care.
- We conduct cutting-edge research — One recent research topic was antibiotic resistance. Knowing which antibiotics to offer, and when, is vital for pneumonia treatment.
- We offer compassionate care for all ages — Anyone can get pneumonia. We understand that pneumonia can take a toll on your general well-being, no matter your age.
- We treat a wide range of infectious diseases — Our doctors are experts at diagnosing and providing the best treatment for diseases that start with infections.
- We use a team approach — We have the resources to call in experts from other fields if you have complications from pneumonia.