The authors developed a mathematical model that simulated the events that occur in an HIV-infected person, including medical expenses, detection, treatment, transmitting the disease to other people, and death. The model calculated the additional costs because of screening and the additional length of life because of earlier detection. It also calculated the shortening of life as a result of becoming infected with HIV. With this information, the model can calculate the cost per extra year of life gained (cost-effectiveness) after screening. The researchers can then decide whether HIV screening provides good value by comparing its cost-effectiveness with the cost-effectiveness of other tests and treatments that doctors use routinely in daily practice.