Importance: Heart failure is a major cause of morbidity and mortality worldwide. The use of risk scores has the potential to improve targeted use of interventions by clinicians that improve patient outcomes, but this hypothesis has not been tested in a randomized trial. Objective: To evaluate whether prognostic information in heart failure translates into improved decisions about initiation and intensity of treatment, more appropriate end-of-life care, and a subsequent reduction in rates of hospitalization or death. Design, Setting, and Participants: This was a pragmatic, multicenter, electronic health record-based, randomized clinical trial across the Yale New Haven Health System, comprising small community hospitals and large tertiary care centers. Patients hospitalized for heart failure who had N-terminal pro-brain natriuretic peptide (NT-proBNP) levels of greater than 500 pg/mL and received intravenous diuretics within 24 hours of admission were automatically randomly assigned to the alert (intervention) or usual-care groups. Interventions: The alert group had their risk of 1-year mortality calculated using an algorithm that was derived and validated using similar historic patients in the electronic health record. This estimate, including a categorical risk assessment, was presented to clinicians while they were interacting with a patient's electronic health record. Main Outcomes and Measures: The primary outcome was a composite of 30-day hospital readmissions and all-cause mortality at 1 year. Results: Between November 27, 2019, through March 7, 2021, 3124 patients were randomly assigned to the alert (1590 [50.9%]) or usual-care (1534 [49.1%]) group. The alert group had a median (IQR) age of 76.5 (65-86) years, and 796 were female patients (50.1%). Patients from the following race and ethnicity groups were included: 13 Asian (0.8%), 324 Black (20.4%), 136 Hispanic (8.6%), 1448 non-Hispanic (91.1%), 1126 White (70.8%), 6 other ethnicity (0.4%), and 127 other race (8.0%). The usual-care group had a median (IQR) age of 77 (65-86) years, and 788 were female patients (51.4%). Patients from the following race and ethnicity groups were included: 11 Asian (1.4%), 298 Black (19.4%), 162 Hispanic (10.6%), 1359 non-Hispanic (88.6%), 1077 White (70.2%), 13 other ethnicity (0.9%), and 137 other race (8.9%). Median (IQR) NT-proBNP levels were 3826 (1692-8241) pg/mL in the alert group and 3867 (1663-8917) pg/mL in the usual-care group. A total of 284 patients (17.9%) and 270 patients (17.6%) were admitted to the intensive care unit in the alert and usual-care groups, respectively. A total of 367 patients (23.1%) and 359 patients (23.4%) had a left ventricular ejection fraction of 40% or less in the alert and usual-care groups, respectively. The model achieved an area under the curve of 0.74 in the trial population. The primary outcome occurred in 619 patients (38.9%) in the alert group and 603 patients (39.3%) in the usual-care group (P =.89). There were no significant differences between study groups in the prescription of heart failure medications at discharge, the placement of an implantable cardioverter-defibrillator, or referral to palliative care. Conclusions and Relevance: Provision of 1-year mortality estimates during heart failure hospitalization did not affect hospitalization or mortality, nor did it affect clinical decision-making. Trial Registration: ClinicalTrials.gov Identifier NCT03845660.