Diagnosis of pneumocystosis usually relies on microscopic demonstration of Pneumocystis jirovecii in respiratory samples. Conventional PCR can detect low levels of P. jirovecii DNA but cannot differentiate active pneumonia from colonization. In this study, we used a new real-time quantitative PCR (qPCR) assay to identify and discriminate these entities. One hundred and sixty-three bronchoalveolar lavage fluids and 115 induced sputa were prospectively obtained from 238 consecutive immunocompromised patients presenting signs of pneumonia. Each patient was classified as having a high or a low probability of P. jirovecii pneumonia according to clinical and radiological presentation. Samples were processed by microscopy and by a qPCR assay amplifying the P. jirovecii mitochondrial large-subunit rRNA gene; qPCR results were expressed as trophic form equivalents (TFEq)/mL by reference to a standard curve obtained from numbered suspensions of trophic forms. From 21 samples obtained from 16 patients with a high probability of P. jirovecii pneumonia, 21 were positive by qPCR whereas only 16 were positive by microscopy. Fungal load ranged from 134 to 1.73 × 106 TFEq/mL. Among 257 specimens sampled from 222 patients with a low probability of P. jirovecii pneumonia, 222 were negative by both techniques but 35 were positive by qPCR (0.1–1840 TFEq/mL), suggesting P. jirovecii colonization. Two cut-off values of 120 and 1900 TFEq/mL were proposed to discriminate active pneumonia from colonization, with a grey zone between them. In conclusion, this qPCR assay discriminates active pneumonia from colonization. This is particularly relevant for patient management, especially in non-human immunodeficiency virus (HIV)-infected immunocompromised patients, who often present low-burden P. jirovecii infections that are not diagnosed microscopically.