The Minimum Mastery Criteria (KKM) is a standard used to assess students’ competency achievement in elementary schools in Indonesia and serves as an important indicator of learning success. However, many students still have difficulties meeting this standard, thus requiring a data-driven early detection strategy to support timely intervention. This study aims to develop a prediction model for students’ KKM achievement based on internal and external factors using a supervised machine learning approach. Internal data include report card scores and attendance, while external data are obtained from student responses and parental information covering environmental, economic, motivational, and family support aspects. Four machine learning algorithms were evaluated, namely Naïve Bayes, K-Nearest Neighbor (KNN), Support Vector Machine (SVM), and Neural Network, using a confusion matrix. Experiments were conducted under four data preprocessing scenarios: reverse scoring, feature selection, normalization, and variable grouping. The best result was obtained in Scenario S3, which combines normalization and feature selection, using the SVM algorithm with 100% accuracy. However, to avoid potential overfitting, a more stable algorithm is recommended, namely Naïve Bayes, which achieved 93% accuracy. These results indicate that the application of machine learning with appropriate preprocessing is effective for identifying students at risk of not achieving the KKM.