<bold>Context: </bold>The impact of vitamin D deficiency on the success of ovarian stimulation according to underlying infertility diagnosis has not been investigated.<bold>Objective: </bold>To evaluate the relationship between vitamin D deficiency and reproductive outcomes after ovarian stimulation in women with either polycystic ovary syndrome (PCOS) or unexplained infertility.<bold>Design: </bold>Retrospective cohort study.<bold>Setting: </bold>Analysis of randomized controlled trial (RCT) data.<bold>Participants: </bold>Participants from the Pregnancy in Polycystic Ovary Syndrome II (PPCOS II) RCT (n = 607); participants from the Assessment of Multiple Intrauterine Gestations from Ovarian Stimulation (AMIGOS) RCT of unexplained infertility (n = 647).<bold>Interventions: </bold>Serum 25(OH)D levels measured in banked sera.<bold>Main Outcome Measures: </bold>Primary: live birth; secondary: ovulation (PPCOS II), pregnancy, and early pregnancy loss.<bold>Results: </bold>In PPCOS II, subjects with vitamin D deficiency [25(OH)D < 20 ng/mL or 50 nmol/L] were less likely to ovulate (adjusted OR, 0.82; 95% CI, 0.68 to 0.99; P = 0.04) and experienced a 40% lower chance of live birth (adjusted OR, 0.63; 95% CI, 0.41 to 0.98; P = 0.04) than those not deficient. In AMIGOS, no significant association between vitamin D deficiency and live birth was noted. In pregnant subjects from both studies, vitamin D deficiency was associated with elevated risk of early pregnancy loss (OR, 1.6; 95% CI, 1.0 to 2.6; P = 0.05).<bold>Conclusions: </bold>In this investigation of women pursuing ovarian stimulation, the association between vitamin D deficiency and diminished live birth relied on carrying the diagnosis of PCOS and was not observed in unexplained infertility. Given the generally modest success of ovarian stimulation, addressing vitamin D deficiency may prove an important treatment adjunct for many infertile women.