The Global Registry of Acute Coronary Events (GRACE) 2.0 score was developed and validated in predominantly male patient populations. We aimed to assess its sex-specific performance in non-ST-segment elevation acute coronary syndromes (NSTE-ACS) and to develop an improved score (GRACE 3.0) that accounts for sex differences in disease characteristics. We evaluated the GRACE 2.0 score in 420 781 consecutive patients with NSTE-ACS in contemporary nationwide cohorts from the UK and Switzerland. Machine learning models to predict in-hospital mortality were informed by the GRACE variables and developed in sex-disaggregated data from 386 591 patients from England, Wales, and Northern Ireland (split into a training cohort of 309 083 [80·0%] patients and a validation cohort of 77 508 [20·0%] patients). External validation of the GRACE 3.0 score was done in 20 727 patients from Switzerland. Between Jan 1, 2005, and Aug 27, 2020, 400 054 patients with NSTE-ACS in the UK and 20 727 patients with NSTE-ACS in Switzerland were included in the study. Discrimination of in-hospital death by the GRACE 2.0 score was good in male patients (area under the receiver operating characteristic curve [AUC] 0·86, 95% CI 0·86-0·86) and notably lower in female patients (0·82, 95% CI 0·81-0·82; p<0·0001). The GRACE 2.0 score underestimated in-hospital mortality risk in female patients, favouring their incorrect stratification to the low-to-intermediate risk group, for which the score does not indicate early invasive treatment. Accounting for sex differences, GRACE 3.0 showed superior discrimination and good calibration with an AUC of 0·91 (95% CI 0·89-0·92) in male patients and 0·87 (95% CI 0·84-0·89) in female patients in an external cohort validation. GRACE 3·0 led to a clinically relevant reclassification of female patients to the high-risk group. The GRACE 2.0 score has limited discriminatory performance and underestimates in-hospital mortality in female patients with NSTE-ACS. The GRACE 3.0 score performs better in men and women and reduces sex inequalities in risk stratification. Swiss National Science Foundation, Swiss Heart Foundation, Lindenhof Foundation, Foundation for Cardiovascular Research, and Theodor-Ida-Herzog-Egli Foundation.