Background: Some studies have suggested a lower incidence of cancer in patients with dementia. We studied this further for 18 cancer types in population-based registers. Methods: In 19,756 cases and in 147,324 age- and sex-matched controls a diagnosis of dementia was studied 9–45 months prior to the diagnosis of cancer. Results: Overall a diagnosis of dementia was significantly less common among the cancer cases (risk ratio, RR = 0.60; 95% CI = 0.52–0.69). Conclusion: The study confirms previous findings that patients with dementia have a lower risk of cancer. Because the effect was seen for all tumour types and especially for patients older than 70 years and since the deficit was more pronounced for patients with tumours situated within the body, the data suggest that malignancies are underdiagnosed for persons with dementia.