Patients with inflammatory bowel disease (IBD) are at increased risk of cholangiocarcinoma (CC), but quantitative data are scant. Furthermore, little is known about the impact of IBD on CC occurrence and prognosis. Based on nationwide population-based registries we compared the incidence and survival of CC patients with and without IBD from 1978 to 2003. We used the National Registry of Patients and the Danish Cancer Registry to identify patients with IBD and CC. From the Civil Registration System we identified population controls. We calculated incidence rates, incidence rate ratios (compared with population controls), and absolute cumulative risks. We also computed median survival in CC patients with and without IBD. 2,725 CC patients were identified. The incidence of CC among the 41,280 IBD patients was 7.6 per 100,000 person years compared with 1.9 per 100,000 among the 412,796 population controls (four-fold increased risk). The 10 year cumulative risk of CC in IBD patients was 0.07%. Sub analyses showed that the increased risk of CC was more pronounced in male IBD patients and in patients with ulcerative colitis. We found a decreasing CC incidence in IBD patients over calendar time. CC patients with IBD were, on average, 15 years younger at cancer diagnosis than IBD-free CC patients, and median survival was 1 month in both groups. In conclusion, the absolute risk of CC in IBD patients was low and the CC incidence decreased over calendar time. The prognosis was equally grave, regardless of the presence of IBD.