Background and aim: The aim of this prospective observational cohort study was to verify the relationship between number of drugs used and functional outcome in hip fracture patients undergoing rehabilitation. Methods: This study was conducted on 139 patients with hip fracture who underwent a rehabilitation program. Efficiency rate in the Functional Independence Measure (FIM) and Berg Balance Scale (BBS), and length of stay (LOS) were the outcome measures. Results: At the end of rehabilitation, 66.1% of patients showed an increase in number of drugs used, while 33.9% used the same or lower number of drugs than at admission. At the end of rehabilitation patients with increased pharmacotherapy took a higher total number of drug classes (p = 0.001), had longer LOS (p = 0.009) and lower Berg efficiency (p = 0.048) than patients with the same or lower pharmacotherapy. The number of drugs used at discharge was an independent determinant of LOS (beta = 0.19, p = 0.022) and FIM efficiency (beta = − 0.20, p = 0.025). Age was a determinant of LOS (beta = 0.17, p = 0.044) and BBS efficiency (beta = − 0.23, p = 0.009), while CIRS severity was a determinant of BBS efficiency only (beta = − 0.22, p = 0.016). Discussion: Findings of study indicate that in hip fracture patients, the number of drugs prescribed at discharge is an important indicator of LOS and rehabilitation efficiency. Conclusions: These findings can help the physician to better plan the rehabilitation of hip fracture patients who require polypharmacy. © 2019, Springer Nature Switzerland AG.