Stunting in toddlers is a chronic nutritional problem that can impede physical growth and cognitive development; therefore, early detection is crucial to prevent long-term impacts. This study compared Random Forest and Gradient Boosting algorithms for classifying stunting risks in toddlers. The comparison of both algorithms was conducted to determine the model with better performance in classifying stunting status into four categories: severely stunted, stunted, normal, and tall. Testing was performed using the Percentage Split method (80% training data and 20% testing data) and 10-Fold Cross Validation. Model performance was measured based on accuracy, precision, and recall metrics. The results showed that the Random Forest algorithm produced better and more consistent performance compared to Gradient Boosting across both testing methods. In the Percentage Split method, Random Forest achieved an accuracy of 95.43%, meaning the model was able to accurately predict stunting status in a single test data split, whereas Gradient Boosting only achieved 85.68%, indicating a higher prediction error rate. In the 10-Fold Cross Validation method, Random Forest maintained an accuracy of 94.89%, meaning the model remained consistent despite being repeatedly tested using varied data subsets, while Gradient Boosting decreased to 77.47%, indicating that the model was unstable and sensitive to data variations. Additionally, Random Forest demonstrated stable precision and recall values above 90% across all stunting categories, particularly for the normal and tall categories. In conclusion, the Random Forest algorithm is more effective in classifying stunting risks in toddlers than the Gradient Boosting algorithm.