Background: Decreasing the length of hospital stay is an ideal course of action to appropriately allocate medical resources. The aim of this retrospective study was to identify perioperative factors that may decrease the length of hospital stay (LOS). Methods: In this study, we collected the data on 1112 patients who underwent primary total knee arthroplasty surgery (TKAs) at our institution from Jan 1, 2011 to Nov 31, 2017. Based on the published literature, 16 potential factors (12 preoperative variables, 1 intraoperative variable, and 3 postoperative variables) were investigated. The patients requiring a hospital stay longer than the mean LOS (8 days) were defined as patients with a prolonged LOS. The factors with a P value less than 0.1 in the univariate analysis were further analysed in a multivariate model. An ordinal regression was used to determine independent risk factors for a prolonged LOS. Results: The mean LOS was 8.3 days (±4.3), with a range of 2 to 30 days. Sixteen variables were analysed by univariate analysis, and 11 of them had p < 0.1 and were included in the multivariable model. Finally, 9 factors were found to be associated with a prolonged LOS. Among the 9 variables, 2 were surgery-related factors (operative time and intraoperative blood loss), and 3 were patient-related factors (age, ASA classification and neurological comorbidities). Conclusion: In this study, we found that the clinical protocol, complications, the patient's age, the ASA classification, neurological comorbidities, the operative time, the ward, intraoperative blood loss and the surgeon were all factors contributing to a prolonged LOS. In clinical practice, these factors provide important information for the surgeon and are useful for identifying patients with a high risk of a prolonged LOS.