Quality-of-life measurement is used to assess the overall condition of the patient, giving more insight into complex medical problems in terms of physical, mental, and social health. It enables planning and organizing care and provides a holistic approach to the healing process. The aim of this study was to assess the quality of life (QoL) of hospitalized patients with type 2 diabetes (T2D) and diabetic outpatient clinic patients and to identify factors affecting quality of life of patients in the studied groups. The study included 226 patients with T2D, 100 diabetic outpatient clinic patients and 126 hospitalized patients. Quality of life was measured using the Quality of Life Index. We observed that the QoL of hospitalized patients is connected with education [p=0.01 (β=1.0; 95 % confidence interval (CI) 0.32-1.74), R 2 =0.12 (95 % CI 0.10-0.34)]. However, the QoL of patients under the care of the diabetic outpatient clinic is affected by age [p=0.02 (β= 0.07; 95 % CI 0.01-0.13)], diabetic retinopathy [p=0.00 (β=−1.8; 95 % CI −2.87 to −0.72)], ischemic heart disease [p=0.04 (β=−1.6; 95 % CI −3.16 to −0.11)], and education [p=0.00 (β=1.6; 95 % CI 1.11-2.12), R 2 =0.40 (95 % CI 0.37-0.63)]. Differences in QoL between the two groups relate to the sociological, psychological, and family life aspects. Education level greatly determines QoL of patients with T2D treated at hospital and outpatient clinic.