Identification of T2D patients in the early stages of the disease and optimizing early treatment is anticipated to lead to improved treatment outcomes and healthcare costs. Machine learning (ML) models trained on routinely collected health data can be used to accurately predict the onset of T2D at the population level. The aim of this registry study is to test and utilize ML-based algorithms to predict T2D progression and its effects of healthcare use, costs and mortality in Finland.