A woman's reproductive history is strongly associated with her risk of ovarian cancer.However, it is unclear how pregnancies of different duration impact a woman's ovarian cancer risk, and therefore, what part of a pregnancy explains the protective effect. Using a cohort of all Danish women followed from 1968 to 2018, with prospectively registered information on reproductive history (eg, gestational duration of pregnancies, tubal ligation and resection and hormonal pharmaceutical use), we investigated the effect of pregnancy duration on ovarian cancer risk. We adjusted for potential confounders, such as age at pregnancy and time since pregnancy, using loglinear Poisson regression to isolate the effect of pregnancy duration on ovarian cancer risk. Among 2.5 million Danish women with 4.4 million pregnancies, a pregnancy was associated with a reduction of ovarian cancer risk of 21% (95% CI, 14%-28%), 26% (95% CI, 21%-31%), 12% (95% CI, 7%-17%) and 3% (95% CI, À5% to 11%) compared to one less, for the first, second, third and fourth pregnancy, respectively (P < .001 for heterogeneity), with similar effects of induced abortions, spontaneous abortions and childbirths. Sensitivity analysis of age at pregnancy, time since pregnancy and other potential confounders did not change these findings. The reduced ovarian cancer risk associated with pregnancy is primarily driven by the first three pregnancies, with similar effects of induced abortion, spontaneous abortions and childbirth, suggesting that mainly exposure to early pregnancy factors, and not pregnancy duration, protect against ovarian cancer.