Patients with type 2 diabetes mellitus (T2DM) are at increased risk of developing heart failure. Sodium-glucose cotransporter-2 inhibitors reduce the risk of hospitalization for heart failure (HHF) in patients with T2DM. We aimed to develop and validate a practical clinical risk score for HHF in patients with T2DM and assess whether this score can identify high-risk patients with T2DM who have the greatest reduction in risk for HHF with a sodium-glucose cotransporter-2 inhibitor. We developed a clinical risk score for HHF in 8212 patients with T2DM in the placebo arm of SAVOR-TIMI 53 (Saxagliptin Assessment of Vascular Outcomes Recorded in Patients With Diabetes Mellitus-Thrombolysis in Myocardial Infarction 53). Candidate variables were assessed using multivariable Cox regression, and independent clinical risk indicators achieving statistical significance of P<0.001 were included in the risk score. We externally validated the score in 8578 patients with T2DM in the placebo arm of DECLARE-TIMI 58 (Dapagliflozin Effect on Cardiovascular Events-Thrombolysis in Myocardial Infarction 58). The relative and absolute risk reductions in HHF with the sodium-glucose cotransporter-2 inhibitor dapagliflozin were assessed by baseline HHF risk. Five clinical variables were independent risk predictors of HHF: prior heart failure, history of atrial fibrillation, coronary artery disease, estimated glomerular filtration rate, and urine albumin-to-creatinine ratio. A simple integer-based score (0-7 points) using these predictors identified a >20-fold gradient of HHF risk (P for trend <0.001) in both the derivation and validation cohorts, with C indices of 0.81 and 0.78, respectively. Although relative risk reductions with dapagliflozin were similar for patients across the risk scores (25%-34%), absolute risk reductions were greater in those at higher baseline risk (1-sided P for trend=0.04), with high-risk (2 points) and very-high-risk (≥3 points) patients having 1.5% and 2.7% absolute reductions in Kaplan-Meier estimates of HHF risk at 4 years, respectively. Risk stratification using a novel clinical risk score for HHF in patients with T2DM identifies patients at higher risk for HHF who derive greater absolute benefit from sodium-glucose cotransporter-2 inhibition. URL: https://www.clinicaltrials.gov. Unique identifiers: NCT01107886 and NCT01730534.