Our results illustrate the cost-effectiveness of testing for HIV infection in settings where diagnosis at higher CD4 counts early in the course of disease is likely to occur and when treatment with HAART is initiated earlier in the course of infection. Here, CD4 is linked to infection.