Background/aimThe aim of this study was to investigate the effect of vitamin D supplementation on ambulation and mobility in hospitalized patients undergoing stroke rehabilitation.Materials and methodsThis study was conducted retrospectively between September 2020 and October 2020 at Gazi University Faculty of Medicine Physical Medicine and Rehabilitation Department. Seventy-six patients who received inpatient stroke rehabilitation treatment between May 2018 and February 2020 were included in the study. The patients were divided into two groups as those who did and did not take vitamin D supplements. Lower extremity motor function and ambulation status were compared using Brunnstrom recovery stage (lower extremity) and functional ambulation classification (FAC) scores before and after rehabilitation.Results Thirty-nine patients received vitamin D treatment during the rehabilitation process and 37 patients did not. The two groups were similar in terms of age, sex, time since stroke, stroke type, comorbid diseases, nutritional status, rehabilitation duration, and FAC and Brunnstrom scores before rehabilitation (p > 0.05). At the end of rehabilitation, the changes in FAC and Brunnstrom scores were higher in patients receiving vitamin D supplementation (p = 0.005 and p = 0.018). The change in FAC and Brunnstrom scores in patients who were undergoing rehabilitation for the first time and/or in the first 3 months after stroke was higher in the group receiving vitamin D supplementation compared with the group not receiving vitamin D (p < 0.05). In patients who were not within the first 3 months after stroke, vitamin D treatment did not affect FAC and Brunnstrom scores.Conclusion Vitamin D supplementation may increase the success of rehabilitation therapy in patients during the first 3 months poststroke.