Pulmonary function was measured in 169 male patients seropositive for the human immunodeficiency virus (HIV). The transfer factor for carbon monoxide (TLCO) in symptom free patients and patients with persistent generalised lymphadenopathy was normal (greater than 83% of predicted values). Patients with the AIDS related complex, non-pulmonary Kaposi sarcoma, and non-pulmonary non-Kaposi sarcoma AIDS (that is, opportunist infections affecting other organs) had lower mean values for TLCO (77%, 70%, and 70% of predicted respectively). These values were significantly lower than values for symptom free patients. Lower mean values of 50% and 63% predicted TLCO were observed in patients during the acute and recovery phases of Pneumocystis carinii pneumonia. TLCO was also low in patients with lung mycobacterial infection and in a patient with lung Kaposi sarcoma. Forced expiratory volume in one second, peak expiratory flow, and maximal expiratory flow at 50% of vital capacity were significantly reduced only in patients with acute pneumocystis pneumonia. This study shows that abnormalities in the results of pulmonary function tests, particularly TLCO, although greatest in patients with pulmonary complications of AIDS, are also present in patients with AIDS but without other evidence of pulmonary disease, and in patients with the AIDS related complex. The predictive and prognostic implications of these findings require further investigation.