Advances in molecular methods and the ability to share large population-based datasets are uncovering heterogeneity within diabetes types, and some commonalities between types. Within type 1 diabetes, endotypes have been discovered based on demographic (e.g. age at diagnosis, race/ethnicity), genetic, immunological, histopathological, metabolic and/or clinical course characteristics, with implications for disease prediction, prevention, diagnosis and treatment. In type 2 diabetes, the relative contributions of insulin resistance and beta cell dysfunction are heterogeneous and relate to demographics, genetics and clinical characteristics, with substantial interaction from environmental exposures. Investigators have proposed approaches that vary from simple to complex in combining these data to identify type 2 diabetes clusters relevant to prognosis and treatment. Advances in pharmacogenetics and pharmacodynamics are also improving treatment. Monogenic diabetes is a prime example of how understanding heterogeneity within diabetes types can lead to precision medicine, since phenotype and treatment are affected by which gene is mutated. Heterogeneity also blurs the classic distinctions between diabetes types, and has led to the definition of additional categories, such as latent autoimmune diabetes in adults, type 1.5 diabetes and ketosis-prone diabetes. Furthermore, monogenic diabetes shares many features with type 1 and type 2 diabetes, which make diagnosis difficult. These challenges to the current classification framework in adult and paediatric diabetes require new approaches. The 'palette model' and the 'threshold hypothesis' can be combined to help explain the heterogeneity within and between diabetes types. Leveraging such approaches for therapeutic benefit will be an important next step for precision medicine in diabetes.