Using a dynamic labor supply model and linked employer-employee data, I find evidence of substantial search frictions, with females facing a higher level of frictions than males. However, the majority of the gender gap in labor supply elasticities is driven by across firm sorting rather than within firm differences, a feature predicted in the search theory literature, but which has not been previously documented. The gender differential in supply elasticities leads to 3.3% lower earnings for women. Roughly 60% of the elasticity differential can be explained by marriage and children penalties faced by women but not men.