Of 180,359 patients, 5,389 (3.0%) experienced postoperative Respiratory failure. Twenty-eight variables were found to be independently associated with RF. Current procedural terminology group, patients with a higher American Society of Anesthesiologists classification, emergency operations, more complex operation (work relative value units), preoperative sepsis, and elevated creatinine were more likely to experience Respiratory failure.Older patients, male patients, smokers, and those with a history of congestive heart failure or COPD, or both, were also predisposed. The model's discrimination (c-statistic) was excellent, with no decrement from development (0.856) to validation (0.863) samples.