IMPORTANCE: Although schizophrenia is associated with several age-related disorders and considerable cognitive impairment, it remains unclear whether the risk of dementia is higher among persons with schizophrenia compared with those without schizophrenia. OBJECTIVE: To determine the risk of dementia among persons with schizophrenia compared with those without schizophrenia in a large nationwide cohort study with up to 18 years of follow-up, taking age and established risk factors for dementia into account. DESIGN, SETTING, AND PARTICIPANTS: This population-based cohort study of more than 2.8 million persons aged 50 years or older used individual data from 6 nationwide registers in Denmark. A total of 20 683 individuals had schizophrenia. Follow-up started on January 1, 1995, and ended on January 1, 2013. Analysis was conducted from January 1, 2015, to April 30, 2015. MAIN OUTCOMES AND MEASURES: Incidence rate ratios (IRRs) and cumulative incidence proportions (CIPs) of dementia for persons with schizophrenia compared with persons without schizophrenia. RESULTS: During 18 years of follow-up, 136 012 individuals, including 944 individuals with a history of schizophrenia, developed dementia. Schizophrenia was associated with a more than 2-fold higher risk of all-cause dementia (IRR, 2.13; 95% CI, 2.00-2.27) after adjusting for age, sex, and calendar period. The estimates (reported as IRR; 95% CI) did not change substantially when adjusting for medical comorbidities, such as cardiovascular diseases and diabetes mellitus (2.01; 1.89-2.15) but decreased slightly when adjusting for substance abuse (1.71; 1.60-1.82). The association between schizophrenia and dementia risk was stable when evaluated in subgroups characterized by demographics and comorbidities, although the IRR was higher among individuals younger than 65 years (3.77; 3.29-4.33), men (2.38; 2.13-2.66), individuals living with a partner (3.16; 2.71-3.69), those without cerebrovascular disease (2.23; 2.08-2.39), and those without substance abuse (1.96; 1.82-2.11). The CIPs (95% CIs) of developing dementia by the age of 65 years were 1.8% (1.5%-2.2%) for persons with schizophrenia and 0.6% (0.6%-0.7%) for persons without schizophrenia. The respective CIPs for persons with and without schizophrenia were 7.4% (6.8%-8.1%) and 5.8% (5.8%-5.9%) by the age of 80 years. CONCLUSIONS AND RELEVANCE: Individuals with schizophrenia, especially those younger than 65 years, had a markedly increased relative risk of dementia that could not be explained by established dementia risk factors.