Despite India’s enormous population, it would be cost-effective to fight its growing AIDS epidemic by testing all 800 million sexually active adults in the country every five years and treating all those infected, a new statistical study has concluded.

The study, published online in May by PLoS One, notes that testing there costs only $3.33, and that first-line antiretroviral therapy is about $100 a year. The World Health Organization measure for a medical intervention’s cost-effectiveness is whether it saves one year of life for less than three times the per capita gross domestic product. In India’s case, that is $3,900 per year-of-life saved.

Testing as often as every year would be cost-effective in high-risk groups like drug injectors, gay and bisexual men, female prostitutes, migrants and visitors to S.T.D. clinics, the study found. Treatment makes people with H.I.V. less infectious, so early treatment would prevent the virus’s spread to others.

With an organized medical system, cheap drugs and relatively low-paid doctors, India is probably one of the most cost-effective places for fighting AIDS, said the study’s lead author, Dr. Kartik K. Venkatesh of the Alpert Medical School at Brown University. African countries import cheap Indian drugs, but their medical systems often must be propped up by foreign donors and doctors.

Only 0.3 percent of Indian adults have H.I.V., but because the population is so large, it has the world’s third-largest epidemic, after South Africa and Nigeria.

In 2005, Dr. Venkatesh noted, a similar analysis of the American epidemic published in The New England Journal of Medicine concluded that screening much of the American population every three to five years would be cost-effective. But the United States has never come close to that goal, and new infections have held steady at 50,000 per year.