Abstract− Coronary heart disease (CHD) is one of the leading causes of death in Indonesia, with an increasing incidence rate, thereby requiring early, rapid, and accurate risk detection to improve patients’ quality of life. CHD was selected in this study because it involves various measurable risk factors derived from clinical data, such as blood pressure, cholesterol levels, blood glucose levels, alcohol consumption, and patients’ medical history, making it relevant for analysis using a machine learning–based approach. This study aims to analyze and compare the performance of the Random Forest and Support Vector Machine (SVM) algorithms in classifying the risk of coronary heart disease based on a dataset consisting of 1,000 patient records with 16 clinical attributes and two target classes, namely high-risk and low-risk. The research stages include data exploration, preprocessing, class balancing using the Synthetic Minority Over-sampling Technique (SMOTE), train-test data splitting, model training, and hyperparameter optimization using GridSearchCV. Model performance was evaluated using Accuracy, Precision, Recall, F1-Score, and ROC-AUC metrics. The results indicate that the Random Forest model achieved the best performance with 99% Accuracy, 100% Precision, 99% Recall, 99% F1-Score, and 100% ROC-AUC after the implementation of SMOTE and hyperparameter tuning, while the SVM model achieved 95% Accuracy, 95% Precision, 91% Recall, 93% F1-Score, and 99% ROC-AUC. Therefore, it can be concluded that the Random Forest algorithm demonstrates more optimal and stable performance in classifying coronary heart disease risk within the dataset used