Objective To investigate the relationship between time in range (TIR) of glucose and diabetic foot. Methods Diabetic patients hospitalized in the Department of Endocrinology, the First Affiliated Hospital of Xi ′an Medical University from June 2017 to October 2021 were enrolled and divided into non-diabetic foot group (NDF group) and diabetic foot group (DF group) according to whether they had diabetic foot. General and biochemical data were collected before admission. All patients received continuous glucose monitoring for 3 days at admission. TIR, time above range (TAR), time below range (TBR), glucose variability coefficient (CV), standard deviation (SD), daytime blood sugar average absolute deviation (MODD) and so on were calculated. Chi-square test, U test and t test were used to compare the two samples. Results A total of 450 diabetic patients were included, of whom 225 were in NDF group and 225 in DF group. Compared with NDF group, patients in DF group had more males, older age, longer course of disease, higher systolic blood pressure, higher white blood cells (WBC), platelets, low density lipoprotein, urea nitrogen, creatinine, prevalence of diabetic nephropathy and coronary heart disease, glycated hemoglobin A1c (HbA1c), TAR (>10 mmol/L), CV, SD and MODD (P<0.05), while body mass index (BMI), hemoglobin, indirect bilirubin, albumin, cholesterol, triglyceride, high density lipoprotein, estimated glomerular filtration rate (eGFR) and TIR were lower (P<0.05). In the corrected model, DF risk was reduced by 13.1% for every 10% increase in TIR. After adjusting for confounding factors such as age, course of disease and HbA1c, TIR was significantly associated with lower grade diabetic foot group [OR (95%CI): 0.985 (0.972-0.999), P=0.035]. With the increase of TIR quartile, the prevalence of diabetic foot decreased gradually. Spearman correlation analysis showed that TIR quartile was negatively correlated with the risk of diabetic foot (r=-0.290, P<0.01), TIR level of diabetic foot patients was positively correlated with systolic blood pressure, and negatively correlated with WBC and HbA1c. Conclusions Among diabetic patients, glycemic variability was higher in diabetic foot patients, TIR was significantly associated with diabetic foot, and TIR quartiles were negatively associated with the risk of diabetic foot disease. [ABSTRACT FROM AUTHOR]