Inflammatory bowel diseases (IBD) often present in adolescence or early adulthood and is thus frequently diagnosed in men and women in their reproductive age. Previous population-based studies of fertility in patients with IBD are scarce.From the Swedish National Patient Register (NPR) all patients diagnosed with IBD of fertile age between 1964-2014 were identified. Statistics Sweden identified a matched reference cohort (ratio 1:5) from the general population matched for sex, age and place of birth. Children born were identified through the Medical Birth Register and the Swedish Multigeneration Register. For subgroup analyses information about medication was collected through Medical Drug Register and information about socioeconomic status from Longitudinal Integrated Database for Health Insurance and Labour Market Studies. From the SWedish Inflammatory Bowel disease quality REGister (SWIBREG) a cohort of women with UC who underwent colectomy 2000-2020 was identified.Demographic data from SWIBREG and information from a study specific questionnaire regarding reproductive history and voluntary childlessness were analysed.From the NPR 27,331 women and 29,104 men with IBD were identified, corresponding to 272,793 matched individuals.The fertility rate in women with IBD was 1.52 (standard deviation [SD] 1.22) births per 1000 person-years, compared with 1.62 (SD 1.28) (p <0.001) in the matched reference cohort. Fertility was negatively affected mainly in women with Crohn's disease (CD) and IBD-unclassified (IBD-U) and to a lesser extent in ulcerative colitis (UC). Disease activity, bowel resections and, in the case of CD, also perianal disease further adversely affected fertility. For women with UC and IBD-U, but not for women with CD, fertility improved throughout the study period. Contraceptive use was higher in female IBD patients, both before and after the diagnosis.In total 2,989 women underwent colectomy during the study period. Reconstruction with ileal pouch anal anastomosis (IPAA) and ileorectal anastomosis (IRA) was used to about the same extent in UC and IBD-U, although this was rare in CD. Compared with the matched reference cohort, women with IBD had lower fertility overall after colectomy (HR 0.65, CI 0.61-0.69), with least impact for operations that left the rectum intact (HR 0.79, CI 0.70-0.90). When the comparison was made within the group of ABSTRACT 2 patients undergoing colectomy, fertility in female patients remained nearly unaffected after IRA in all subtypes of IBD, but was impaired after IPAA, especially in UC (HR 0.67 CI 0.50-0.88), and after completion proctectomy in all subtypes of IBD (CD 0.61 CI 0.38-0.96), UC HR 0.65, CI 0.49-0.85 and IBD-U0.68, 0.55-0.85).The survey regarding reproductive behavior after colectomy was completed by 214 (73%) out of 294 eligible women identified in SWIBREG. The desire to have children was negatively affected by disease onset in 59% of the women, colectomy in 44% and by reconstruction in 37%. Altogether, 39% women with UC estimated that they chose to have fe...