Abstract. The present research investigates gender gaps in the results of secondary school exit exams (Matura) in mathematics in Poland in 2015. The analysis shows that, in the basic level exam, males are highly overrepresented at the upper end of the score distribution. The same pattern did not exist in the extended-level Matura. Two explanations are offered here. The differences are driven by gender self-selection in high school programs. Students who decide on maths-related tracks have more maths lessons than other students. Secondly, a student who takes the extended Matura also has to take the basic Matura exam. As a result, the population of students taking the basic Matura is highly differentiated in terms of maths competence and motivation. Additionally, the analysis of differential item functioning (DIF) shows that only a few items were flagged as having DIF.Keywords: maths, gender, Poland, Matura, DIF, Mantel-Haenszel.School tests are expected to properly reflect the levels of skills of the students taking them. Students who have the same abilities should have the same chances to give the correct answers to test questions, regardless of sex, skin colour, or social background. However, in reality there are many factors which may potentially interfere with test results. Some of them concern the student, his/her mood, motivation, and pre-examination stress levels, as well as the construction of the test itself. This last includes the choice of questions, their format, or the the effect of teachers through different teachers making differing assessments of the same answers (Pokropek, Jakubowski 2009). The necessity to preserve the high quality of the didactic measurement is especially important in relation to high-stakes teststhat is, those which have a crucial impact on the next stage of education. In the Polish system of education, Matura is such an examination. Its results determine the chances of continuing an education in tertiary institutions, and indirectly influence the future professional career. It is obvious that this will be the case, based on the assumption that Matura results are a good