We quantified T cell proliferation and thymic function in primary HIV infection (PHI; n = 19) and chronic HIV infection (CHI; n = 14) by measuring Ki67 staining and TCR excision circle (TREC) number. After antiretroviral therapy of PHI there is a profound decrease in the number and percentage of Ki67(+) T cells (<6% Ki67(+)) with no significant increase in TREC per million cells and a transient increase in TREC per milliliter. In contrast, after antiretroviral therapy of CHI there is a reduction in the percentage but little change in the total number of Ki67(+)CD4(+) T cells associated with increases in both TREC per million cells and TREC per milliliter. Using a mathematical model that accounts for proliferation, death, and redistribution of T cells, we find that redistribution is consistent with the TREC changes observed during treatment of PHI and that an increase in thymic output is needed to explain the increase in TREC during treatment of CHI. Consideration of TREC per milliliter shows that changes in proliferation alone cannot explain the changes in TREC. In addition, although increased proliferation of memory cells in HIV infection has been established, we find no difference in TREC per million CD45RA(-) "memory" T cells between healthy and infected individuals (p = 0.154 for CD4(+); p = 0.383 for CD8(+)). Finally, although the number of TREC per million cells is always much lower in memory T cells than in naive T cells, in the setting of HIV infection, given that memory cells make up a larger proportion of total T cells, we find that 50% of TREC per milliliter in CD4(+) T cells is harbored in the CD45RA(-) "memory" subset of our infected subjects.