To perform a cost-effectiveness analysis of pirfenidone (PFN) versus nintedanib (NDB) on the treatment of idiopathic pulmonary fibrosis (IPF) under the Brazilian private healthcare system perspective. Model results were expressed in a lifetime time horizon. Outcomes were quality-adjusted life years (QALY), progression free survival (PFS) and life years (LY) gained. Treatment's ex-factory prices were obtained from official published lists, by the Brazilian Ministry of Health, considering the incidence of taxes (ICMS 18%). Costs related to disease management, lung transplantation and end-of-life were calculated thru microcosting (resource use was set after a review of the published literature and costs were attributed from official sources). Efficacy data (time to treatment discontinuation, overall and progression free survival) for PFN were extracted from pooled CAPACITY 1 + 2 and ASCEND trials and projected to a lifetime time horizon thru a parametric distribution (Weibull). NDB's data were, then, extrapolated from PFN thru an indirect treatment comparison (ITC), whose calculated treatment effects were used to estimate NDB efficacy outcomes. A probabilistic sensitivity analysis (PSA) was performed to validate model results. PFN and NDB unitary costs were BRL 9,144 (BRL 33.87 per 267 mg tablet) and BRL 14,916 (BRL 248.60 per 150 mg tablet), respectively, according to their list prices. PFN and NDB showed a total cost of BRL 311,158 and BRL 508,203 (PFN-NDB = -BRL 197,045), respectively, on a lifetime time horizon. PFN outperformed NDB on all outcomes, showing incremental results of 0.47 QALY, 0.81 LY and 0.40 PFS gained when compared to NDB. Overall, PFN was dominant on all outcomes when compared to NDB. The majority of the simulations (77%) on the PSA were located on the 4th quadrant corroborating base case results. PFN is dominant and can potentially reduce treatment costs associated with the treatment of IPF when compared to NDB.