Objective: HIV genotype-resistance testing can help identify more effective antiretroviral treatment (ART) regimens for patients, substantially increasing the likelihood of viral suppression and immune recovery. We sought to evaluate the cost-effectiveness of genotype-resistance testing before first-line ART initiation in Brazil. Design: We used a previously published microsimulation model of HIV disease (CEPAC-International) and data from Brazil to compare the clinical impact, costs, and cost-effectiveness of initial genotype testing (Genotype) with no initial genotype testing (No genotype). Methods: Model parameters were derived from the HIV Clinical Cohort at the Evandro Chagas Clinical Research Institute and from published data, using Brazilian sources whenever possible. Baseline patient characteristics included 69% male, mean age of 36 years (SD, 10 years), mean CD4 count of 347 per microliter (SD, 300/µL) at ART initiation, annual ART costs from 2012 US 1400toUS13,400, genotype test cost of US 230,andprimaryresistanceprevalenceof4.412,300. Results: Compared with No genotype, Genotype increased life expectancy from 18.45 to 18.47 years and reduced lifetime cost from US 45,000to44,770; thus, in the base case, Genotype was cost saving. Genotype was cost-effective at primary resistance prevalence as low as 1.4% and remained cost-effective when subsequent-line ART costs decreased to 30% of baseline value. Cost-inefficient results were observed only when simultaneously holding multiple parameters to extremes of their plausible ranges. Conclusions: Genotype-resistance testing in ART-naive individuals in Brazil will improve survival and decrease costs and should be incorporated into HIV treatment guidelines in Brazil