Acute respiratory failure requiring mechanical ventilation is a leading cause of mortality in the intensive care unit. Although single peripheral blood oxygen saturation/fraction of inspired oxygen (SpO2/FiO2) ratios of hypoxemia have been evaluated to risk-stratify patients with acute respiratory distress syndrome, the utility of longitudinal SpO2/FiO2 ratios is unknown. To assess time-based SpO2/FiO2 ratios ≤ 150-SpO2/FiO2 time at risk (SF-TAR)-for predicting mortality in mechanically ventilated patients. Retrospective, observational cohort study of mechanically ventilated patients at 21 community and 2 academic hospitals. Association between the SF-TAR in the first 24 hours of ventilation and mortality was examined using multivariable logistic regression and compared with the worst recorded isolated partial pressure of arterial oxygen/fraction of inspired oxygen (P/F) ratio. In 28,758 derivation cohort admissions, every 10% increase in SF-TAR was associated with a 24% increase in adjusted odds of hospital mortality (adjusted odds ratio = 1.24; 95% confidence interval [CI] = 1.23-1.26); a similar association was observed in validation cohorts. Discrimination for mortality modestly improved with SF-TAR (area under the receiver operating characteristic curve [AUROC] = 0.81; 95% CI = 0.81-0.82) vs the worst P/F ratio (AUROC = 0.78; 95% CI = 0.78-0.79) and worst SpO2/FiO2 ratio (AUROC = 0.79; 95% CI = 0.79-0.80). The SF-TAR in the first 6 hours offered comparable discrimination for hospital mortality (AUROC = 0.80; 95% CI = 0.79-0.80) to the 24-hour SF-TAR. The SF-TAR can identify ventilated patients at increased risk of death, offering modest improvements compared with single SpO2/FiO2 and P/F ratios. This longitudinal, noninvasive, and broadly generalizable tool may have particular utility for early phenotyping and risk stratification using electronic health record data in ventilated patients.