25(OH)D deficiency has been associated with significantly worse physical performance in individuals with normal renal function. We examined the physical function, muscle strength and balance in age- and gender-matched 25 Stage 3 - 4 CKD patients and 47 Stage 5 CKD patients on peritoneal dialysis (PD) with vitamin D deficiency by objective methods and evaluated the effect of vitamin D replacement on physical performance tests: the "timed up and go" (TUG) test, gait velocity test, timed chair stand test, stair climb test, dynamic balance tests (TUG test, dynamic postural stability test), static balance test (functional reach test) and muscle strength in these two groups. At baseline 25(OH) D in the Stage 3 - 4 CKD patients and patients on PD were 6.9 +/- 3.5 ng/ml (17.2 +/- 8.7 nmol/l) and 5.7 +/- 3.3 ng/ml (14.2 +/- 8.2 nmol/l), respectively (p > 0.05). Mean (+/- SD) 25(OH)D in Stage 3 - 4 CKD patients and those on PD were 52.0 +/- 40.9 ng/ml (129.7 +/- 102.2 nmol/l) and 41.9 +/- 21, ng/ml (104,5 +/- 52,6 nmol/l) respectively after vitamin D replacement (p > 0.05). When both Stage 3 - 4 CKD and dialysis patients became vitamin D-sufficient after vitamin D replacement, they took a significantly shorter time to complete the TUG test, gait velocity test, the timed chair stand test and stair climb test. Results of physical performance tests, static and dynamic balance tests and isometric strength tests improved in both groups after the treatment (p < 0.05). In conclusion, our results show that vitamin D supplementation improves muscle strength, functional ability and balance in both CKD and dialysis patients.