Several patient populations have been identified as high risk for extubation failure despite successful completion of a spontaneous breathing trial (SBT). Extubation failure and subsequent need for emergent re-intubation have been associated with increased morbidity and mortality. In this review, we discuss ways to optimize the value and performance of the SBT in a subgroup of high-risk patients (elderly, cardiac, and/or respiratory failure) to reduce the rate of extubation failure. We recommend the use of T-piece mode, longer duration SBT, and measurement of the rapid shallow breathing index (breathing frequency/tidal volume in L) off ventilatory support to increase the predictive value of the SBT. In addition, measurement of changes in central venous oxygen saturation and serum brain natriuretic peptide, and measurements of mitral inflow and annular velocity using bedside transthoracic echocardiography with tissue Doppler imaging may help guide the clinician in determining who and when to extubate and thus minimize the rate of extubation failure. Arterial blood gas analysis performed at the end of the SBT may help determine who will benefit from prophylactic use of noninvasive ventilatory support postextubation.