BackgroundPatients with prolonged length of hospital stay (LOS) not only increase their risks of nosocomial infections but also deny other patients access to inpatient care. Hepatobiliary (HPB) malignancies have some of highest incidences in East and Southeast Asia and the management of patients undergoing HPB surgeries have yet to be standardized. With improved neurosurgery techniques for intracranial aneurysms and tumors, neurosurgeries (NS) can be expected to increase. Elective surgeries account for far more operations than emergencies surgeries. Thus, with potentially increased numbers of elective HPB and NS, this study seeks to explore perioperative factors associated with prolonged LOS for these patients to improve safety and quality of practice.MethodsA retrospective cross-sectional medical record review study from January 2014 to January 2015 was conducted at a 1250-bed tertiary academic hospital in Singapore. All elective HPB and NS patients over 18 years old were included in the study except day and emergency surgeries, resulting in 150 and 166 patients respectively. Prolonged LOS was defined as above median LOS based on the complexity of the surgical procedure. The predictor variables were preoperative, intraoperative, and postoperative factors. Student’s t-test and stepwise logistic regression analyses were conducted to determine which factors were associated with prolonged LOS.ResultsFactors associated with prolonged LOS for the HPB sample were age and admission after 5 pm but for the NS sample, they were functional status, referral to occupational therapy, and the number of hospital-acquired infections.ConclusionOur findings indicate that preoperative factors had the greatest association with prolonged LOS for HPB and NS elective surgeries even after adjusting for surgical complexity, suggesting that patient safety and quality of care may be improved with better pre-surgery patient preparation and admission practices.Electronic supplementary materialThe online version of this article (10.1186/s12913-017-2817-8) contains supplementary material, which is available to authorized users.