Introduction: In recent decades, the possibility of vitamin D deficiency in type 2 diabetes and serum levels of 25-hydroxyvitamin D values has been considered as a predictor for long-term complications of diabetes such as cardiovascular disease. This study was done for Comparison of vitamin D level in diabetic patients and healthy subjects.Methods: In this case-control study, 90 patients with type 2 diabetes as a case group and 90 healthy subjects matched for age and sex, as a control group were studied. After recording demographic data, height, weight, BMI and blood pressure for all patients, serum levels of fasting blood glucose, creatinine, calcium, phosphorus, Alkaline phosphatase and 25 (OH) D were measured in both groups. Data were analyzed using Stata 12 software, x2, t-test and Mann-whitney. Linear Regression used to measure the effect of different variables on the levels of vitamin D.Results: The average age of subjects was 56.47±9.37 years, 72.8% of them were females. In diabetic patients, 82.2% have vitamin D deficiency as compared with 61.1% in healthy subjects. The means of 25 (OH) D level in patients with diabetes and the control group were 20.7±18 and 12.4±6.1 ng per ml, respectively and cosiderd as a significant difference between the two groups (P<0.001). Statistically significant association was not found between blood pressure, creatinine, calcium and vitamin D level (P>0.05). Based on multivariate linear regression, vitamin D level increased more by an average of 7.06 ng per ml in diabetic patients than in healthy people and more in overweight people than those with a normal BMI, the average vitamin D level reduced to 5.4 ng /ml.Conclusion: According to the results, mean levels of 25 (OH) D were significantly lower in diabetic patients than in healthy subjects, hence, check of vitamin D levels and supplementation with this vitamin is recommended in patients with diabetes.