To assess the relation between diabetic retinopathy (DR) severity, duration of diabetes, insulin dependence, and preoperative hemoglobin A1c (HbA1c) with visual outcome after phacoemulsification for cataract in patients with type 2 diabetes. Kaiser Permanente Northern California, USA. Retrospective case series. Information was obtained from the electronic medical record for patients, June 1, 2010, through May 31, 2015. Confounding factors and clustering of eyes within patients were controlled for using linear mixed-effects regression models for continuous outcomes and general estimating equations for dichotomous outcomes. The study included 65 370 patients; 28% had type 2 diabetes without DR, 5% nonproliferative DR, and 1.2% proliferative DR. Patients with diabetes and no DR were as likely as those without diabetes to achieve a corrected distance visual acuity (CDVA) of 20/20 (odds ratio, 1.01; 95% confidence interval, 0.94-1.10). The odds of a postoperative CDVA of 20/25 or worse increased with the severity of retinopathy duration of diabetes and insulin dependence, but not with the preoperative HbA1c. Although the odds of a postoperative CDVA of 20/20 was lower in patients with DR, every DR group averaged 4 lines of CDVA improvement, the same as patients without diabetes. A longer duration of diabetes, insulin dependence, and elevated HbA1c were not associated with worse postoperative outcomes. Patients with DR and cataracts were less likely to achieve a CDVA of 20/20 vision but gained as many lines of CDVA from phacoemulsification as patients without diabetes, showing no evidence that cataract surgery should be delayed in diabetic patients with elevated HbA1c.