The Centers for Disease Control and Prevention (CDC) had an annual budget of approximately $327 million to fund health departments and community-based organizations for core HIV testing and prevention programs domestically between 2001 and 2006. Annual HIV incidence has been relatively stable since the year 2000 and was estimated at 48,600 cases in 2006 and 48,100 in 2009. Using estimates on HIV incidence, prevalence, prevention program costs and benefits, and current spending, we created an HIV resource allocation model that can generate a mathematically optimal allocation of the Division of HIV/AIDS Prevention's extramural budget for HIV testing, and counseling and education programs. The model's data inputs and methods were reviewed by subject matter experts internal and external to the CDC via an extensive validation process. The model projects the HIV epidemic for the United States under different allocation strategies under a fixed budget. Our objective is to support national HIV prevention planning efforts and inform the decision-making process for HIV resource allocation. Model results can be summarized into three main recommendations. First, more funds should be allocated to testing and these should further target men who have sex with men and injecting drug users. Second, counseling and education interventions ought to provide a greater focus on HIV positive persons who are aware of their status. And lastly, interventions should target those at high risk for transmitting or acquiring HIV, rather than lower-risk members of the general population. The main conclusions of the HIV resource allocation model have played a role in the introduction of new programs and provide valuable guidance to target resources and improve the impact of HIV prevention efforts in the United States.