Background: Diabetes mellitus is a possible risk factor for the development of idiopathic pulmonary fibrosis (IPF), yet the effect of antidiabetic therapy on the course of IPF is unknown. Objectives: This post hoc analysis assessed the effect of metformin on clinically relevant outcomes in patients with IPF. Methods: For the primary analysis, patients randomized to placebo (n = 624) in 3 phase 3, double-blind, controlled trials of pirfenidone (CAPACITY [NCT00287716 and NCT00287729]; ASCEND [NCT01366209]) were categorized by baseline metformin use. The primary outcome was disease progression (forced vital capacity [FVC] decline ≥10%, 6-min walking distance [6MWD] decline ≥50 m, or death). Other outcomes included mortality, hospitalization, FVC decline (≥10 and ≥5%), and 6MWD decline. Outcomes were also assessed in patients with diabetes and/or hyperglycemia (impaired glucose tolerance [IGT] and diabetes population [IGT-diabetes population]) and all patients included in the 3 studies (intention-to-treat [ITT] population). Results: Overall, 71 (11.4%) patients were metformin users and 553 (88.6%) were nonmetformin users. Baseline data were similar between groups, except for a higher percentage of males (84.5 vs. 73.2%) and a history of diabetes (98.6 vs. 11.6%) in metformin users versus nonmetformin users. The unadjusted 1-year analyses demonstrated no significant differences in disease progression or other outcomes. A higher proportion of metformin users compared with nonmetformin users had a relative FVC decline of ≥5% (63.4 vs. 50.6%, p = 0.043). Results were similar for the IGT-diabetes population and for the ITT population. Multivariable analyses yielded similar results. Conclusions: Metformin has no effect on clinically relevant outcomes in patients with IPF.