Pneumonia

Pneumonia is an infection that affects one or both lungs. Bacteria, viruses, and fungi can cause pneumonia.

Emergency Information

If pneumonia symptoms suddenly get worse or you have trouble breathing or talking, call your healthcare provider right away. If you have severe pneumonia, you may need to go to the hospital.

Overview

Pneumonia is a lung infection that causes the air sacs, or alveoli, of the lungs to fill up with fluid or pus. Bacteria, viruses, and fungi can cause pneumonia. Symptoms can range from mild to serious and depend on a person’s age, overall health, and the type of germ causing the infection.

Signs and Symptoms

Symptoms of pneumonia can be mild or serious. Young children, older adults, and people with serious health conditions are at risk for more serious pneumonia or life-threatening complications.

The symptoms of pneumonia may include:

  • Chest pain when breathing or coughing
  • Chills
  • Cough with or without mucus
  • Fever
  • Low oxygen levels in the blood, measured with a pulse oximeter
  • Shortness of breath

Other symptoms may include a headache, muscle pain, extreme tiredness, nausea, vomiting, and diarrhea. Pneumonia can be hard to diagnose because its symptoms are similar to a cold or flu.

Atypical Symptoms in Certain Populations

Older adults and people who have serious illnesses or weakened immune systems may not have the typical symptoms. They may have a lower-than-normal temperature instead of a fever. Older adults who have pneumonia may feel weak or suddenly confused.

Sometimes babies don’t have typical symptoms either. Babies may vomit, have a fever, cough, or appear restless or tired and without energy. Babies may also show these signs of breathing problems:

  • A bluish tone to the skin and lips
  • Grunting
  • Pulling inward of the muscles between the ribs when breathing
  • Rapid breathing
  • Widening of the nostrils with each breath

Often, people who have pneumonia can be successfully treated, though sometimes complications still happen. Complications are more likely if pneumonia is untreated. These complications are more common in children, older adults, and people with other serious conditions.

Complications of pneumonia include:

  • Respiratory failure means the lungs are not able to get enough oxygen to the body.
  • Kidney, liver, and heart damage develops when these organs do not get enough oxygen to work properly or when the immune system responds negatively to the infection.
  • Acute respiratory distress syndrome (ARDS) occurs when the infection causes the lungs to become inflamed and allows fluid to leak into the air sacs.
  • Parapneumonic effusion or empyema is a build-up of fluid or pus around the lungs.
  • Necrotizing pneumonia develops when the infection causes lung tissue to die and form lung abscesses, pockets of tissue filled with pus. This makes pneumonia harder to treat. You may need surgery or drainage with a needle to remove the pus.
  • Sepsis happens when bacteria from the lungs gets into the blood and causes inflammation throughout the body.

Pneumonia can also have long-term effects such as causing depression and worsening heart and blood vessel diseases.

Causes and Risk Factors

Most of the time, the body filters germs out of the air that is breathed in. However, sometimes germs get past those defenses and cause infections. When germs enter the lungs, the body’s immune system goes into action. Immune cells attack the germs and may cause inflammation of the air sacs, or alveoli. That inflammation can cause the air sacs to fill with fluid and pus, making it hard to breathe and get enough oxygen.

Bacteria are a common cause of pneumonia in adults. Many types of bacteria can cause pneumonia, but Streptococcus pneumoniae (also called pneumococcus bacteria) is the most common bacterial cause in the United States.

Some bacteria cause pneumonia with different symptoms or other characteristics than the usual pneumonia. This infection is called atypical pneumonia. For example, Mycoplasma pneumoniae causes a mild form of pneumonia often called “walking pneumonia.” Bacterial pneumonia can develop on its own or after you have a cold or the flu.

Viruses that infect your lungs and airways can also cause pneumonia. The flu (influenza virus) and the common cold (rhinovirus) are the most common causes of viral pneumonia in adults. Respiratory syncytial virus (RSV) is the most common cause of viral pneumonia in young children. SARS-CoV-2, the virus that causes COVID-19, can also cause pneumonia.

In addition, fungi such as Pneumocystis jirovecii may cause pneumonia, especially in people with weakened immune systems. Some fungi found in the soil in the southwestern United States and in the Ohio and Mississippi River valleys can also cause pneumonia.

There are numerous factors that increase the risk for a lung infection and make it more likely the infection will cause pneumonia.

Age

Pneumonia can affect people of all ages. However, two age groups are at higher risk of developing pneumonia and having more serious pneumonia:

  • Babies and children 2 years old or younger are at higher risk because their immune systems are still developing. This risk is higher for premature babies.
  • Adults age 65 or older are also at higher risk because the immune system generally weakens with age. They are also more likely to have chronic (long-term) health conditions that raise the risk of pneumonia.

Environment and Occupation

Most people get pneumonia when they catch an infection from someone else in their community. The chance of getting pneumonia is higher when living or spending a lot of time in crowded places such as military barracks, prisons, homeless shelters, or nursing homes. Regularly breathing in air pollution or toxic fumes also raises risk. In addition, some germs that cause pneumonia can infect birds and other animals, and people who work in chicken or turkey processing centers, pet shops, or veterinary clinics are more likely to encounter these germs.

Certain Behaviors

Using drugs or alcohol can weaken the immune system and raise the risk of accidentally breathing in saliva or vomit. In addition, smoking cigarettes can make it harder to clear mucus from the airways. For free help and support to quit smoking, call the National Cancer Institute’s Smoking Quitline at 1-877-44U-QUIT (1-877-448-7848).

Other Medical Conditions

The following conditions may increase the risk of pneumonia:

People who use a ventilator face an added risk of developing pneumonia. The breathing tube makes it hard to cough, which normally helps clear the airways of germs. Bacteria and viruses can enter the lungs through the breathing tube and cause pneumonia.

Prevention Guidance

Pneumonia can be very serious and even life-threatening, but several steps can help prevent it.

Vaccines

Vaccines can help prevent pneumonia caused by Streptococcus pneumoniae bacteria, Haemophilus influenzae bacteria, the flu virus, RSV, and COVID-19. Vaccines cannot prevent all cases of pneumonia. However, compared to people who do not get vaccinated, those who are vaccinated and still get pneumonia tend to have fewer serious complications, milder infections, and pneumonia that does not last as long.

  • Pneumococcus vaccines: Multiple vaccines are available to prevent infections from pneumococcus bacteria, the most common type of bacteria that causes pneumonia. These vaccines are especially important for adults age 65 or older, children age 2 or younger, people with chronic diseases or serious long-term health problems, people with weakened immune systems, and people who smoke. This may include people who have cancer, HIV, asthma, sickle cell disease, or damaged or removed spleens. For more information, visit the CDC’s Pneumococcal Vaccination page.
  • Flu (influenza) vaccine: A yearly flu vaccine can help prevent pneumonia caused by the flu. The flu vaccine is usually given in September through October, before flu season starts. For more information, visit the CDC’s Seasonal Influenza (Flu) Vaccination page.
  • Hib vaccine: Haemophilus influenzae type b (Hib) is a type of bacteria that can cause pneumonia and meningitis. The Hib vaccine is recommended for all children under 5 years old in the United States and is often given to infants starting at 2 months old. For more information, visit the CDC’s Hib Vaccination page.

Other Prevention Steps

The following steps can also help prevent pneumonia:

  • Wash your hands with soap and water or alcohol-based hand sanitizers to kill germs.
  • Don’t smoke because it prevents the lungs from properly filtering out and defending against germs.
  • Keep your immune system strong by getting plenty of physical activity and following a healthy eating plan.
  • If you have problems swallowing, eat smaller meals of thickened food and sleep with the head of your bed raised up. These steps can help you avoid getting food, drink, or saliva into your lungs.
  • If you have a planned surgery, your provider may recommend not eating for 8 hours or not drinking liquids for 2 hours before surgery to help prevent food or drink from entering the airway while sedated.
  • If your immune system is impaired or weakened, your provider may recommend taking antibiotics to prevent bacteria from growing in the lungs.

You can help reduce others’ risk for pneumonia as well. The following steps can help prevent spreading pneumonia to others:

  • Cover your nose and mouth while coughing or sneezing.
  • Wash your hands often, especially after coughing and sneezing.
  • Get rid of used tissues right away.
  • Limit contact with family and friends while you are sick.

Diagnosis

A healthcare provider diagnoses pneumonia based on medical history, a physical exam, and test results. Sometimes pneumonia is hard to diagnose because symptoms may be the same as a cold or flu. People may not realize their condition is more serious until it lasts longer than these other conditions.

A provider will ask about symptoms and when they began, as well as risk factors for pneumonia. Questions may cover:

  • Exposure to sick people at home, school, work, or in a hospital
  • Flu or pneumonia vaccinations
  • Medicines currently taken
  • Past and current medical conditions and whether any have recently gotten worse
  • Recent travel
  • Exposure to birds and other animals
  • Smoking

During the physical exam, the provider will check your temperature and listen to the lungs with a stethoscope.

If pneumonia is suspected, a provider may order one or more of the following tests:

  • Chest X-ray: Looks for inflammation in the lungs and is often used to diagnose pneumonia
  • Blood tests, such as a complete blood count (CBC): Show whether the body is fighting an infection
  • Pulse oximetry: Measures how much oxygen is in the blood using a small sensor attached to a finger or ear. Pneumonia can keep your lungs from getting enough oxygen into your blood.

For people who are hospitalized, have serious symptoms, are older, or have other health problems, additional tests may include:

  • Arterial blood gas test: Measures blood oxygen levels using a blood sample from an artery, usually in your wrist
  • Sputum test: Uses a sample of sputum or mucus from a cough to find the germ causing pneumonia
  • Blood culture test: Identifies the germ causing the pneumonia and shows whether a bacterial infection has spread to the blood
  • Polymerase chain reaction (PCR) test: Quickly checks blood or sputum to find the genetic material of germs causing the pneumonia
  • Bronchoscopy: Looks inside the airways, and lung tissue and fluid samples may also be collected to help determine the cause of the pneumonia
  • Chest computed tomography (CT) scan: Provides more detail than a chest X-ray, shows how much of the lungs are affected by pneumonia, and can reveal complications such as lung abscesses
  • Pleural fluid culture: Taken using a procedure called thoracentesis, in which a doctor uses a needle to remove fluid from the pleural space between the lungs and chest wall. The fluid is then tested for infection.

Treatment and Management

Treatment for pneumonia depends on risk factors, how serious the pneumonia is, and whether a specific germ causing the pneumonia can be identified. Many people who have pneumonia are prescribed medicine and recover at home. You may need to be treated in the hospital or an intensive care unit (ICU) if your pneumonia is serious.

When pneumonia is mild, a provider may prescribe medicines or suggest over-the-counter medicines to treat it at home. These include:

  • Antibiotics for bacterial pneumonia can help people begin to feel better after one to three days of treatment, but antibiotics should be taken exactly as prescribed. Continue taking the medicine until it is all gone, even if you start to feel better before finishing. Stopping too soon can cause the bacterial infection and pneumonia to come back, and the pneumonia may become resistant to the antibiotic, making treatment more difficult.
  • Antiviral medicine is available for some forms of viral pneumonia.
  • Antifungal medicines can treat fungal pneumonia.
  • Over-the-counter medicines may be recommended to treat fever and muscle pain or help with breathing. A provider should be consulted before taking cough or cold medicine.

For serious pneumonia, hospital treatment may be needed. At the hospital, people with pneumonia may receive medicine and fluids through an intravenous (IV) line. Oxygen therapy may also be used to increase the amount of oxygen in the blood. In very serious cases, a ventilator may be needed to help with breathing.

In very rare cases, a procedure or surgery may also be needed to remove seriously infected or damaged parts of the lung. This may help with recovery and may prevent pneumonia from coming back.

Recovery

Recovery from pneumonia takes time. Some people feel better and return to their normal routines in one or two weeks, while for others it can take a month or longer. Most people continue to feel tired for about a month.

If you are diagnosed with pneumonia, it is important to follow your treatment plan, take steps to help your body recover, monitor your condition, and try to prevent your infection from spreading to others. Take all medicines as prescribed and consider taking the following steps to help aid your recovery:

  • Choose heart-healthy foods because good nutrition helps the body recover.
  • Drink plenty of fluids to stay hydrated.
  • Don’t drink alcohol or use illegal drugs, as these weaken the immune system and can raise the risk of complications.
  • Don’t smoke and avoid secondhand smoke, as breathing in smoke can worsen pneumonia.
  • Get plenty of sleep, which can help the body rest and improve immune system response.
  • Get light physical activity. Moving around can help you regain your strength and improve your recovery. Physical therapy can also help regain strength. However, you may still feel short of breath. Talk to your provider about how much activity is right for you.

Monitor Your Condition

Ask your provider when to schedule follow-up care. If symptoms have not improved, a provider may use a chest X-ray to check for other conditions. Your provider may suggest pulmonary rehabilitation to help you breathe better as the lungs recover.

Pneumonia can have long-term effects such as depression, and worsening heart and blood vessel diseases. Call your provider if you develop these conditions, if your symptoms suddenly get worse, or if you have trouble breathing or talking.

Some people get pneumonia again and again. Tell your provider if this happens.

Find Clinical Trials

Clinical trials uncover better ways to prevent, diagnose, treat, and understand diseases and conditions. To ensure results apply to everyone, volunteers of all ages, sexes, and backgrounds, including both healthy individuals and those with specific medical conditions, are needed. Find clinical trials on pneumonia.

Research Information

The National Institutes of Health (NIH) is the largest public funder of biomedical research in the world. NIH invests most of its budget in medical research seeking to enhance life and to reduce illness and disability. NIH-funded research has led to breakthroughs and new treatments helping people live longer, healthier lives, and building the research foundation that drives discovery.

NIH supports research on the causes, prevention, diagnosis, and treatment of pneumonia.

Find NIH-funded research projects using NIH RePORTER, a searchable database of current and past research projects supported by NIH and other federal agencies.