A suboptimal vitamin D and calcium status has been associated with higher risk of type 2 diabetes in observational studies, but evidence from trials is lacking. We determined whether vitamin D supplementation, with or without calcium, improved glucose homeostasis in adults at high risk of diabetes. Ninety-two adults were randomly assigned in a 2-by-2 factorial-design, double-masked, placebo-controlled trial to receive either cholecalciferol (2000 IU once daily) or calcium carbonate (400 mg twice daily) for 16 wk. The primary outcome was the change in pancreatic β cell function as measured by the disposition index after an intravenous-glucose-tolerance test. Other outcomes were acute insulin response, insulin sensitivity, and measures of glycemia. Participants had a mean age of 57 y, a body mass index (BMI; in kg/m(2)) of 32, and glycated hemoglobin (Hb A(1c)) of 5.9%. There was no significant vitamin D × calcium interaction on any outcomes. The disposition index increased in the vitamin D group and decreased in the no-vitamin D group (adjusted mean change ± SE: 300 ± 130 compared with -126 ± 127, respectively; P = 0.011), which was explained by an improvement in insulin secretion (62 ± 39 compared with -36 ± 37 mU · L(-1) · min, respectively; P = 0.046). Hb A(1c) increased less, but nonsignificantly, in the vitamin D group than in the no-vitamin D group (0.06 ± 0.03% compared with 0.14 ± 0.03%, respectively; P = 0.081). There was no significant difference in any outcomes with calcium compared with no calcium. In adults at risk of type 2 diabetes, short-term supplementation with cholecalciferol improved β cell function and had a marginal effect on attenuating the rise in Hb A(1c). This trial was registered at clinicaltrials.gov as NCT00436475.