The use of administrative data to study pneumonia is limited because International Classification of Diseases, 9th revision, Clinical Modification (ICD9-CM) diagnosis codes do not specify whether pneumonia is community-acquired (CAP), a key clinical distinction. We classified 212 patients discharged with a diagnosis code for pneumonia as to whether or not they had CAP, using three administrative data-based systems (Diagnosis Related Groups (DRGs) alone, principal diagnosis alone, and a complex algorithm). We examined agreement with classification by clinician chart review. We also compared the length of stay (LOS) and mortality among the CAP populations identified with different methods. Agreement between the clinical review and the three administrative data methods ranged from 86 to 80%. Classification by DRG performed least well. Populations defined by claims data had similar mortality but shorter mean LOS (9.70, 9.40, and 7.91 days for the algorithm, principal diagnosis and DRG methods, respectively) than the clinically defined population (10.85 days). We conclude that studies of CAP using populations identified by claims may underestimate LOS.