Oncology for Women

Appointments: 301-564-4966

Health Library

Pneumonia

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 can usually be treated at home. But some people, like older adults and babies, may need to go to the hospital. It may take a few weeks or longer to recover fully.

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. You may cough up yellow, green, dark brown, or bloody mucus. 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 an infected person coughs, sneezes, or talks and you inhale the infected droplets 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 tobacco or vape.
  • Are exposed to secondhand smoke.
  • Have another medical condition, especially lung diseases such as chronic obstructive pulmonary disease (COPD) or asthma.
  • Are younger than 5 years of age or older than 65.
  • Have a weak immune system so it's harder to fight an infection.
  • Drink excessive amounts of alcohol.
  • Recently had COVID-19, a cold, or the flu.

You are more likely to have problems from pneumonia and need to go to the hospital if you:

  • Are older than 65.
  • Have some other condition (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, stay up to date on pneumococcal, flu, and 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 reduce any harmful bacteria from being inhaled into the lungs and may prevent some types of pneumonia.

Symptoms

Symptoms of pneumonia may include:

  • A cough. You may cough up mucus from your lungs. Mucus may be yellow, green, dark brown, 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.

Pneumonia symptoms caused by a virus 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 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 can be treated at home. It may take a few weeks to recover fully. In older adults and in people with other health problems, recovery may take a few months.

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 severe trouble breathing.
  • Cough up large amounts of blood.

Contact a doctor now if you:

  • Have any shortness of breath or wheezing.
  • Are dizzy or lightheaded, or you feel like you may faint.
  • Cough up dark brown or bloody mucus (sputum).
  • Have a fever with shaking chills.

Contact a doctor if your cough:

  • Often brings up yellow or green mucus (sputum) from the lungs, lasts longer than 2 days, and occurs along with a fever. 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.
  • 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.

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. They 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 or a virus is causing your pneumonia. Finding out what is causing your pneumonia can help your doctor choose the best treatment for you.

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. Sometimes antiviral medicine may be used.

There are things you can do to feel better during your treatment. Get plenty of rest and sleep, and drink lots of fluids. Taking medicine to treat a fever can also help. Don't smoke or vape or be exposed to secondhand 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 health condition.

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

Self-Care

Home treatment can help you recover from pneumonia. Here are some things you can do to help you recover and avoid problems:

  • 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.
  • Take an over-the-counter pain medicine, such as acetaminophen (Tylenol), ibuprofen (Advil, Motrin), or naproxen (Aleve). Be safe with medicines. Read and follow all instructions on the label. These medicines can help reduce fever and make you feel more comfortable.
  • 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 that 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 droplets. 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.

Credits

Current as of: February 27, 2026

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

Next Section:

Cause

Current as of: February 27, 2026

Author: Ignite Healthwise, LLC Staff

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

Patient Stories

This isn't your grandma's hysterectomy. Hear what patients are saying.
[ click here ]

health library

View our comprehensive online library of health care topics. [ click here ]