ABSTRACT The persistent ‘mad professor’ stereotype – the perception of professors as typically old, dishevelled men with grey hair – contributes to the lack of diversity in the academic workforce, with important implications for social justice and the advancement of science. This study examined the research question of how an informal classroom visit by a male versus a female professor influences gender bias and mad professor stereotyping among upper primary school students. To investigate this question, a survey was conducted with 171 upper elementary school children, examining their gender bias and mad professor stereotyping both before and after a classroom visit from either a male or female professor. The results revealed that visits by female professors significantly reduced gender bias, while visits from male professors, conversely, heightened it. However, this bias-reinforcing effect of male visits was mitigated through supplementary activities that introduced the children to professors from diverse genders and backgrounds. Importantly, visits from both male and female professors were effective in diminishing mad professor stereotyping. This study not only highlights the critical role of a professor’s gender in shaping children’s perceptions but also introduces a novel pictorial choice task for measuring bias, offering an objective alternative to the traditional Draw-a-Scientist test.