Vitamin D is important for musculoskeletal health and may have significant implications for maintaining physical activity in elderly patients. Our goal was to investigate whether serum 25-hydroxyvitamin D (25OHD) levels are associated with pre-operative physical activity in patients who are offered elective knee or hip joint replacement surgery. We performed a single-center, retrospective analysis of patients who had elective knee or hip replacement surgery from 2002 to 2012. To investigate the association of serum 25OHD levels with pre-operative physical activity, as assessed by the University of California, Los Angeles (UCLA) activity scale, we performed a multivariable logistic regression analysis while controlling for age, sex, race, body mass index, American Society of Anesthesiologists physical status score, and season. We identified 182 patients who met inclusion criteria. Mean (± standard deviation) 25OHD level and UCLA activity scale score were 29±13 ng/mL and 4±2, respectively. Patients with 25OHD levels <20 ng/mL were almost three times more likely to have UCLA activity scale scores ≤3 [adjusted odds ratio 2.78; 95% confidence interval 1.72-9.17]. Further adjusting for "type of 25OHD assay" or "type of joint surgery" did not materially change this result. In our cohort of knee or hip joint replacement surgery patients, 25OHD levels were associated with pre-operative physical activity scores. Prospective, randomized, clinical trials are needed to verify whether optimizing pre-operative vitamin D status may improve physical activity and influence clinical decision-making in knee or hip joint replacement surgery candidates.