Vitamin D (ergocalciferolD2, cholecalciferolD3, alfacalcidol) is a fatsoluble vitamin that helps your body absorb calcium and phosphorus. Having the right amount of vitamin D, calcium, and phosphorus is important for building and keeping strong bones. Vitamin D is used to treat and prevent bone disorders (such as rickets, Osteomalacia).