Pneumonia
Peer reviewed by Dr Toni HazellLast updated by Dr Mohammad Sharif Razai, MRCGPLast updated 24 Jun 2024
Meets Patient’s editorial guidelines
- DownloadDownload
- Share
In this series:Chest infectionAcute bronchitisAspiration pneumoniaPost-operative chest infectionBronchoscopy
Pneumonia is inflammation (swelling) of the lung tissue. It's usually caused by bacterial infections such as Streptococcus pneumoniae. However, it can also be caused by viral infections, including flu and coronavirus (COVID-19), and fungi.
This infection causes the air sacs in the lungs (alveoli) to be filled with fluid, making it hard for oxygen to reach the bloodstream. As a result, patients could have trouble breathing.
In this article:
Pneumonia can affect one or both lungs, and you can even have it without knowing it. This is sometimes called walking pneumonia.
Anyone can get pneumonia, but it mostly affects people younger than 5 or over the age of 65 due to their weakened immune systems. Smoking and alcohol consumption may also raise your risk of catching pneumonia.
Pneumonia is often more serious than bronchitis, which is the inflammation or infection of the large airways called the bronchi (see diagram). It's possible to have both conditions at the same time, known as bronchopneumonia.
Pneumonia patch diagram
Continue reading below
What causes pneumonia?
Pneumonia is an infection commonly caused by germs. These germs are usually bacteria or viruses that cause bacterial or viral pneumonia. Streptococcus pneumoniae bacteria is the most common cause in both adults and children. Other bacterial causes include Haemophilus influenzae and Staphylococcus aureus.
Respiratory viruses such as flu, respiratory syncytial virus (RSV), measles virus and coronavirus can cause viral pneumonia, which is usually milder than bacterial pneumonia. However, those with viral pneumonia are at risk of getting bacterial pneumonia.
A well-known group of bacteria called atypicals, such as Mycoplasma pneumoniae and Legionella pneumophila, causes pneumonia in about 3 out of 10 cases. Other germs, such as fungi, yeasts, or protozoa, can sometimes also cause pneumonia.
Rarely, pneumonia can be caused by inhaling poisons or chemicals rather than an infection. Many different substances, including liquids, gases, small particles, dust, or fumes, can cause this.
You may breathe in bacteria, viruses, or other germs. If you are normally healthy, a small number of germs usually does not matter. They will be trapped in your phlegm (sputum) and killed by your immune system. However, sometimes the germs multiply and cause lung infections.
Risk factors for pneumonia
You are more likely to catch pneumonia if you are already in poor health or have certain health conditions, for example:
If you are frail or elderly.
If you have a lung disease such as COPD.
If you have diabetes.
If you have heart, liver or kidney disease.
If you have neurological conditions that increase the risk of inhaling food or liquids (aspiration).
If you have low immunity to infection (weakened immune system). Low immunity can be caused by immunosuppressant medications, untreated HIV, or another serious illness.
However, even healthy people sometimes develop pneumonia.
Pneumonia is usually classified based on where it is acquired. For example, it can be hospital-acquired or community-acquired. Sometimes, it is classified by how the infection is caught, such as aspiration pneumonia.
Hospital acquired pneumonia
Hospital-acquired pneumonia is a lung infection that develops at least 48 hours after being admitted to the hospital and was not present when you were admitted. This is different from ventilator-associated pneumonia, which occurs more than 48 hours after a patient has been put on a ventilator.
Hospital acquired pneumonia is more common in patients in the intensive care unit, those who have recently had major surgery, or those who have been in the hospital for a long time. Symptoms usually include fever or low body temperature, thick mucus, and difficulty getting enough oxygen
Continue reading below
Aspiration pneumonia
A particular type of pneumonia is known as aspiration pneumonia.
This occurs when small amounts of stomach contents or liquids from the mouth or throat are inhaled into the lungs. These inhaled substances can irritate the lungs, cause infection, or block the smaller airways.
Aspiration pneumonia usually affects frail elderly people, those who are drowsy or unconscious, or individuals with conditions that cause swallowing difficulties.
Is pneumonia contagious?
It is possible to catch pneumonia from an infected person. The bacteria that cause pneumonia can be breathed in through sneezes or coughs. These bacteria can also be transferred by touching surfaces an infected person has touched.
However, not everyone exposed to pneumonia-causing bacteria will develop pneumonia.
The likelihood of developing pneumonia also depends on the type of pneumonia. If the source is a viral infection, contact with an infected person may transfer the virus, but you may not develop pneumonia as a result.
Usually, your immune system destroys the bacteria or virus, and you'll be fine. However, pneumonia infection can sometimes occur even in healthy people.
Continue reading below
What are the symptoms of pneumonia?
The common symptoms of pneumonia include:
Cough.
Feeling generally unwell.
A high temperature (fever).
Loss of appetite.
Sweating.
Shivering.
Headaches.
Aches and pains.
All these symptoms are also seen in flu (influenza) so it is sometimes difficult to diagnose pneumonia in the early stages. See the separate leaflet called Flu (Influenza) for further details.
Coughing
Coughing up a lot of phlegm (sputum) is more likely to happen in pneumonia than in flu. The phlegm may become yellow-coloured or green-coloured. It may be streaked with blood, or you may cough up more significant amounts of blood.
Shortness of breath
You may become short of breath, start breathing faster than normal, and develop a tight chest. If the infection involves the pleura (the membrane between the lung and the chest wall), you might feel a sharp pain in the side of your chest. A doctor may hear crackles when listening to your chest with a stethoscope.
How long does pneumonia last?
The duration of pneumonia depends on the severity of the illness and who gets it. According to the NHS, it may take up to 6 months to feel completely back to normal. However, symptoms should have substantially reduced in mild cases after 4 to 6 weeks.
When should you see a doctor for pneumonia?
Who you see depends on your symptoms and how unwell you feel. Seek appropriate care based on the severity of your condition. For example, if you experience severe difficulty breathing, chest pain, confusion or disorientation, seek emergency care by calling an ambulance.
If you have asthma or chronic obstructive pulmonary disease (COPD), and feel unwell you should ask your doctor for advice.
Your doctor may recommend increasing your inhaler medication or using a 'rescue pack' of antibiotics and steroid tablets at the first sign of an infection. For those with asthma, this information might be included in your personalised asthma action plan. If it is not, consult your doctor for advice if you develop symptoms of a chest infection.
There are a number of pneumonia symptoms that mean you should see a healthcare professional, including a GP, even if you do not have any other lung problems. They include:
If a fever, wheezing or headache becomes worse or severe.
If you develop fast breathing, shortness of breath, or chest pains.
If you cough up blood or if your phlegm becomes dark or rusty-coloured.
If you become drowsy or confused.
If a cough lasts for longer than 3-4 weeks.
If you have repeated bouts of acute bronchitis.
If any other symptom develops that you are concerned about.
How is pneumonia diagnosed?
A doctor will suspect pneumonia by asking about your symptoms. They may also ask about:
Your medical history and that of your family.
Whether you smoke, how much and for how long.
The examination may include:
Checking your temperature.
Listening to your heart and lungs with a stethoscope. They may want to lift or take off your top. If you want a chaperone during the examination, the doctor will arrange one.
Tapping your chest over the infected lung (percussion). An area of an infected lung may sound dull.
Checking how much oxygen is circulating in your body by using a small device called a pulse oximeter. This device is placed on the end of your finger.
Checking your peak flow measurement if you have asthma.
Chest X-ray
A chest X-ray may be required to confirm the diagnosis and to see how serious the infection is.
Other tests
These tests are usually carried out if you need to be admitted to hospital. They include sending a sample of phlegm (sputum) for analysis and blood tests to check if the infection has spread to your blood.
Pneumonia treatment
You may need medications to treat your pneumonia, depending on the cause and type of pneumonia.
Medications
Treating pneumonia at home may be sufficient if you are normally healthy and the pneumonia is not severe.
If the doctor thinks you have pneumonia, an antibiotic such as amoxicillin is prescribed. Once pneumonia is diagnosed, it's best to start treatment within four hours and complete the prescribed course. Bacterial infection is a common cause, and antibiotic medications kill bacteria. However, antibiotic medicines don't work against viruses.
Amoxicillin is usually effective against the most common causes. If it doesn't seem to be effective and your doctor suspects a less common bacterial infection, they may change your medication.
If you are allergic to penicillin (amoxicillin is a type of penicillin), your doctor will prescribe an alternative, such as clarithromycin, that works just as well. Antibiotics in capsule, tablet, or liquid form are preferred to injections through a vein (intravenous), provided you can take them.
Antibiotic treatment is usually effective, and you can expect to recover fully. If the treatment is working, symptoms should start to improve after three days. In most cases, antibiotics can be stopped in five days unless you are still very unwell.
Self-care
During your recovery, ensure you:
Have lots to drink, to avoid becoming lacking in fluid in the body (dehydrated).
Take regular paracetamol to ease high temperature (fever) and headaches.
Let a doctor know if symptoms do not improve over the following three days.
You may feel tired for a while after the infection has cleared. If the symptoms persist for longer than three weeks, you should ask your doctor to check you again.
Hospital treatment
Hospital admission may be advised if you have severe pneumonia or if symptoms do not quickly improve after you have started antibiotic treatment.
You are more likely to be treated in hospital if you are already in poor health, or if an infection with a more serious infecting germ is suspected. For example, if infection with Legionella pneumophila (the bacterium that causes Legionnaires' disease) is suspected.
Even if you are in hospital, you are likely to be offered antibiotics in capsule, tablet or liquid form unless you have difficulties taking them, in which case they may be given through a vein. If the condition is thought to be severe, you may only be given antibiotics through a vein. Your antibiotic treatment will be stopped after five days, unless you are very unwell.
Sometimes oxygen and other supportive treatments are needed if you have severe pneumonia. Those who become severely unwell may need treatment in an intensive care unit or high dependency unit.
When you return home, even though the infection is treated, you may feel tired and unwell for some time.
Complications of pneumonia
Pneumonia can cause complications, especially in people with existing health conditions, those who are frail, or patients with weakened immune systems.
Potential complications include:
Fluid buildup around the lungs can occur in the pleura, which are thin membranes lining the lungs and the inside of the chest wall. This condition is called pleural effusion and can cause chest pain and difficulty breathing. It is often necessary to drain the excess fluid, especially if it is infected.
Pus formation in the lung (lung abscess). This may need treatment with antibiotics or drainage through a needle or surgery.
Infection spreads to the bloodstream (bacteraemia). This serious condition can lead to sepsis, causing a drop in blood pressure and damage to various organs.
Severe lung inflammation and fluid buildup (acute respiratory distress syndrome). This is a life-threatening condition that requires urgent medical care.
Pus collects in the space between the lungs and the chest wall (ampyema). This condition often requires the pus to be drained with a needle or surgery to prevent the infection from spreading.
Infection can strain the kidneys, heart or liver. Pneumonia can worsen existing health conditions, leading to complications such as kidney failure or heart attacks.
Is pneumonia deadly?
If you are well enough to be looked after at home, the outlook (prognosis) for pneumonia is good. Less than 1 person in 100 will die as a result of pneumonia. Those who die tend to be people who are older, those with weakened immune systems, or those who also have other health problems.
The outlook is not as good if you need to be cared for in a hospital. Between 5 and 14 out of every 100 people admitted with pneumonia to a regular ward rather than an intensive care unit may die. These will usually be people who were already unwell before getting pneumonia.
If the pneumonia is very severe or caused by an aggressive type of bacteria, such as legionella, you may need to be moved to an intensive care unit in the hospital. In these cases of pneumonia, the outlook is much worse. Unfortunately, over 30% of these people may die.
If you are normally healthy but develop repeated bouts of pneumonia, it may be the first sign of a lung problem, such as a lung abscess or an issue with your immune system. If pneumonia recurs without an apparent reason, some tests of your immune system may be recommended.
How to prevent pneumonia
Certain protective measures can help prevent some types of pneumonia or reduce the severity and duration of the illness. These include:
Vaccination
One of the most effective ways to prevent pneumonia is through immunisation against pneumococcus, the most common cause of bacterial pneumonia.
Getting the annual flu vaccine can also help prevent pneumonia. The flu jab is especially recommended if you are 65 years or older, have a health condition, are pregnant, or are a young child.
Babies should also be vaccinated against Hib (Haemophilus influenzae type b) as part of their routine childhood immunisations.
See the separate leaflets called Pneumococcal immunisation and Immunisation for flu (Flu jab) for further details.
Lifestyle changes
Other prevention measures include maintaining a healthy lifestyle and washing hands with soap and water for 20 seconds. Cigarette smoke damages the lining of the airways and makes the lungs more prone to infection. Therefore, stopping smoking will reduce your risk of developing lung infections.
Further reading and references
- Pneumonia: Diagnosis and management of community- and hospital-acquired pneumonia in adults; NICE Clinical Guideline (December 2014 - last updated October 2023)
- Cough (acute): antimicrobial prescribing; NICE Guidance (February 2019)
- Pneumonia (community-acquired): antimicrobial prescribing; NICE Guidance (September 2019)
- Pneumonia (hospital-acquired): antimicrobial prescribing; NICE Guidance (September 2019)
- Annotated BTS Guideline for the management of CAP in adults; British Thoracic Society (2009 - Summary of recommendations updated 2015)
- Torres A, Peetermans WE, Viegi G, et al; Risk factors for community-acquired pneumonia in adults in Europe: a literature review. Thorax. 2013 Nov;68(11):1057-65. doi: 10.1136/thoraxjnl-2013-204282.
- Metlay JP, Waterer GW, Long AC, et al; Diagnosis and Treatment of Adults with Community-acquired Pneumonia. An Official Clinical Practice Guideline of the American Thoracic Society and Infectious Diseases Society of America. Am J Respir Crit Care Med. 2019 Oct 1;200(7):e45-e67. doi: 10.1164/rccm.201908-1581ST.
Continue reading below
Article history
The information on this page is written and peer reviewed by qualified clinicians.
Next review due: 24 Jun 2027
24 Jun 2024 | Latest version
Are you protected against flu?
See if you are eligible for a free NHS flu jab today.
Feeling unwell?
Assess your symptoms online for free