ABSTRACT Educational disparity in math performance remains a persistent challenge. With the development of AI, there is growing attention on educational data mining. This study applies explainable machine learning to uncover the complex factors contributing to the math performance gap between secondary‐school boys and girls. Data from the Program for International Student Assessment, covering Hong Kong, Macao, Taipei, Singapore, Japan, and Korea (17,566 males and 16,929 females), underwent rigorous preprocessing and feature selection. Prediction models for boys and girls were constructed and optimized separately. The Shapley Additive Explanations method was used to explain the models and reveal key influences. Boys’ performance is mainly influenced by expected career status, math anxiety, and the number of math teachers. For girls, key factors are math self‐efficacy, family economic, social, and cultural status, and competency grouping in math lessons. This comprehensive analysis explores student, family, and school factors affecting math performance and advances the application of explainable machine learning in educational data mining.