According to the 2021 Indonesian Nutrition Status Study (SSGI), the incidence of toddler stunting in the nation is 24.4 %, which is a significant public health problem. Stunting is characterized by having a height under standard caused by malnutrition and lack of healthcare before and after a birth which has negative impacts on the toddlers’ physical growth and brain development. This study evaluates how imbalanced data influenced The K-Nearest Neighbors (K-NN) and Naïve Bayes in predicting stunting status. In the imbalanced dataset, K-NN shows high performance with an accuracy of 98.41% and a Macro F1-Score of 89.30%, while Naive Bayes recorded an accuracy of 90.76% and a Macro F1-Score of 70.00%. After applying SMOTE to balance data, K-NN stayed stable with 98.15% accuracy and Macro F1-Score increased to 89.90%. Besides, Naïve Bayes experienced a decline in accuracy to 87.14%, although Macro F1-Score increased to 87.20%. These findings highlight the advantages of deep K-NN handle data imbalance and its stability is better than Naïve Bayes. The increased F1-Score after applying SMOTE reflects improved precision and recall for identifying stunted cases, even though overall accuracy declined. This decline can be attributed to the algorithm’s sensitivity to class distribution because the dataset became more balanced. Collectively, these results underscore the importance of using balanced datasets.