This study aims to apply the K-Means algorithm to cluster students based on their mathematics grades at Madrasah Tsanawiyah Islamiyyah Yami Waled. By categorizing students into clusters of low, medium, and high academic achievement, the institution can develop more effective and targeted learning strategies. The data consisted of semester mathematics grades from 112 students, analyzed using the K-Means clustering algorithm. Clusters were evaluated using the Davies-Bouldin Index (DBI), with results showing three distinct clusters: Cluster 0 (low achievers, 54 students), Cluster 1 (medium achievers, 37 students), and Cluster 2 (high achievers, 21 students). The DBI score of 0.893 indicates good clustering quality, providing valuable insights for personalized learning approaches.