Student engagement plays a crucial role in fostering meaningful mathematics learning in elementary school and is strongly influenced by the classroom’s social environment. However, limited research has examined how classroom social environments predict student engagement in upper elementary mathematics learning and whether this relationship differs by gender. This study aimed to examine the predictive role of the classroom social environment in student engagement in mathematics learning among upper elementary students. A quantitative ex post facto design was employed involving 316 students in Grades IV-VI. Data were collected using validated and reliable Guttman-scale instruments measuring classroom social environment and student engagement in mathematics learning. A normality test with Kolmogorov Smirnov Test indicated that the data were not normally distributed, therefore, nonparametric statistical analyses were applied, including Spearman rank correlation, coefficients of determination, and Mann-Whitney U tests. The results showed a positive and significant relationship between classroom social environment and student engagement in mathematics learning, explaining 24.01% of the variance in engagement, which falls within the moderate category. Female students reported higher perceptions of classroom social environment and engagement, whereas the predictive contribution of the classroom social environment to student engagement in mathematics learning was stronger among male students. Among the dimensions of the classroom social environment, promoting academic interaction emerged as the strongest predictor. These findings highlight the importance of supportive and interactive classroom environments in strengthening engagement in elementary mathematics learning.