This study aimed to reveal the extent of the importance of affective qualities in explaining students' cognitive performance in mathematics and identify which affective variables (i.e. attitude, anxiety, and motivation) are more effective for success. The participants were 281 primary school students in their fourth year of study. The study was designed following a relational screening model. The data collection tools included achievement test and arithmetic performance tests in order to measure student success in mathematics, and attitude, anxiety, and motivation scales in measuring students' emotions towards mathematics. The results of the structural equation model revealed that attitude positively affected mathematics achievement and there was a negative relationship between attitude towards mathematics and mathematics anxiety. There was also a negative relationship between mathematics anxiety and mathematics achievement. Mathematics anxiety did not have an effect as big as mathematics attitude had on mathematics achievement. It was found that motivation, another affective variable, did not have a significant effect on mathematics achievement. In addition, while gender did not have a significant effect on students' mathematics success, arithmetic performance, mathematics anxiety, or intrinsic motivation; it was found to have a significant effect on attitudes towards mathematics and external motivation. This significant difference was in favour of females. Female students' attitude towards mathematics and extrinsic motivation was higher than male students. Considering that primary school is a period critical for developing affective qualities, then, it is worth to note the importance of creating environments that positively affect primary school students' attitudes and motivation towards mathematics.