A randomized trial indicates that magnesium optimizes vitamin D status, raising it in people with deficient levels and lowering it in people with high levels.