This study illuminates the male advantage in test-based admissions to higher education. In contrast to many other countries, admission tests in Germany are optional, and test-free programs are available. This context offers a unique opportunity to investigate whether the male advantage in test-based admissions is caused by gender differences in test performance or in test participation. We use novel register data for the whole population of 300,000 applicants to highly selective and prestigious medical programs in Germany. We find that men perform better in tests and that female applicants are more likely to withdraw from admission tests. Both differences, however, depend on high school grade point average (GPA): The male advantage in test performance emerges only among test-takers with a lower GPA, and female applicants’ stronger test avoidance appears only among women with a medium GPA. Ultimately, both mechanisms contribute to a male advantage in test-based admissions (ceteris paribus of GPA), with better test performance being the major source for male applicants’ higher admission chances. As a consequence, we find the female advantage in school performance and the male advantage in test-based admissions almost neutralize each other.