This retrospective multicenter study of 21,070 elderly patients with T2DM across six Chinese hospitals developed a seven-variable logistic regression model to predict osteoporosis risk. The model achieved an AUROC of 0.713 in the training set and 0.694 in external validation, incorporating age, sex, hypertension, coronary heart disease, cerebral infarction, hyperlipidemia, and surgical history.