OBJECTIVES: Single use of genotypic antiretroviral resistance testing (GART) after first failure of highly active antiretroviral therapy (HAART) was reported to be cost effective; its use prior HAART initiation is unknown. Guidelines recommend GART after each treatment failure. We assessed the cost effectiveness of GART used routinely after first and subsequent treatment failures. Furthermore, we determined the minimum effectiveness required for GART prior to the first HAART to be as cost effective as after treatment failure. DESIGN AND METHODS: We developed a decision-analytic Markov model to estimate lifetime clinical and economic outcomes in a cohort of HIV patients starting HAART. Rates of treatment failure, estimates of GART effectiveness and data on disease progression were derived from published trials and observational studies. A cost effectiveness analysis was performed from the perspective of the healthcare system using cost data from a Central European healthcare setting. Deterministic and probabilistic sensitivity analyses using Monte Carlo technique were performed. RESULTS: GART after treatment failures increased life expectancy by 9 months and undiscounted life-time costs per case by 16,406 euros. The discounted incremental cost effectiveness ratio was 22,510 euros per life-year gained (euros/LY). Best- and worst-case scenarios yielded 16,512 euros/LY and 42,900 euros/LY, respectively. GART prior to the initiation of HAART would be equally cost effective if it could reduce the probability of first HAART failure by at least 36%. CONCLUSION: Routine use of GART after treatment failures is cost effective. GART prior to the first HAART would be equally cost effective if it could lower the probability of first HAART failure by approximately a third.