Rationale: Prior studies have shown an anticancer effect of metformin in patients with breast and colorectal cancer. It is unclear, however, whether metformin has a mortality benefit in lung cancer.Objectives: To compare overall survival of patients with diabetes with stage IV non-small cell lung cancer (NSCLC) taking metformin versus those not on metformin.Methods: Using data from the Surveillance, Epidemiology, and End Results registry linked to Medicare claims, we identified 750 patients with diabetes 65-80 years of age diagnosed with stage IV NSCLC between 2007 and 2009. We used propensity score methods to assess the association of metformin use with overall survival while controlling for potential confounders.Measurements and Main Results: Overall, 61% of patients were on metformin at the time of lung cancer diagnosis. Median survival in the metformin group was 5 months, compared with 3 months in patients not treated with metformin (P , 0.001). Propensity score analyses showed that metformin use was associated with a statistically significant improvement in survival (hazard ratio, 0.80; 95% confidence interval, 0.71-0.89), after controlling for sociodemographics, diabetes severity, other diabetes medications, cancer characteristics, and treatment.Conclusions: Metformin is associated with improved survival among patients with diabetes with stage IV NSCLC, suggesting a potential anticancer effect. Further research should evaluate plausible biologic mechanisms and test the effect of metformin in prospective clinical trials.