We performed an economic evaluation of HIV testing among intravenous drug users (IVDUs) in Italy using the analytical framework of cost-effectiveness analysis. A semi-Markov model was developed to calculate costs and life expectancy of a cohort of IVDUs with and without an annual HIV testing program. We also investigated the incremental cost-effectiveness of a hypothetical early treatment to prolong the life expectancy of HIV-infected asymptomatic subjects by 1 year. The testing program is cost saving in the low prevalence scenario (0.05), and costs L 14,000,000 (US $8,400) and L 55,800,000 (US $33,500) per year of life saved in areas of medium (0.3) and high (0.6) prevalence, respectively. The incremental cost-effectiveness of the hypothetical early treatment may compare favorably with other health care interventions. The program may be considered a cost-effective procedure in low and medium prevalence areas. Where prevalence is high, more evidence about the magnitude of the behavior change is needed. In these areas, the availability of an effective early treatment may become the economic rationale for implementing such a program.