Ergocalciferol is a prescription vitamin that is used to prevent or treat Vitamin D deficiency. Ergocalciferol is in a class of medications called Vitamin D analogs and works by helping the body to use more calcium from food or supplements. Ergocalciferol will only work if you also get the right amount of calcium. It’s important to maintain the right amount of calcium intake to ensure the effectiveness of ergocalciferol. Ergocalciferol is the inactivated version of Vitamin D and is referred to as Vitamin D2.