Targeted screening remains an important approach to human immunodeficiency virus (HIV) testing. The authors aimed to derive and validate an instrument to accurately identify patients at risk for HIV infection, using patient data from a metropolitan sexually transmitted disease clinic in Denver, Colorado (1996-2008). With multivariable logistic regression, they developed a risk score from 48 candidate variables using newly identified HIV infection as the outcome. Validation was performed using an independent population from an urban emergency department in Cincinnati, Ohio. The derivation sample included 92,635 patients; 504 (0.54%) were diagnosed with HIV infection. The validation sample included 22,983 patients; 168 (0.73%) were diagnosed with HIV infection. The final score included age, gender, race/ethnicity, sex with a male, vaginal intercourse, receptive anal intercourse, injection drug use, and past HIV testing, and values ranged from -14 to +81. For persons with scores of <20, 20-29, 30-39, 40-49, and ≥50, HIV prevalences were 0.31% (95% confidence interval (CI): 0.20, 0.45) (n = 27/8,782), 0.41% (95% CI: 0.29, 0.57) (n = 36/8,677), 0.99% (95% CI: 0.63, 1.47) (n = 24/2,431), 1.59% (95% CI: 1.02, 2.36) (n = 24/1,505), and 3.59% (95% CI: 2.73, 4.63) (n = 57/1,588), respectively. The risk score accurately categorizes patients into groups with increasing probabilities of HIV infection.