Background. In modern medicine, modeling of pathological processes is actively implementing in clinical endocrinology and ophthalmology. This process provides an opportunity to predict the risk of occurrence, course, prognosis and development of complications of type 2 diabetes mellitus (T2DM), in particular diabetic retinopathy (DR). Nowadays, special attention is paid to the course of DR against the background of vitamin D deficiency. But in the scientific literature, there are no mathematical models for assessing the risk of DM progression in patients with type 2 diabetes against the background of vitamin D deficiency. Aim of the study is to develop an adequate mathematical model for assessing the prognostic significance of 25(OH)D deficiency in the progression of diabetic retinopathy in patients with type 2 diabetes. Materials and methods. An open observational single-center one-stage selective study was conducted. It was approved by the Local Ethics Committee. Seventy-one patients (138 eyes) with T2DM and DR (men and women; mean age 61.9 ± 2.4 years; mean HbA1c 8.12 ± 0.91 %) were divided into 3 groups, based on the stage of DR (according to fundus instrumental examination). The inclusion of patients in groups with DR was carried out in accordance with the ETDRS protocol (2019). Statistical processing included ANOVA, MANOVA and regression analysis with the construction of logistic regression models. Results. A statistically significant (p < 0.001) decrease in the risk of a high degree of DR was found with an increasing concentration of 25(OH)D in the blood plasma for each 1 ng/ml (odds ratio = 0.46 (0.32–0.67)). The pseudocorrelation index (Nagelkerke) R2 is 0.54, area under a receiver operating characteristic curve is 0.92 (95% confidence interval (CI) 0.85–0.97), which indicates the presence of a strong relationship between the risk of a high degree of DR and the concentration of 25(OH)D in the blood, gender and HbA1c level. The obtained multifactorial model was represented by the appropriate mathematical formula. The sensitivity (according to the Youden index) of the obtained logistic regression model is 84.4 % (95% CI 73.1–92.2), specificity is 92.3% (95% CI 74.9–99.1). Conclusions. An adequate mathematical model of logistic regression was developed to assess the prognostic significance of total vitamin D deficiency in the progression of DR in patients with T2DM. Its prognostic significance is 96.4 % (95% CI 87.7–99.0).