To determine the effect of the microbiota on vitamin D metabolism, serum 25-hydroxyvitamin D(25D), 24,25-dihydroxyvitamin D (24,25D), and 1,25-dihydroxyvitamin D (1,25D) were measured in germ-free (GF) mice before and after conventionalization (CN). GF mice had low levels of 25D, 24,25D, and 1,25D and were hypocalcemic. CN of the GF mice with microbiota, for 2 weeks recovered 25D, 24,25D, and 1,25D levels. Females had more 25D and 24,25D than males both as GF mice and after CN. Introducing a limited number of commensals (eight commensals) increased 25D and 24,25D to the same extent as CN. Monocolonization with the enteric pathogenCitrobacter rodentiumincreased 25D and 24,25D, but the values only increased after 4 weeks ofC. rodentiumcolonization when inflammation resolved. Fibroblast growth factor (FGF) 23 was extremely high in GF mice. CN resulted in an increase in TNF-α expression in the colon 2 days after CN that coincided with a reduction in FGF23 by 3 days that eventually normalized 25D, 24,25D, 1,25D at 1-week post-CN and reinstated calcium homeostasis. Neutralization of FGF23 in GF mice raised 1,25D, without CN, demonstrating that the high FGF23 levels were responsible for the low calcium and 1,25D in GF mice. The microbiota induce inflammation in the GF mice that inhibits FGF23 to eventually reinstate homeostasis that includes increased 25D, 24,25D, and 1,25D levels. The microbiota through FGF23 regulates vitamin D metabolism.