Knowledge of the absolute and relative risk of venous thromboembolism (VTE) in and around pregnancy would be crucial in identifying when to commence and cease thromboprophylaxis in women who would benefit from such intervention. We addressed this hypothesis using a large prospective primary care database from the United Kingdom, containing details on 972 683 women aged 15–44 years between 1987 and 2004. Risks of a first VTE during antepartum, postpartum and outside of pregnancy were compared using Poisson regression. The rate of VTE during the third trimester antepartum was six times higher than time outside pregnancy [Incidence Rate Ratio (IRR) = 6·1; 95% confidence interval, 4·7–7·9]. In contrast, both the first (IRR = 1·6) and second (IRR = 2·1) trimesters conferred little increase in risk. The first 6 weeks postpartum was associated with a 22-fold increase in risk, with the peak occurring in the first 3 weeks. Increased age was found to be associated with VTE during postpartum and outside of pregnancy, but not during antepartum. Our findings of a notably raised risk of VTE persisting for 3 weeks postpartum and of a raised antepartum risk constrained to the third trimester have implications for modifying the current recommendations for VTE prophylaxis in pregnancy and the puerperium.