PurposeThe study aims to estimate wage models controlled for sample selection bias and apply the traditional Blinder–Oaxaca decomposition to examine the gender wage gap.Design/methodology/approachThis research provides new evidence concerning the drivers of the gender pay gap for highly educated workers in Spain.FindingsThe results show the existence of empirical evidence about the presence of the gender wage gap among tertiary-educated workers. An interesting conclusion is that holding a master’s degree has a positive impact since it diminishes the unexplained component of the gender pay gap.Research limitations/implicationsThe survey used only analyses the labour insertion of tertiary-educated workers and its temporal scope does not allow us to examine the evolution of the gender wage gap throughout their careers.Social implicationsThe findings indicate that there is room for the implementation of policies aimed at diminishing gender inequality in the labour market even for highly educated workers, which could complement the current Spanish labour legislation regulating the gender pay gap in firms.Originality/valueThis paper bridges two bodies of the economic literature: human capital returns and the gender wage gap. The data used represent a contribution to the economic literature.