Increasing evidence supports reciprocal communication between the enteric and the central nervous system in disease, termed the 'gut-brain axis'. Recent findings suggest a connection between IBD and development of Parkinson's disease. The role of IBD in dementia, another insidious neurodegenerative disorder, has not been explored.Using the Taiwanese National Health Insurance Research Database, we performed comparative analysis of 1742 patients with IBD ≥45 years old against 17 420 controls to assess dementia risk following IBD diagnosis. Controls were matched on bases of sex, access to healthcare, income and dementia-related comorbidities. All individuals were followed for dementia diagnosis for up to 16 years. Subanalyses included the relationship between sex, ulcerative colitis (UC) and Crohn's disease (CD), and dementia risk.Overall incidence of dementia among patients with IBD was significantly elevated (5.5% vs 1.4% among controls). Patients with IBD were diagnosed with dementia at 76.24 years old on average, compared with 83.45 among controls. The HR of developing dementia among patients with IBD was 2.54 (95% CI 1.91 to 3.37). Among dementia types, the risk of developing Alzheimer's dementia demonstrated the greatest increase. Dementia risk did not differ between sex differences nor UC versus CD.This population-based cohort study demonstrates significant association between IBD and subsequent development of dementia. Dementia was diagnosed at an earlier age among patients with IBD, and disease risk appeared to increase with IBD chronicity. These findings highlight the need for future research to elucidate the relationship between IBD and dementia.