To propose the optimal timing to consider tracheostomy insertion for weaning of mechanically ventilated patients recovering from coronavirus disease 2019 pneumonia. We investigated the relationship between duration of mechanical ventilation prior to tracheostomy insertion and in-hospital mortality. In addition, we present a machine learning approach to facilitate decision-making. Prospective cohort study. Guy's & St Thomas' Hospital, London, United Kingdom. Consecutive patients admitted with acute respiratory failure secondary to coronavirus disease 2019 requiring mechanical ventilation between March 3, 2020, and May 5, 2020. Baseline characteristics and temporal trends in markers of disease severity were prospectively recorded. Tracheostomy was performed for anticipated prolonged ventilatory wean when levels of respiratory support were favorable. Decision tree was constructed using C4.5 algorithm, and its classification performance has been evaluated by a leave-one-out cross-validation technique. One-hundred seventy-six patients required mechanical ventilation for acute respiratory failure, of which 87 patients (49.4%) underwent tracheostomy. We identified that optimal timing for tracheostomy insertion is between day 13 and day 17. Presence of fibrosis on CT scan (odds ratio, 13.26; 95% CI [3.61-48.91]; p ≤ 0.0001) and Pao2:Fio2 ratio (odds ratio, 0.98; 95% CI [0.95-0.99]; p = 0.008) were independently associated with tracheostomy insertion. Cox multiple regression analysis showed that chronic obstructive pulmonary disease (hazard ratio, 6.56; 95% CI [1.04-41.59]; p = 0.046), ischemic heart disease (hazard ratio, 4.62; 95% CI [1.19-17.87]; p = 0.027), positive end-expiratory pressure (hazard ratio, 1.26; 95% CI [1.02-1.57]; p = 0.034), Pao2:Fio2 ratio (hazard ratio, 0.98; 95% CI [0.97-0.99]; p = 0.003), and C-reactive protein (hazard ratio, 1.01; 95% CI [1-1.01]; p = 0.005) were independent late predictors of in-hospital mortality. We propose that the optimal window for consideration of tracheostomy for ventilatory weaning is between day 13 and 17. Late predictors of mortality may serve as adverse factors when considering tracheostomy, and our decision tree provides a degree of decision support for clinicians.