Background: Vitamin D is involved in the regulation of calcium levels, insulin secretion, and insulin action. Diabetes is a noncommunicable condition that results in insulin insufficiency and insulin resistance in the body. The question in this case was whether or not vitamin D levels were associated with type 2 diabetes. Aim To determine if vitamin D has an effect on HbA1c levels in people with Type 2 diabetes. Methods: In tertiary care, a three-month retrospective investigation was conducted. We looked at FBS, PPBS, HbA1c, and Vitamin D. FBS was the most common. The data were analysed with the help of SPSS version 23. Results: In the study, 65 percent of the 52 patients had vitamin D deficiency, while 26 percent had insufficient vitamin D levels. HbA1c values were higher than 6.5 percent in 77 percent of patients, whereas levels were lower than 6.5 percent in 23 percent of patients. The blood sugar level HbA1c and vitamin D revealed a negative connection. Conclusion: Clearly, vitamin D levels and HbA1c levels are inversely related.