Pneumonia

Condition Basics

What is pneumonia?

Pneumonia is a lung infection that can make you very sick. You may cough, have a fever, and have trouble breathing. It often clears up in a few weeks with treatment. It can usually be treated at home. But some people, like older adults and babies, may need to go to the hospital.

What causes it?

Germs called bacteria or viruses usually cause pneumonia. Pneumonia usually starts when you breathe the germs into your lungs. You may be more likely to get it after having a cold or the flu. Having a chronic disease like asthma, COPD, heart disease, cancer, or diabetes also makes you more likely to get pneumonia.

What are the symptoms?

Symptoms of pneumonia may include a cough, a fever, shortness of breath, or the chills. You may feel very tired or very weak. Or you may have chest pain that often feels worse when you cough or breathe in.

How is it diagnosed?

Your doctor will ask you about your symptoms and do a physical exam. Your doctor may order a chest X-ray and blood tests. This is usually enough for your doctor to know if you have pneumonia. You may need more tests if your symptoms are bad or you have other health problems.

How is pneumonia treated?

Pneumonia that is caused by bacteria is treated with antibiotics. Rest, fluids, and medicines to reduce fever can help you feel better. If your symptoms are bad or you have a weak immune system, you may need hospital care. If pneumonia is caused by a virus, antibiotics don't help.

Cause

Germs called bacteria or viruses usually cause pneumonia.

You may get pneumonia:

  • After you breathe infected air particles into your lungs.
  • After you breathe certain bacteria from your nose and throat into your lungs.
  • During or after an upper respiratory infection, like a cold or the flu.
  • As a complication of a viral illness, such as measles or chickenpox.
  • If you breathe into your lungs large amounts of food, gastric juices from the stomach, or vomit. (This is called aspiration pneumonia.)

A healthy person's nose and throat often contain bacteria or viruses that cause pneumonia. Pneumonia can develop when these organisms spread to your lungs at times when your lungs are more likely to be infected. For example, this can happen during or soon after you have a cold. Or it can happen if you have a long-term (chronic) illness, like COPD, asthma, heart disease, cancer, or diabetes.

What Increases Your Risk

You are more likely to get pneumonia if you:

  • Smoke cigarettes.
  • Have another medical condition, especially lung diseases such as chronic obstructive pulmonary disease (COPD) or asthma.
  • Are younger than 1 year of age or older than 65.
  • Have an impaired immune system.
  • Drink excessive amounts of alcohol.
  • Recently had COVID-19, a cold, or the flu.

You are more likely to have complications of pneumonia and need to go to the hospital if you:

  • Are older than 65.
  • Have some other illness (such as COPD, diabetes, or asthma), or have gone to the hospital for a medical problem within the last 3 months.
  • Have had your spleen removed or do not have a working spleen (such as with sickle cell disease).
  • Have an alcohol use problem.
  • Have a weak immune system.
  • Live in a place where people are close together, such as a college dorm or nursing home.

Prevention

To help prevent pneumonia, get the recommended pneumococcal vaccines and a yearly flu vaccine. And stay up to date on your COVID-19 vaccines. Wash your hands often to prevent spreading viruses and bacteria that may cause pneumonia. Taking care of your teeth and gums may help prevent some types of pneumonia.

Learn more

Watch

Symptoms

Symptoms of pneumonia may include:

  • A cough. You may cough up mucus from your lungs. Mucus may be rusty or green or tinged with blood.
  • Fever, chills and sweating.
  • Fast breathing and feeling short of breath.
  • Chest pain that often feels worse when you cough or breathe in.
  • A fast heartbeat.
  • Feeling very tired or very weak.

Older adults may have different, fewer, or milder symptoms. They may not have a fever. Or they may have a cough but not bring up mucus. The main sign of pneumonia in older adults may be a change in how well they think (confusion or delirium). Or, if they already have a lung disease, that disease may get worse.

Symptoms caused by viruses are the same as those caused by bacteria.

What Happens

After you've been infected with pneumonia, symptoms usually develop within a few days to sometimes over a week. The infection can grow in the lungs and cause shortness of breath, cough, and fever.

How severe pneumonia is and how long it lasts depends on many factors. These include your age, the type of pneumonia (bacterial or viral), and your overall health.

In healthy people, pneumonia can be a mild illness that is hardly noticed and clears up in 2 to 3 weeks. In older adults and in people with other health problems, recovery may take 6 to 8 weeks or longer.

If you have severe pneumonia, you may have to go to the hospital.

When to Call a Doctor

Call 911 or other emergency services immediately if you:

  • Have chest pain that is crushing or squeezing, is getting more intense, or occurs with any other symptoms of a heart attack.
  • Have such bad trouble breathing that you are worried you won't have the strength or ability to keep breathing.
  • Cough up large amounts of blood.
  • Feel that you may faint when you sit up or stand.

Call a doctor now if you have:

  • A cough that produces blood-tinged or rust-colored mucus from the lungs.
  • A fever with shaking chills.
  • Difficult, shallow, fast breathing with shortness of breath or wheezing.

Call a doctor if your cough:

  • Often brings up yellow or green mucus from the lungs and lasts longer than 2 days. Don't confuse mucus from your lungs with mucus running down the back of your throat from your nasal passages (postnasal drip). Postnasal drainage is not a worry.
  • Occurs with a fever and brings up yellow or green mucus from the lungs (not postnasal drainage).
  • Causes you to vomit a lot.
  • Lasts longer than 4 weeks.

Also call your doctor if you have new chest pain (more than just discomfort when you cough) that gets worse with deep breathing and if you have other symptoms of pneumonia, such as shortness of breath, cough, and fever.

Watchful waiting

Watchful waiting is a wait-and-see approach. If you get better on your own, you won't need treatment. If you get worse, you and your doctor will decide what to do next.

Home treatment may be okay if:

  • You have mild cold or flu symptoms (nasal stuffiness, mild body aches or headache, mild fever).
  • You cough up mucus that is running down the back of the throat from the nasal passages (postnasal drip). But a cough in which the mucus is definitely coming from the lungs rather than the nasal passages is a more serious problem, and you should contact your doctor.

Exams and Tests

Your doctor will ask you about your symptoms and do a physical exam. Your doctor may order a chest X-ray and a blood test called a complete blood count (CBC). This is usually enough for your doctor to know if you have pneumonia. You may need more tests if your symptoms are bad, you are an older adult, or you have other health problems. In general, the sicker you are, the more tests you may need.

Your doctor may also test mucus from your lungs to find out if bacteria are causing your pneumonia. Finding out what is causing your pneumonia can help your doctor choose the best treatment for you.

Learn more

Watch

Treatment Overview

If pneumonia is caused by bacteria, your doctor will give you antibiotics. They almost always cure pneumonia caused by bacteria. Be sure to take the antibiotics exactly as instructed. Don't stop taking them just because you feel better. You need to take the full course of antibiotics. (If pneumonia is caused by a virus, antibiotics don't help.)

There are things you can do to feel better during your treatment. Get plenty of rest and sleep, and drink lots of liquids. Taking medicine to reduce fever can also help. Don't smoke. If your cough keeps you awake at night, talk to your doctor about using cough medicine.

You may need to go to the hospital if your symptoms are bad, you have a weak immune system, or you have another serious illness.

In some cases, you may need oxygen or medicines you breathe using an inhaler or nebulizer to help shortness of breath and wheezing.

Learn more

Watch

Self-Care

Home treatment is important for recovery from pneumonia. The following measures can help you recover and avoid complications.

  • Get plenty of rest.
  • Drink plenty of fluids.

    This helps prevent dehydration.

  • Take care of your cough if it is making it hard for you to rest.

    A cough is one way your body gets rid of the infection. And you should not try to stop your coughing unless it is severe enough to make breathing difficult, cause vomiting, or prevent rest.

  • Consider taking acetaminophen or aspirin.

    These medicines can help reduce fever and make you feel more comfortable. Do not give aspirin to anyone younger than 20 because of the risk of Reye syndrome. Be safe with medicines. Read and follow all instructions on the label.

  • Be careful with cough and cold medicines.

    They may not be safe for young children or for people who have certain health problems, so check the label first. If you do use these medicines, always follow the directions about how much to use based on age and weight.

    Always check to see if any over-the-counter cough or cold medicines you are taking contain acetaminophen. If they do, make sure the acetaminophen you are taking in your cold medicine plus any other acetaminophen you may be taking is not higher than the daily recommended dose. Ask your doctor or pharmacist how much you can take every day.

Your doctor may want to see you after a week of treatment to make sure you are getting better.

Avoid infecting others

If your pneumonia is caused by a virus or bacteria, you may spread the infection to other people while you are contagious. When you cough or sneeze, pneumonia is spread to others through infected air particles. How long you are contagious depends on what is causing the pneumonia and whether you get treatment. You may be contagious for several days to a week.

If you get antibiotics, you usually can't spread the infection to others after a day of treatment.

Learn more

Watch

Credits

Current as of: June 12, 2023

Author: Healthwise Staff
Clinical Review Board
All Healthwise education is reviewed by a team that includes physicians, nurses, advanced practitioners, registered dieticians, and other healthcare professionals.

This information does not replace the advice of a doctor. Healthwise, Incorporated, disclaims any warranty or liability for your use of this information. Your use of this information means that you agree to the Terms of Use. Learn how we develop our content.