Skip to main content


Medically reviewed by Last updated on Mar 7, 2022.

What is Pneumonia?

Harvard Health Publishing

Pneumonia is an infection of the lungs. Almost all cases of pneumonia are caused by viral or bacterial infections.  

When pneumonia is first diagnosed, there often is no way to be sure if the infection is caused by a virus or bacteria. Therefore your doctor will need to treat it with antibiotics.  

There are multiple antibiotics that treat pneumonia. The initial choice of drug(s) is made based on the category of pneumonia you most likely have. The two major categories are community acquired pneumonia (CAP) and health care associated pneumonia (HCAP). 

Community acquired pneumonia refers to pneumonia in a person that has not recently stayed in the hospital or a nursing home.  The most common bacterial cause of CAP is Streptococcus pneumoniae


Health care associated pneumonia refers to pneumonia that develops in a person that is in the hospital now or has recently been in the hospital or a nursing home. These pneumonias tend to be more serious. The organisms found in a hospital often become resistant to many antibiotics. Also hospitalized patients are often weakened by other illnesses and are less able to fight off the infection. 

A type of pneumonia called aspiration pneumonia develops when chemical irritants and bacteria from the mouth or stomach are inhaled into the lungs. It is more common in people who have had strokes and have difficulty controlling their swallowing reflexes or people who are unconscious as a result of alcohol or other drug overdose.  

In people with compromised immune systems, the organisms that cause pneumonia are different than those seen in the other types of pneumonia. 


Most types of pneumonia cause fever, cough with sputum (coughed-up mucus), shortness of breath and fatigue. In older patients, fatigue or confusion can be the only or most noticeable symptom. In viral pneumonia, a dry cough without sputum is more common. 


Your doctor first will ask about your symptoms. During the physical exam, your doctor will check to see if you are breathing rapidly. He or she also will look for confusion and a purplish hue in your lips, fingernails or hands because these symptoms can indicate that you have low levels of oxygen in your blood. Using a stethoscope, a health care professional can listen through your back for abnormal sounds from the lungs. The diagnosis of pneumonia most often is confirmed by a chest X-ray. 

Your doctor may order blood tests to look for an elevation of infection-fighting white blood cells and to make sure your electrolytes and kidney function are normal. Samples of your sputum or blood also can be sent to a laboratory to identify the specific cause of your pneumonia. Identifying the infectious organism can help your doctor to choose the best antibiotic to treat the infection. However, even when no organism can be identified, the pneumonia still can be treated successfully with antibiotics. 

Expected Duration

How long pneumonia lasts can vary from a few days to a week or longer, depending on how early you start antibiotics and what other medical problems you may have. Antibiotic treatment for pneumonia usually lasts from 5 to 14 days. Many people find that it takes a few weeks to several weeks to regain the level of energy they had before the pneumonia. 


Vaccination helps protect at risk people from S. pneumoniae infection. Currently, a 2 vaccine strategy is recommended. The two vaccines are PCV13 (Prevnar) and PPSV23 (Pneumovax) given several months apart. They are recommended for people 65 and older and for people ages 19 to 64 at higher than average risk of developing serious pneumonia. This includes people who smoke and people with:  

  • Lung disease including asthma 
  • Heart disease  
  • Liver disease  
  • Kidney disease  
  • A damaged spleen or no spleen  
  • Certain types of cancer or undergoing cancer treatment  
  • A weakened immune system 

Children younger than age 5 should receive a series of 4 injections of PCV13. Although it is used mostly to reduce the risk of meningitis and ear infections, it also lowers the risk of pneumonia. 

The influenza vaccine, which is given once a year, can prevent both flu and bacterial infections or pneumonia that can follow the flu. Anyone older than 6 months should get the vaccine.  

An alternative to the flu shot is the nasal influenza vaccine called FluMist. It is a live, weakened form of the virus that is inhaled and doesn't require an injection. It is approved for use in healthy people ages 2 through 49.  


The main treatment for pneumonia is one or more antibiotics. A younger or healthier person can be treated safely with antibiotics at home and can feel better in a few days. Some people are at higher risk of complications and may need to be hospitalized for two days to a week. They include people who are older than 60 or have other diseases such as heart failure, active cancer, chronic kidney disease or chronic obstructive pulmonary disease (COPD).  

In addition to antibiotics, other treatments for pneumonia include rest, adequate fluid, and supplemental oxygen to raise the level of oxygen in the blood. 

Treatment options

The following list of medications are in some way related to or used in the treatment of this condition.

View more treatment options

When To Call a Professional

A simple cold or bronchitis caused by a virus can share many of the same symptoms as pneumonia. Pneumonia is possible when your cough produces sputum with a green or brown color, you are having shaking chills or you are having trouble breathing. In these cases, you should call your doctor for an urgent evaluation.  

Also, if you have been diagnosed with a cold or bronchitis and symptoms are getting worse or persist after a week, you should call your doctor's office for another evaluation.


Most pneumonia is treated successfully, especially if antibiotics are started early. Pneumonia can be fatal. The very old and frail, especially those with many other medical conditions, are most vulnerable.  

Pneumonia usually does not cause permanent damage to the lungs. Rarely, pneumonia causes infected fluid to collect around the outside of the lung, called an empyema. The empyema may need to be drained with a special tube or surgery. With aspiration pneumonia, the affected lung may develop a lung abscess that needs many weeks of antibiotic therapy.

External resources

American Lung Association

National Heart, Lung, and Blood Institute (NHLBI)

Further information

Always consult your healthcare provider to ensure the information displayed on this page applies to your personal circumstances.