How do you know if you have pneumonia?

Published: February 26, 2016
Last reviewed: June 15, 2017

A cough is the most typical–and sometimes the only–symptom of pneumonia. Other symptoms can include coughing up yellow or green mucus, fever, shortness of breath, feeling of chest congestion and fatigue, but some of these also appear in the flu, acute bronchitis, asthmatic attack, laryngotracheitis (croup) and pertussis (whooping cough) (Chart 1).

It is a doctor who can make a diagnosis of pneumonia from your symptoms, listening to your lungs, chest X-ray, blood and sputum culture or other investigations.

Pneumonia Chest X-ray image

Picture 1. A cough and white shadows on an X-ray film are
practically the only characteristics of all types of pneumonia.

(an X-ray image source: Wikimedia)

The recovery time of treated uncomplicated pneumonia depends on its type and severity and can be as short as 1 week or longer than 6 weeks.

Symptoms and Signs of Bacterial Pneumonia

Initial symptoms of bacterial pneumonia usually include [24]:

  • Coughing up yellow, green or rusty mucus, sometimes with blood in it
  • High fever (>100.4 °F or 38 °C) or hypothermia (<95 °F or 35 °C), sweating
  • Shaking chills
  • Shortness of breath
  • Fatigue
  • Pain on the sides of the chest during coughing and deep breathing (in inflammation of the lung membranes–pleurisy)
  • Confusion, especially in elderly

During listening to the lungs with the stethoscope (auscultation), a doctor can hear crackling sounds, wheezing and decreased breath sounds.

How long does bacterial pneumonia last?

In individuals in otherwise good health, symptoms of bacterial pneumonia treated with antibiotics can improve within 48-72 hours; a cough usually lasts for less than 8 days [2]. In older individuals treated in hospitals, coughing up mucus and shortness of breath may last for more than 2 weeks and dry cough and fatigue for more than 6 weeks [2,26,27].

Symptoms of Viral Pneumonia

Initial symptoms can include a runny nose, sore throat, fever, headache and muscle pain. Later, a dry or a productive cough with small amount of clear, yellow or green mucus can develop [5].

In bacterial pneumonia, the cough is usually productive with yellow or green mucus and fever is above 100.4 °F or 38 °C, while in viral pneumonia the cough is usually dry and fever is not so high. Still, there are many exceptions, so it is not possible to differentiate between the two types of pneumonia from the color of the mucus or other symptoms alone [1,15].

In acute bronchitis, which is usually viral, coughing up yellow or green mucus is common, but fever is not. Check for other differences between bronchitis and pneumonia.

Symptoms of Atypical (Walking) Pneumonia

Atypical pneumonia is caused by bacteria, such as Mycoplasma and Chlamydophila; it mainly appears in young people 5-40 years of age.

The first symptom of atypical pneumonia is usually slowly worsening dry cough, followed by fatigue and, sometimes, low-grade fever, night sweats, nausea, skin rash or ear pain [3].

Atypical pneumonia, especially the one caused by Mycoplasma, is called walking pneumonia because it is often not serious enough to require bed rest. In mild atypical pneumonia, you may have no cough or other symptoms. Such pneumonia, which can be accidentally revealed by an X-ray is called silent or occult pneumonia.

The bacterium Legionella can cause atypical pneumonia known as Legionnaires’ disease. You can inhale bacteria from contaminated aerosolized water (mist) from air condition, whirlpools and showers mainly in big buildings with complex water heating systems, such as hospitals and hotels. Flu-like symptoms, which include a dry cough, high fever, shortness of breath, headache, muscle pain and, sometimes, shortness of breath, vomiting and diarrhea, can last for 2-5 days [4].

Symptoms of Fungal Pneumonia

If you work on a farm and regularly inhale fungi from the soil, you may develop a mild fungal pneumonia with a dry cough and fever [6]. Fungal pneumonia in otherwise healthy individuals is usually mild and can heal on its own without treatment [6].

If you have impaired immunity, for example, due to HIV/AIDS or chemotherapy, you may develop chronic pneumonia caused by Aspergillus, Candida, Histoplasma, Pneumocystis jirovecii or other fungi; symptoms can include a dry cough, low-grade fever and shortness of breath during exercise [7].


Physical Examination

  • During listening to the lungs with the stethoscope (auscultation), a doctor can hear crackling sounds, wheezing and decreased breath sounds in severe bacterial or viral pneumonia, but barely anything abnormal in mild or atypical pneumonia.
  • During tapping your chest, a doctor may hear dull sounds.


  • For a diagnosis of pneumonia, a chest X-ray that shows white shadows (infiltration or consolidation) is necessary: one or two big diffuse shadows in bacterial pneumonia and many small scattered infiltrates in other types. X-ray alone cannot reveal the exact cause of pneumonia, though [11]. In some cases, X-ray can be abnormal even 12 weeks after onset of treatment [28]. In flu, acute bronchitis and infections of upper respiratory tract, X-ray is normal.
  • Lung ultrasound can be as useful in the diagnosis of pneumonia as X-ray.
  • The culture of the sputum (the phlegm you cough up), throat swabs and blood can reveal bacteria, viruses or fungi [11,12].
  • Specific antibodies in the blood can be found in viral [12] and fungal [6] pneumonia.
  • The number of white blood cells or leukocytes (WBC) can be increased in bacterial pneumonia [11], whooping cough [20] and other bacterial infections [11], in viral pneumonia [16], croup [23] but usually not in influenza [17] or acute viral bronchitis. WBC alone cannot help to differentiate between pneumonia and other infectious diseases.
  • Pulse oximetry and arterial blood gas (ABG) analysis can show low oxygen saturation in severe pneumonia but not in acute bronchitis, flu or infections of the upper respiratory tract [11].

Chart 1. Pneumonia Differential Diagnosis

Cough, Mucus, Breathing


Bacterial pneumonia Yellow, green mucus, shortness of breath High
Viral pneumonia A dry cough or white mucus [15] High
Atypical pneumonia A dry cough Low-grade
Acute bronchitis (chest cold) Clear, yellow or green mucus No
Influenza (flu) A dry cough High
Common cold A dry cough No
Asthma A dry cough, shortness of breath No
Aspiration pneumonitis Pink, frothy mucus, shortness of breath [13] No
Drug-induced pneumonitis (heroin, crack cocaine, methotrexate) A dry cough, shortness of breath [29] Yes
Lung edema (in heart failure) Pink, frothy mucus, shortness of breath [14] No
Pulmonary embolism (in deep vein thrombosis) A dry cough, severe chest pain, shortness of breath, fainting [30] Yes or no
Acute respiratory distress syndrome (ARDS) [22] A dry cough or white or pink, frothy sputum, shortness of breath Yes or no
Pertussis (whooping cough), in children [19] A progressive, severe, dry cough, followed by a whoop sound [19] Low-grade
Laryngotracheitis (croup), in children A dry, barking cough, high-pitched sound during inhalation (stridor) [21] Low-grade
COPD (chronic bronchitis) Yellow, green mucus, difficulty breathing No
Tuberculosis Coughing for several weeks, blood in sputum, night sweats Low-grade
Sarcoidosis A dry cough, enlarged lymph nodes in the neck or armpits, fatigue Low-grade
Lung cancer A persistent cough, rusty sputum or blood in sputum [25,29] No

Chart 1 other references: [8]

6 Responses to How do you know if you have pneumonia?

  1. Vickishannon says:

    I have viral pneumonia had it for some time now I’m in antibiotics for two more weeks when will I feel better

    • Jan Modric says:

      Be sure to complete the prescribed treatment. The duration of viral pneumonia greatly depends on eventual underlying conditions…so your doctor can answer this better.

    • Chris says:

      You should NOT be taking antibiotics for a virus. I would see another doctor or go to the ER. Viral pneumonia is not treated with antibiotics.

      • Jan Modric says:

        Viral and bacterial pneumonia can coexist. Also, viral pneumonia can increase the risk of developing bacterial pneumonia, so antibiotics are sometimes given as a prevention. You can read here that antibiotics can be used in viral pneumonia.

  2. Jan Heath says:

    My symptoms started as allergies (I thought would go away) and moved onto coughing, running nose, ears crackle and stopped up. I went to Dr and thinks I have walking pneumonia after having symptoms for about a week. He took my blood to see what was going on. Started me on Cecefpodoxine 200 mg and SMZ TMP DS, two pills twice a day: it has been 4 days on both antobics and I still am having running nose, stopped up ears and coughing mucus up. I do feel a little better but, trying to figure out how much longer I will have these symptoms and could I have viral instead of bacterial. I never had a fever much and read where antibiotics will not help. Viral infection. Can anyone help with answers:

    • Jan Modric says:

      To know if you have a viral or bacterial (or atypical – walking) pneumonia, a doctor would need to order a blood test or sputum test for microorganisms. Viral pneumonia most commonly occurs as a complication of flu. In case you have walking pneumonia (which I can’t say), you can not expect that antibiotics will have a significant effect in 4 days but rather in few weeks.

      Running nose is not typical for walking (atypical) pneumonia. Again, I can’t say is it or not, but you may also consider seasonal allergy (allergic rhinitis, pollen allergy) or viral pharyngitis.

Load more comments
Show less

Leave a Reply

Your email address will not be published. Required fields are marked *