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 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 two to three out of every 1,000 people.
What are the types of pneumonia?
There are three basic types of pneumonia, based on how someone gets the infection:
- Community-acquired pneumonia – Occurs when a person becomes 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.
What causes pneumonia?
An infection causes pneumonia, but there are many possible causes of the illness, including viruses, bacteria, and fungi.
Many viruses can cause pneumonia, but the most common are:
Several different types of bacteria can cause pneumonia. The repeated use of antibiotics can lead to the development of certain types of resistant bacterial pneumonia. You should only receive antibiotics if doctors know what bacteria caused your pneumonia.
Some people are at risk for pneumonia due to a fungus, especially if their immune system is weakened. Sometimes, doctors never find out what kind of germ caused a person's pneumonia.
Anyone can develop pneumonia as a complication of an infection.
Pneumonia risk factors
About half of all people who get pneumonia are between the ages of 18 and 57. And about half the people who die from bacterial pneumonia are 18 to 64 years old.
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 form 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 you 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 certain types of pneumonia infections is to get the following vaccines:
- Flu.
- COVID-19.
- Pneumococcal.
- H. influenzae type b (Hib) in children.
- Measles.
- Chickenpox.
- Pertussis or whooping cough.
Other things you can do to reduce your risk of catching pneumonia are to:
- Avoid people who are sick, especially if you have a weak immune system.
- Avoid touching your eyes, nose, mouth, or face often.
- Clean surfaces that people touch often.
- Maintain your home's air conditioners, humidifiers, fountains, or water pipes.
- Quit smoking or stay away from people who smoke.
- Wash your hands routinely.
Follow your doctor's instructions for managing asthma, diabetes, and heart disease (if you have any of these).
How common is pneumonia?
Pneumonia is the eighth most common cause of death in the U.S., claiming the lives of about 50,000 people each year. During very bad flu seasons, deaths from pneumonia are much higher. Pneumonia is also the most common cause of hospitalization in the U.S., after giving birth.
What Are the Signs and Symptoms of Pneumonia?
Symptoms of pneumonia include:
- Chest pain or tightness.
- Cough.
- Fever or chills.
- Muscle aches.
- Not feeling hungry.
- Rapid breathing or trouble breathing.
- Rapid heartbeat.
- Shortness of breath.
- Sputum (mucus) production.
When should I see a doctor about my pneumonia symptoms?
If you have a fever, contact your doctor to determine if an appointment is necessary. If you have several pneumonia symptoms, you should go to an ER or urgent care as soon as possible.
How Do You Diagnose Pneumonia?
To diagnose pneumonia, your doctor will:
- Ask you about your symptoms.
- Do a physical exam.
- Listen to your chest while you take deep breaths to see if there's fluid or inflammation in your lungs.
- Listen to your 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 to help diagnose pneumonia include:
- Blood tests.
- COVID-19 test.
- Cultures of your sputum.
- Flu test.
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 use the most recent treatment guidelines for 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 pneumonia caused by bacteria, but will not help pneumonia caused by a virus. 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 treat 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:
- Avoid people who are coughing or sneezing or who look sick.
- 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 symptoms that worsen.