The diagnosis of Pneumocystis pneumonia (PCP) in immunocompromised patients is still challenging today due to the absence of an in vitro culture system and the low diagnostic accuracy of microscopic examinations. Herein, we performed a meta-analysis to evaluate the accuracy of real-time polymerase chain reaction (PCR) in the diagnosis of PCP.