We estimate a substantial female grade gain when being graded anonymously compared to male students in 101 -macroeconomics courses. Females graded anonymously are more likely to continue with economics studies. This suggests that biased grading is a direct cause of the "leaky pipeline " phenomenon in economics. As male graders are the majority, we complement our analysis and evaluate the importance of same-sex bias using random assign-ment of graders. Although, we estimate a substantial same-sex bias before anonymous exams were introduced, it cannot explain the overall effect of grading bias. Thus, same-sex bias is not the mechanism explaining the overall effect of grading bias.