Although there is increasing evidence that genetic factors influence gestational age, it is unclear to what extent this is due to fetal and/or maternal genes. In this study, we apply a novel analytical model to estimate genetic and environmental contributions to pregnancy history records obtained from 165,952 Swedish families consisting of offspring of twins, full siblings, and half-siblings (1987-2008). Results indicated that fetal genetic factors explained 13.1% (95% confidence interval (CI): 6.8, 19.4) of the variation in gestational age at delivery, while maternal genetic factors accounted for 20.6% (95% CI: 18.1, 23.2). The largest contribution to differences in the timing of birth were environmental factors, of which 10.1% (95% CI: 7.0, 13.2) was due to factors shared by births of the same mother, and 56.2% (95% CI: 53.0, 59.4) was pregnancy specific. Similar models fit to the same data dichotomized at clinically meaningful thresholds (e.g., preterm birth) resulted in less stable parameter estimates, but the collective results supported a model of homogeneous genetic and environmental effects across the range of gestational age. Since environmental factors explained most differences in the timing of birth, genetic studies may benefit from understanding the specific effect of fetal and maternal genes in the context of these yet-unidentified factors.