We investigate gender discrimination in a nationally-representative sample of German firms using a factorial survey design. Short CVs of fictitious applicants for apprenticeship positions are presented to human resource managers who are asked to evaluate the applicants. Women are evaluated worse than men on average, controlling for all attributes of the CV. This measure of discrimination is robust to differences in the variance of unobservable productivity characteristics (“Heckman critique”). Discrimination against women varies across industries and occupations. Controlling for all occupation- and firm-related variables that we observe, only the share of women in an occupation correlates with discrimination.