Numerical ability is a critical aspect of education that impacts both academic achievement and the development of logical thinking skills. However, in Islamic boarding schools (pondok pesantren), the teaching of mathematics often encounters limitations such as a lack of technological integration and diverse learning resources. This study aims to assess students' numerical intelligence levels based on their mathematics learning activities using machine learning techniques, specifically Decision Tree and Random Forest algorithms. Data was collected through questionnaires that captured key variables such as study duration, frequency of practice, learning methods, class engagement, and the speed of problem-solving. After data preprocessing, both models were evaluated through confusion matrices and cross-validation to determine their classification accuracy and stability. The findings revealed that the Decision Tree model achieved an accuracy rate of 86%, while the Random Forest model surpassed it with a 92% accuracy rate, showing more consistent performance. This study highlights the potential of machine learning to enhance educational outcomes, particularly in pesantren settings, by offering deeper insights into students' learning patterns. Beyond classification accuracy, machine learning helps educators identify key factors influencing students' numerical intelligence. The Random Forest model, in particular, revealed that variables such as practice frequency and student engagement are significant predictors of numerical intelligence levels. This information can be used to develop more personalized and effective teaching strategies aimed at improving students' mathematical skills.