Pneumonia

Pneumonia is a common lung infection in which the lung’s air sacs (alveoli) fill with pus and fluid. This causes you to cough up phlegm (mucus) and have trouble breathing. Pneumonia can range from mild to life-threatening.

The two main types of pneumonia

  • Bronchial pneumonia (bronchopneumonia): Your bronchioles are the networks of airways that spread throughout your lungs. Bronchial pneumonia affects these bronchioles and the lung’s air sacs, meaning it affects patches throughout the lungs.
  • Lobar pneumonia: Your lungs are divided into several parts called lobes. Lobar pneumonia affects one or more of these lobes.

Don't ignore pneumonia symptoms

When caught early, pneumonia is often treatable and resolves with few problems. If you have symptoms of pneumonia, you should go see your doctor or book an appointment at an urgent care clinic.

What are some symptoms of pneumonia?

Symptoms in adults

The symptoms of pneumonia include:

  • Chills and shaking.
  • Cough that produces yellow or green sputum (mucus) or bloody mucus.
  • Extreme tiredness (fatigue).
  • Fever.
  • Headaches.
  • Loss of appetite.
  • Muscle pain and weakness.
  • Rapid breathing.
  • Rapid pulse.
  • Sharp or stabbing chest pain or back pain that’s worse with deep breathing or coughing.
  • Shortness of breath that gets worse with activity.
  • Sweating.

Young man sleeping on his back

Symptoms in children

Children and babies are more likely to develop pneumonia than adults. In addition to adult symptoms, children and babies may experience:

  • Diarrhea.
  • Vomiting.
  • Increased fussiness or refusal to eat.

When to see your doctor

Call your doctor or visit an urgent care clinic if you suspect that you, your child, or an elderly person has pneumonia.

Seek emergency medical care if you or your loved one:

  • Becomes confused or delirious.
  • Falls unconscious.
  • Has a fever greater than 102°F.
  • Has chest pain.
  • Has severe breathing trouble.
  • Has an underlying respiratory or heart condition, or is immunocompromised.

Pneumonia: causes and types

Pneumonia happens when a virus, bacteria, or fungi gets into your lungs and activates an immune response. Your body sends immune cells (white blood cells) to the site of infection. These cells, plus fluid and the bacteria or fungi, accumulate and fill your alveoli with pus. This, in turn, causes the symptoms of pneumonia, like a phlegmy cough and trouble breathing.

Many of the bacteria and viruses that cause pneumonia can be found in the air we breathe, meaning that pneumonia can be contagious.

Bacterial pneumonia. Bacterial pneumonia is the most common and often most severe type of pneumonia. It is caused by bacteria, usually streptococcus pneumoniae. You get bacterial pneumonia when the bacteria find a way into your lungs and start to multiply. This can happen on its own, from breathing infected air. It can also develop when your lungs have been weakened, such as after having a cold or the flu.

People who are older or have weakened immune systems are also more likely to develop bacterial pneumonia.

Fungal pneumonia. Fungi are small organisms that can cause infection. People with chronic health conditions or weakened immunity, like those with HIV/AIDs, are more likely to get fungal pneumonia. These fungi can be found in soils and bird droppings, and you can also inhale fungal spores.

Mycoplasma pneumonia. Mycoplasma pneumonia is a type of atypical bacterial pneumonia. It usually spreads throughout the lungs but causes milder symptoms.

Mycoplasma pneumonia is sometimes called “walking pneumonia,” and it is contagious.

Viral pneumonia. Viruses like influenza (the flu), respiratory syncytial virus (RSV), and SARS-CoV-2 (the virus that causes COVID-19) can all cause pneumonia. Viral pneumonia is the most common type of pneumonia for young children. You can get viral pneumonia by breathing in infected droplets or coming into contact with infected surfaces. If you have viral pneumonia, you are more at risk for also developing bacterial pneumonia.

Not spread by infectious agents: aspiration pneumonia

Accidentally inhaling (aspirating) food, drink, or saliva can cause pneumonia. This is more likely to happen if you take drugs or alcohol, or have a brain injury or cognitive deficit that affects your ability to swallow.

Mother and daughter meeting with a provider

Risk factors for pneumonia

Provider with stethoscope examining older woman

Anyone can get pneumonia, but certain factors can increase your risk of developing it. These risk factors include:

  • Age. People who are older than 65 or children under 2 are most likely to get pneumonia and suffer complications
  • A weakened immune system. People who have certain, chronic health conditions or who are receiving treatments that weaken their immune system are more likely to get pneumonia
  • Having lung diseases, like emphysema, chronic bronchitis, or COPD.
  • Living or working in a long-term care home, or spending lots of time in the hospital (this is referred to as hospital-acquired pneumonia).
  • Smoking and vaping.

How is pneumonia diagnosed?

If you have symptoms of pneumonia, you should go see your doctor or book an appointment at an urgent care clinic. Your healthcare provider will start by asking you questions about your symptoms and your medical history. They may also ask about any recent travel, a recent hospital stay or surgery, or exposure to animals. These provide clues about whether bacteria, fungi, or a virus are causing your symptoms.

From there, your doctor will perform a physical exam, look for signs of emphysema, and listen to your breathing. The way that your lung sounds can provide a clue about the underlying cause of your symptoms.

Diagnostic tests

If your doctor suspects pneumonia, they may also recommend one or more of the following tests:

Blood tests. Your doctor may take a small blood sample to check the amount of oxygen available in your blood. They can also check whether the infection has spread to your blood.

Imaging exams. These tests allow your doctor to see inside your body and examine your organs.

They might include:

  • Chest X-ray: An x-ray uses high-energy beams to create a picture of your body. Unless you have advanced emphysema, a chest x-ray alone can’t be used to diagnose you. But it can be used to rule out other conditions, such as lung cancer.
  • CT Scan: A CT scanner takes multiple X-ray images to create a cross-sectional view of the body. This can help your doctor see lung damage and diagnose emphysema.

Sputum culture. If you are coughing up mucus, your doctor may take a sample and analyze it in a lab. This can be used to diagnose a lung infection and specify the cause.

For high-risk or hospitalized patients

If you are a high-risk patient or have been hospitalized for pneumonia, your doctor may also recommend the following tests:

  • Bronchoscopy. Your doctor uses a thin, flexible tube with a light and camera at the end (a bronchoscope) to directly examine your airways. This allows them to look for blockages and take samples of tissue or fluid for testing
  • Pleural fluid culture. In this test, a fluid sample is taken from the space between your pleural membranes. A long, thin needle is put through the skin between the ribs and into the pleural space. Fluid is pulled into a syringe attached to the needle and then sent to a lab to find out which bacteria is causing the pneumonia.

Laboratory technician analyzing samples

How is pneumonia treated?

If you are diagnosed with pneumonia, you and your doctor will come up with a treatment plan. The treatment will depend on the cause of your infection (bacteria, virus, or fungi), as well as your overall health.

Medications to treat pneumonia

Antibiotics. These medications kill bacteria by preventing them from carrying out their life functions. Antibiotics are only effective against bacteria, not viruses or fungi.

Always follow your doctor’s instructions exactly and finish the whole course of medication. Even if you begin to feel better, be sure to finish all the medication to kill any remaining bacteria and prevent future complications.

Antifungal medications. These medications kill the fungi that cause fungal pneumonia. You may need to take them for several weeks to clear the infection.

Antiviral medications. These medications fight the viruses that cause viral pneumonia. Your doctor may prescribe antiviral medications if you are at risk of developing complications from pneumonia or if you have a weakened immune system. Note that viral pneumonia can resolve on its own, without medication.

Doctor sharing information with patient

Pneumonia treatment at home

In addition to any prescription medications, your doctor will recommend that you take a few days off of work or school to rest and recover.

Consider trying the following home remedies:

  • Avoid cigarettes, wood smoke, or other throat irritants, like cleaning supplies. Give your lungs time to heal, and if you’re a smoker, please consider quitting smoking altogether.
  • Cough it up. Coughing up mucus may be uncomfortable, but it is your body’s way of getting rid of the infection. Try to avoid cough medicines or suppressants. If your coughing is disrupting your sleep, talk to your doctor about when and how to take cough medicine.
  • Drink plenty of clear fluids. Water, tea, and other fluids can help you stay hydrated, which is especially important if you have a fever. They can also help loosen the mucus in your lungs, making it easier and less painful to cough up.
  • Get plenty of rest. Your body needs it to help fight off the infection. Try to get help with household chores and avoid physical activities.
  • Treat pain and fever with over-the-counter medications. Use acetaminophen (Tylenol) to reduce pain and break low fevers.
  • Use a humidifier to make breathing easier.

How long does it take to recover?

Recovery time for pneumonia ranges from a week to over a month.

Once you start to feel better, be sure to take it slow. Don’t push yourself too hard to do physical activities, and build up your strength slowly.


Hospitalization

You may be hospitalized for pneumonia if you have a severe case or if you are considered at-risk for complications, such as being older than 65 or younger than 2.

At the hospital, you have to receive fluids and antibiotics intravenously (through an IV). You may also receive oxygen therapy through a mask or nasal tube to maintain your blood oxygen levels. In severe cases, you may be put on a ventilator, a machine that pumps oxygen into your lungs.

Once you have started to recover, your doctor may recommend respiratory therapy. A trained therapist will teach you breathing exercises and help you maximize your recovery.

When caught early, pneumonia is often treatable and resolves with few problems. However, if left untreated, it can cause complications like:

Blood infection (sepsis or bacteremia). The bacteria that cause bacterial pneumonia can get into your bloodstream. This is known as bacteremia, and it can be life-threatening. You may go into septic shock, a condition in which your blood pressure drops rapidly, making it hard for your organs to get enough oxygen. The bacteria may also spread to other organs and cause other dangerous infections.

Difficulty breathing. If you develop severe pneumonia, breathing may become so difficult that your body doesn’t get enough oxygen. You may need to be hospitalized and put on a ventilator, a machine that pumps oxygen into your body.

Lung abscess. An abscess is a collection of pus. Pneumonia can cause an abscess to form in a cavity in your lungs. If left untreated, an abscess can be life-threatening. You will likely need antibiotics, and you may even need to have the abscess surgically drained.

Pleural effusion. Your lungs are surrounded by two layers of tissue called the pleural membranes. These membranes help your lungs expand smoothly in your chest. However, if you have untreated pneumonia, these membranes can become swollen, and fluid will start to accumulate between them. This is called pleural effusion, and if the fluid becomes infected, it will have to be surgically drained.

Not all cases of pneumonia can be prevented, but there are steps you can take in your everyday life to reduce your chance of getting it:

  • Wash your hands often, especially when in public places.
  • Don’t smoke or stop smoking: smoking increases your risk for chronic lung conditions like COPD and complicated pneumonia.
  • Practice good health habits. Eat well, exercise, and get plenty of rest. This helps boost your immune system. Also, keep your environment clean and smoke-free.
  • Get your flu vaccine. Pneumonia is sometimes a complication of getting the flu, so be sure to get your flu shot. Children over 6 months of age can usually get a flu vaccine.
  • HIB vaccine. This vaccine is recommended for children under the age of 5. It protects against Haemophilus influenzae type b, a bacteria that can cause pneumonia and meningitis.
  • Get the pneumonia vaccine. Children under 2, adults over 65, and people at risk for complicated pneumonia should get the pneumonia vaccine. It protects against many types of pneumococcal pneumonia bacteria, which commonly cause bacterial pneumonia.