Abstract. Early prediction of type 2 diabetes mellitus is important to facilitate faster and more accurate diagnosis and clinical decision-making. This study aims to compare the performance of the Random Forest and Support Vector Machine (SVM) algorithms in predicting diabetes and to analyze the effect of applying the Synthetic Minority Over-sampling Technique (SMOTE) to imbalanced data. The study used the Bangladesh Diabetes 2025 dataset, following the stages of data selection, preprocessing, data transformation, modeling, and evaluation. The preprocessing stage included median imputation and the removal of duplicate data, while feature standardization was performed after data splitting to prevent data leakage. The dataset was split using an 80:20 ratio with a stratification technique. The study applied two experimental scenarios: one without SMOTE and one with SMOTE applied only to the training data. Model evaluation was conducted using the metrics accuracy, precision, recall, and F1-score based on the test data. The results show that Random Forest outperforms SVM. In the scenario without SMOTE, Random Forest achieved an accuracy of 94.8%, precision of 96.4%, recall of 97.0%, and an F1-score of 96.7%, while SVM achieved an accuracy of 91.5% and an F1-score of 94.6%. After applying SMOTE, Random Forest’s performance improved slightly to an accuracy of 95.3% and an F1-score of 97.0%, while SVM’s performance declined to an accuracy of 90.6% and an F1-score of 93.9%. The results of the study show that Random Forest is the best model for predicting type 2 diabetes mellitus in the dataset used.