What is pneumonia?
Pneumonia is a lung infection that can make you very sick. You may cough, run a fever, and have a hard time breathing. For most people, pneumonia can be treated at home. It often clears up in 2 to 3 weeks with treatment. But older adults, babies, and people with other diseases can become very ill. They may need to be in the hospital.
You can get pneumonia in your daily life, such as at school or work. This is called community-associated pneumonia. You can also get it when you are in a hospital or nursing home. This is called healthcare-associated pneumonia. It may be more severe because you already are ill. This topic focuses on pneumonia you get in your daily life.
What causes pneumonia?
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 the disease after having a cold or influenza (flu). These illnesses make it harder for your lungs to fight infection, so it is easier to get pneumonia. Having a long-term, or chronic, disease like asthma, heart disease, cancer, or diabetes also makes you more likely to get pneumonia.
What are the symptoms?
Symptoms of pneumonia may include:
- Cough. You will likely cough up mucus (sputum) 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.
- Fast heartbeat.
- Feeling very tired or very weak.
When you have less severe symptoms, your doctor may call this "walking pneumonia."
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 is common. 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. But they may come on slowly and often are not as obvious or as bad.
How is pneumonia diagnosed?
Your doctor will ask you about your symptoms and do a physical exam. He or she may order a chest X-ray and a complete blood count (CBC). This is usually enough for your doctor to know if you have pneumonia. You may need more tests if you have bad symptoms, are an older adult, or 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. However, often the organism can't be found and a broad-spectrum antibiotic may be given.
How is it treated?
Antibiotics are the usual treatment, because the organism may not be found. But if the pneumonia is caused by a virus, antivirals may be given. Sometimes, antibiotics may be used to prevent complications.
Antibiotics usually cure pneumonia caused by bacteria. Be sure to take the antibiotics exactly as instructed. Do not stop taking them just because you feel better. You need to take the full course of antibiotics.
Pneumonia can make you feel very sick. But after you take antibiotics, you should start to feel much better, although you will probably not be back to normal for several weeks. Call your doctor if you do not start to feel better after 2 to 3 days of antibiotics. Call your doctor right away if you feel worse.
There are things you can do to feel better during your treatment. Get plenty of rest and sleep, and drink lots of liquids. Do not 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 you have bad symptoms, a weak immune system, or another serious illness.
How can you prevent pneumonia?
Experts recommend immunization for children and adults. Children get the pneumococcal vaccine as part of their routine shots. If you are 65 or older or you have a long-term health problem, it's a good idea to get a pneumococcal vaccine. It may not keep you from getting pneumonia. But if you do get pneumonia, you probably won't be as sick. You can also get an influenza vaccine to prevent the flu, because sometimes people get pneumonia after having the flu.
You can also lower your chances of getting pneumonia by staying away from people who have the flu, respiratory symptoms, or chickenpox. You may get pneumonia after you have one of these illnesses. Wash your hands often. This helps prevent the spread of viruses and bacteria that may cause pneumonia.
Health Tools help you make wise health decisions or take action to improve your health.
Viruses, bacteria, a fungus, or (in rare cases) parasites or other organisms can cause pneumonia.
- In most cases, the specific organism (such as bacteria or virus) cannot be identified even with testing.footnote 1 When an organism is identified, it is usually the bacteria Streptococcus pneumoniae.
- Many types of bacteria may cause pneumonia. Pneumonia caused by Mycoplasma pneumoniae is sometimes less severe and called "walking pneumonia."
- Viruses, such as influenza A (the flu virus) and respiratory syncytial virus (RSV), can cause pneumonia.
In people who have impaired immune systems, pneumonia may be caused by other organisms, including some forms of fungi, such as Pneumocystis jiroveci (formerly called Pneumocystis carinii). This fungus frequently causes pneumonia in people who have AIDS. Some doctors may suggest an HIV test if they think that Pneumocystis jiroveci is causing the pneumonia.
How do you get 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 a viral upper respiratory infection, such as a cold or influenza (flu).
- As a complication of a viral illness, such as measles or chickenpox.
- If you breathe large amounts of food, gastric juices from the stomach, or vomit into the lungs (aspiration pneumonia). This can happen when you have had a medical condition that affects your ability to swallow, such as a seizure or a stroke.
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 while your lungs are more likely to be infected. Examples of times when this can happen are during or soon after a cold or if you have a long-term (chronic) illness, such as chronic obstructive pulmonary disease (COPD).
You can get pneumonia in your daily life, such as at school or work (community-associated pneumonia) or when you are in a hospital or nursing home (healthcare-associated pneumonia). Treatment may differ in healthcare-associated pneumonia, because bacteria causing the infection in hospitals may be different from those causing it in the community. This topic focuses on community-associated pneumonia.
Symptoms of pneumonia in otherwise healthy people often start during or after an upper respiratory infection, such as influenza (flu) or a cold. Symptoms may include:
- Cough, often producing mucus, also called sputum, from the lungs. Mucus may be rusty or green or tinged with blood.
- Fever, chills and sweating, which may be less common in older adults.
- Fast, often shallow, breathing and the feeling of being short of breath.
- Chest wall pain that is often made worse by coughing or breathing in.
- Fast heartbeat.
- Feeling very tired or weak.
When symptoms are mild, your doctor may call your condition "walking pneumonia."
In older adults and children
Older adults may have different, fewer, or milder symptoms, such as having no fever or having a cough with no mucus (a dry or nonproductive cough). The major sign of pneumonia in older adults may be a change in how clearly they think (confusion or delirium) or when a lung disease they already have gets worse.
In children, symptoms may depend on age:
- In infants younger than 1 month of age, symptoms may include having little or no energy (lethargy), feeding poorly, grunting, or having a fever.
- In children, symptoms of pneumonia are often the same as in adults. Your doctor will look for signs such as a cough and a faster breathing rate.
Some conditions with symptoms similar to pneumonia include bronchitis, COPD, and tuberculosis.
After you've been infected with a pneumonia-causing organism, it takes as little as 1 to 3 days or as long as 7 to 10 days for symptoms to appear. How severe pneumonia is and how long it lasts depend on:
- Your age and health. Older, sicker people usually have more severe cases. And their cases of pneumonia are more likely to cause complications, such as bacteria in the bloodstream (bacteremia) or throughout the body (septicemia).
- Whether bacteria or a virus caused the pneumonia. Viral pneumonia usually is less severe than bacterial pneumonia.
- How quickly you treat it. The sooner you treat pneumonia, the sooner symptoms go away.
- Your immune system. People who have impaired immune systems are more likely to have more severe pneumonia than people who have healthy immune systems.
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.
Going to the hospital
If you have severe pneumonia, you may have to go to the hospital:
- In most cases of pneumonia you get in your daily life, such as at school or work (community-based pneumonia), it is not necessary to go to the hospital.footnote 2
- About one-third of people with community-based pneumonia are age 65 or older.footnote 2 Older adults are treated in the hospital more often and stay longer for the condition than younger people.footnote 2 Pneumonia is more serious in this group, because they often have and may develop other medical problems.
Spreading pneumonia to others
If your pneumonia is caused by a virus or bacteria, you may spread the infection to other people while you are contagious. 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 cannot spread the infection to others after a day of treatment.
What Increases Your Risk
You are more likely to get pneumonia if you:
- Smoke. Cigarette smoking is a strong risk factor for pneumonia in healthy young people.
- 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.
- Take medicine called a proton pump inhibitor (such as Losec) that reduces the amount of stomach acid.footnote 3, footnote 4
- Drink excessive amounts of alcohol.
- Recently had 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 in sickle cell disease).
- Have an alcohol use problem.
- Have a weak immune system.
- Reside in a place where people live close together, such as a university dorm or nursing home.
When To Call a Doctor
The faster you get treatment, the faster you will get over pneumonia. This is especially true for the very young, for people older than 65, and for anyone with other long-lasting (chronic) health problems, such as asthma.
Call 911 or other emergency services immediately if you:
- Have chest pain that is crushing or squeezing, is increasing in intensity, or occurs with any other symptoms of a heart attack.
- Have such bad trouble breathing that you are worried you will not 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 immediately if you have:
- A cough that produces blood-tinged or rust-coloured 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:
- Frequently brings up yellow or green mucus from the lungs and lasts longer than 2 days. Do not confuse mucus from your lungs with mucus running down the back of your throat from your nasal passages (post-nasal drip). Post-nasal drainage is not a worry.
- Occurs with a fever of 38.3°C (101°F) or higher and brings up yellow or green mucus from the lungs (not post-nasal drainage).
- Causes you to vomit a lot.
- Continues 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 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 appropriate if:
- You have classic cold 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 (post-nasal 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.
- You have signs of the flu (high fever, severe muscle aches or headache, and mild respiratory symptoms). For more information, see the topic Influenza.
Who to see
Examinations and Tests
Your doctor will usually diagnose pneumonia with:
- Your medical history.
- A physical examination.
- A chest X-ray, which is almost always done to check for changes in the lungs that may mean pneumonia and to look for other causes of your symptoms. But an X-ray does not always show whether you have pneumonia, especially if it is done when you first get sick. In some cases, the X-ray results may:
- Suggest the type of organism (bacterial, viral, or fungal) causing pneumonia.
- Show complications of pneumonia, such as infection of the heart muscle or the sac surrounding the heart.
- Show conditions that may occur with pneumonia, such as fluid in the chest cavity or a collapsed lung.
- Reveal another condition, such as heart failure, lung cancer, or acute bronchitis.
Lab tests for pneumonia
The need for more tests often depends on how severe your symptoms are, your age, and your overall health. In general, the sicker you are, the more tests you may need. This is especially true for older adults and infants. One example of a test you may have is the arterial blood gas test.
If you are very ill, have severe shortness of breath, or have a condition that increases your risk (such as asthma or COPD), your doctor may test your mucus. Tests include a Gram stain and a sputum culture.
Rapid urine test
This test can identify some bacteria that cause pneumonia. This can help guide treatment for pneumonia.
In people who have impaired immune systems, pneumonia may be caused by other organisms, including some forms of fungi, such as Pneumocystis jiroveci (formerly called Pneumocystis carinii). This fungus often causes pneumonia in people who have AIDS. Some doctors may suggest an HIV test if they think that Pneumocystis jiroveci is causing the pneumonia.
Other lung tests
If you have severe pneumonia, you may need other tests, including tests to check for complications and to find out how well your immune system is working.
Your doctor will choose your antibiotic based on a number of things, including your age, your symptoms and how severe they are, and whether you need to go to the hospital. The number of days you take antibiotics depends on your general health, how serious your pneumonia is, and the type of antibiotic you are taking.
Most people see some improvement in symptoms in 2 to 3 days. Unless you get worse during this time, your doctor usually will not change your treatment for at least 3 days.
Getting started on antibiotics soon after getting pneumonia may help recovery.footnote 5
If there is no improvement or if your symptoms get worse, you may need a culture and a sensitivity test. These tests help identify the organism that is causing your symptoms. These tests also help your doctor find out whether the bacteria is resistant to the antibiotic.
If you do not need to go to the hospital for pneumonia, it is not usually necessary to identify the organism causing the pneumonia before starting treatment. If you do go to the hospital, you will probably have some testing to identify the bacteria.
You likely will not have to go to the hospital unless you:
- Are older than 65.
- Have other health problems, such as COPD, heart failure, asthma, diabetes, long-term (chronic) kidney failure, or chronic liver disease.
- Cannot care for yourself or would not be able to tell anyone if your symptoms got worse.
- Have severe illness that reduces the amount of oxygen getting to your tissues.
- Have chest pain caused by inflammation of the lining of the lung (pleurisy) so you are not able to cough up mucus effectively and clear your lungs.
- Are being treated outside a hospital and are not getting better (such as your shortness of breath not improving).
- Are not able to eat or keep food down, so you need to take fluids through a vein (intravenous).
Pneumonia also can be caused by viruses, such as those that cause the flu and chickenpox (varicella). Antibiotics do not work to treat pneumonia caused by a virus.
- People who are more likely to get pneumonia after having the flu (for example, pregnant women) may get an antiviral medicine such as oseltamivir (Tamiflu) or zanamivir (Relenza) to help relieve symptoms.
- Varicella pneumonia, which is rare, also can be treated with antiviral medicine.
What to think about
In most cases pneumonia is a short-term, treatable illness. But frequent bouts of pneumonia can be a serious complication of a long-term (chronic) illness, such as chronic obstructive pulmonary disease (COPD). If you have a severe long-term illness, it may be hard to treat your pneumonia, or you may choose not to treat it. You and your doctor should discuss this. This discussion may include information about how to create an advance care plan.
There are a number of steps you can take to help prevent getting pneumonia.
- Stop smoking. You're more likely to get pneumonia if you smoke.
- Avoid people who have infections that sometimes lead to pneumonia.
- Stay away from people who have colds, the flu, or other respiratory tract infections.
- If you haven't had measles or chickenpox or if you didn't get vaccines against these diseases, avoid people who have them.
- Wash your hands often. This helps prevent the spread of viruses and bacteria that may cause pneumonia.
Pneumococcal vaccines . Children get the pneumococcal conjugate vaccine (PCV) as a routine vaccination. Older adults (age 65 or older) and people who have some long-term (chronic) conditions also need the pneumococcal vaccine. Depending on age and other things, adults can get PCV or the pneumococcal polysaccharide vaccine (PPSV).
The pneumococcal vaccine may not prevent pneumonia. But it can prevent some of the serious complications of pneumonia, such as infection in the bloodstream (bacteremia) or throughout the body (septicemia), in younger adults and those older than age 55 who have a healthy immune system.footnote 6, footnote 7
Other vaccines can prevent common diseases that sometimes lead to pneumonia, such as:
- Measles. Vaccination of children for measles can prevent most cases of measles. Adults may need to be vaccinated against measles if they have not had the disease or were not vaccinated during childhood.
- Flu. A yearly flu vaccine may keep you from getting the flu. The flu often can lead to pneumonia, especially in older adults or in people who have other long-term (chronic) diseases. You can get the flu vaccine at the same time as the pneumococcal vaccine, but in a different arm.
- Chickenpox. The chickenpox shot (varicella-zoster vaccine) can prevent most cases of pneumonia caused by the virus that causes chickenpox. Consider getting a shot if you are older than 13 and have not had chickenpox.
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 to 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 (such as Tylenol) or aspirin to help reduce fever and make you feel more comfortable. Do not give aspirin to anyone younger than 18 because of the risk of Reye syndrome. Be safe with medicines. Read and follow all instructions on the label.
Your doctor may want to see you after a week of treatment to make sure you are getting better. Be sure to contact your doctor if you do not feel better, your cough gets worse, you have shortness of breath or a fever, you feel weak, or you feel faint when you stand up.
Cough and cold medicines
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.
Doctors use antibiotics to treat pneumonia that is caused by bacteria. Although experts differ on their recommendations, the first antibiotic used is usually one that kills a wide range of bacteria (broad-spectrum antibiotic).footnote 8, footnote 9 All antibiotics used have a high cure rate for pneumonia.footnote 5
There are many types of antibiotics. Your doctor will decide which antibiotic will work best for you. In most cases, a doctor will prescribe antibiotics without first identifying the exact organism causing the illness.
If you don't get better with your first antibiotic, your doctor may add a second antibiotic to cover other bacteria that are not being treated with the first one. Or you may have more testing to identify the specific organism that is causing the pneumonia.
Sometimes doctors use two antibiotics when first starting treatment.
What to think about
More and more bacteria are becoming resistant to certain antibiotics, making them less effective. An example of this is MRSA, or methicillin-resistant Staphylococcus aureus, which is resistant to many types of penicillin. To help fight antibiotic resistance, ask your doctor how to take your antibiotics correctly, such as always finishing your prescription.
In most cases of pneumonia in young, otherwise healthy people with strong immune systems, treatment can be done at home. Antibiotics, rest, fluids, and home care are all that you need in order to recover. But people who are having trouble breathing or have other lung problems may need more treatment. Sometimes you may need oxygen or medicines you breathe using an inhaler or nebulizer to help shortness of breath and wheezing symptoms.
If home treatment does not help, if symptoms get worse, or if signs of complications of pneumonia develop, you may have to go to the hospital. Hospital treatment for pneumonia may include:
- Antibiotics given directly into the bloodstream. A small needle is inserted into a vein (intravenous, or IV) to deliver the medicine.
- Fluids given through a vein (IV). They are given if you cannot drink liquids because of shortness of breath or weakness.
- Respiratory therapy, to remove mucus from the lungs. This therapy may include deep breathing exercises, postural drainage, incentive spirometry, and chest physiotherapy, which involves striking the chest with a cupped hand or applying a vibrating device to the chest to loosen mucus. Chest physiotherapy is not needed in most cases. But it may be helpful for people who have other lung conditions, such as bronchiectasis.
- Oxygen therapy. You may need oxygen therapy if your doctor thinks that the cells of your body are not getting enough oxygen. Oxygen can be given through a nasal tube or face mask. For children, oxygen is often given using a tent that fits over the crib.
- Corticosteroids, which may reduce the chance of some severe pneumonia complications. This may make the hospital stay shorter.
- Niederman MS (2004). Pneumonia, including community-acquired and nosocomial pneumonia. In JD Crapo et al., eds., Baum's Textbook of Pulmonary Diseases, 7th ed., vol. 1, pp. 424–454. Philadelphia: Lippincott Williams and Wilkins.
- Niederman MS (2004). Pneumonia, including community-acquired and nosocomial pneumonia. In JD Crapo et al., eds., Baum's Textbook of Pulmonary Diseases, 7th ed., vol. 1, pp. 424–454. Philadelphia: Lippincott Williams and Wilkins.
- Laheij RJF, et al. (2004). Risk of community-acquired pneumonia and use of gastric acid-suppressive drugs. JAMA, 292(16): 1955–1960.
- Herzig SJ, et al. (2009). Acid-suppressive medication use and the risk for hospital-acquired pneumonia. JAMA, 301(20): 2120–2128.
- Loeb M (2010). Community-acquired pneumonia, search date January 2010. Online version of BMJ Clinical Evidence: http://www.clinicalevidence.com.
- Moberley SA, et al. (2008). Vaccines for preventing pneumococcal infection in adults. Cochrane Database of Systematic Reviews(1). Oxford: Update Software.
- Maruyama T, et al. (2010). Efficacy of 23-valent pneumococcal vaccine in preventing pneumonia and improving survival in nursing home residents: Double blind, randomised and placebo controlled trial. BMJ. Published online March 8, 2010 (doi: 10.1136/bmj.c1004).
- Arnold FW, et al. (2009). Improving outcomes in elderly patients with community-acquired pneumonia by adhering to national guidelines: Community-Acquired Pneumonia Organization International cohort study results. Archives of Internal Medicine, 169(16): 1515–1524.
- McCabe C, et al. (2009). Guideline-concordant therapy and reduced mortality and length of stay in adults with community-acquired pneumonia: Playing by the rules. Archives of Internal Medicine, 169(16): 1525–1531.
Other Works Consulted
- Centers for Disease Control and Prevention (2010). Prevention of pneumococcal disease among infants and children: Use of 13-valent pneumococcal conjugate vaccine and 23-valent pneumococcal polysaccharide vaccine - Recommendations of the Advisory Committee on Immunization Practices (ACIP). MMWR, 59(RR-11): 1–18. Also available online: http://www.cdc.gov/mmwr/PDF/rr/rr5911.pdf.
- Centers for Disease Control and Prevention (2010). Updated recommendations for prevention of invasive pneumococcal disease among adults using the 23-valent pneumococcal polysaccharide vaccine (PPSV23). MMWR, 59(34): 1102–1106. Also available online: http://www.cdc.gov/mmwr/preview/mmwrhtml/mm5934a3.htm?s_cid=mm5934a3_e.
- Fiebach NH, Barr RG (2007). Respiratory tract infections. In NH Fiebach et al., eds., Principles of Ambulatory Medicine. 7th ed., pp. 474–500. Philadelphia: Lippincott Williams and Wilkins.
- Mandell LA, et al. (2007). Infectious Diseases Society of America/American Thoracic Society consensus guidelines on the management of community-acquired pneumonia in adults. Clinical Infectious Diseases, 44(Suppl 2): S27-S72.
- Murray MT (2013). Bronchitis and pneumonia. In JE Pizzorno Jr, MT Murray, eds., Textbook of Natural Medicine, 4th ed., pp. 1271–1276. St. Louis: Elsevier.
- Siemieniuk R, et al. (2015). Corticosteroid therapy for patients hospitalized with community-acquired pneumonia: A systematic review and meta-analysis. Annals of Internal Medicine, 163(7): 519–528. DOI:10.7326/M15-0715. Accessed January 4, 2016.
- Torres A, et al. (2010). Pyogenic bacterial pneumonia and lung abscess. In R Mason et al., eds., Murray and Nadel's Textbook of Respiratory Medicine, 5th ed., vol. 1, pp. 699–740. Philadelphia: Saunders.
Current as ofSeptember 5, 2018
Author: Healthwise Staff
Medical Review: E. Gregory Thompson MD - Internal Medicine
Brian D. O'Brien MD - Internal Medicine
Adam Husney MD - Family Medicine
R. Steven Tharratt MD, MPVM, FACP, FCCP - Pulmonology, Critical Care Medicine, Medical Toxicology
Current as of: September 5, 2018