This study examines the risk of developing cytomegalovirus (CMV) retinitis as a function of the duration and degree of CD4+ lymphocyte depletion. A retrospective analysis of 135 persons infected with the human immunodeficiency virus (HIV) was performed. Kaplan-Meier estimates for the percentage of patients developing CMV retinitis during the 27-month study period were calculated. Twenty-six patients were diagnosed as having CMV retinitis. In 14 of these patients, T cell phenotyping was done within the 3 months preceding diagnosis. The mean CD4+ lymphocyte count for these patients was 15.6 cells/mm3 (range, 2-33/mm3). At 27 months, the percentage of patients developing CMV retinitis with baseline CD4+ lymphocyte counts of 0-50, 51-100, and 101-250 cells/mm3 was 41.9%, 26.3%, and 14.7%, respectively (log-rank test, p = 0.003). The odds ratio for developing CMV retinitis for those with baseline CD4+ lymphocyte counts of 0-50 cells/mm3 compared with those with CD4+ lymphocyte counts of 101-250 cells/mm3 was 4.62 (p = 0.002). Twenty-four patients had CD4+ lymphocyte counts of < or = 50 cells/mm3 for an average of 13.1 months prior to diagnosis. Twenty-two patients had an acquired immune deficiency syndrome (AIDS)-defining illness diagnosed for an average of 18.0 months prior to the onset of retinitis. CMV retinitis is most likely to develop in patients with AIDS when the CD4+ lymphocyte count is < or = 50 cells/mm3.