Abstract Objectives This study aimed to evaluate the calcium/magnesium (Ca/Mg) ratio in patients diagnosed with type 2 diabetes mellitus (T2DM). Methods This study is a retrospective cross-sectional study. Mg levels were determined by measuring the total serum Mg levels. Magnesium was measured by colorimetric method and HbA 1c was measured by turbidimetric inhibition immunoassay method. Subject were divided into two groups (<7 % and ≥7 %) based on HbA 1c levels. Also, subjects were divided into four groups (quartiles) based on serum Mg concentrations. Results A total of 891 (636F, 255M) patients diagnosed with T2DM were included in the study. The Mg increase in the group with good glycemic control was also remarkable. One of our most important findings is that as the Mg concentration increases, the fasting glucose, HbA 1c , and Ca/Mg rate decreased with increasing Mg concentration. In the ROC analysis performed between the poor and good glycemic control groups, we found the AUC was 0.672, 0.650, 0.611, and 0.578 for Ca/Mg ratio, Mg, K, and Ca, respectively. Conclusions While the Ca/Mg ratio and Ca levels were significantly higher, Mg levels were significantly lower among poor glycemic control than good glycemic control T2DM. The Ca/mg ratio and Mg are important parameters for T2DM patients, but more comprehensive studies are needed before they can monitor glycemic control.