Type 2 diabetes is associated with dementia, and also with more slight cognitive decrements. In this Review we discuss trajectories from normal cognition to dementia in people with type 2 diabetes, and explore opportunities for treatment. Slight diabetes-associated cognitive decrements and dementia affect different age groups and show a different evolution. These cognitive entities should therefore not be regarded as a continuum, although their effects might be additive. Vascular damage is a key underlying process in both entities. Glucose-mediated processes and other metabolic disturbances might also have a role. No treatment has been established, but management of vascular risk factors and optimisation of glycaemic control could have therapeutic benefit. We identify possible opportunities for intervention to improve cognitive outcomes in people with type 2 diabetes, and suggest how treatment can be tailored to individual risk profiles and comorbidities.