Purpose: To assess the role of anti-inflammatory medication following cataract surgery on the formation of posterior capsular opacification. Design: Cohort study. Methods: A retrospective registry analysis of 25,818 consecutive patients who underwent cataract surgery between the years 2014 and 2018 at Helsinki University Hospital in Finland. Nd:YAG laser capsulotomy rates were compared between patients treated postoperatively with topical steroids, nonsteroidal anti-inflammatory medications (NSAIDs), or their combination. Kaplan-Meier and Cox regression analyses were used. A single eye of each patient was included. Main outcomes were confirmed against a second independent dataset. Results: A total of 13,368 patients were included in the analysis, with a mean age of 73.2 ± 9.7 years; 61.7% were female. Pseudoexfoliation was noted in 10.1% of cases. The mean follow-up time was 22.8 ± 15.7 months. Patients were treated with steroid monotherapy (28.9% of cases), NSAID monotherapy (62.2%), or a combination of both (8.9%). Treatment with steroids resulted in significantly lower Nd:YAG capsulotomy rates compared to NSAIDs (hazard ratio [HR] 0.76, 95% confidence interval [CI] 0.62-0.93, P = .009). Treatment with combination therapy of steroids and NSAIDs showed no added benefit over steroid monotherapy (HR 1.11, 95% CI 0.68-1.80, P = .674). Cox regression analysis adjusted for patients' age, sex, pseudoexfoliation, and risk stratification remained significantly predictive for lower capsulotomy rates with steroid treatment over NSAIDs (HR 0.70, 95% CI 0.52-0.88, P = .001). Conclusions: Postoperative treatment with steroids among patients undergoing uncomplicated cataract surgery was associated with lower rates of clinically significant posterior capsule opacification compared to treatment with NSAIDs alone. Combination therapy of steroids and NSAIDs had no added benefit over steroids alone.