This dissertation studies inequality in education settings and labor markets. The first chapter studies the effects of teachers' stereotypical assessments of boys and girls on students' long-term outcomes, including high school graduation, college attendance, and formal sector employment. This analysis provides evidence that teachers' gender stereotypes are reflected in student evaluations: math teachers with stronger stereotypes associating boys with scientific disciplines award male students with higher test scores compared to blindly-graded test scores. Using graduation, college enrollment, and matched employer-employee data on 1.7 million public high school students expected to graduate between 2015 and 2019, I find that female students who are placed with teachers who use more stereotypical grading practices are less likely to graduate from high school and apply to college than male students. In comparison to their male counterparts, female high school graduates whose teachers employ more stereotypical grading practices are less likely to be employed in the formal sector and have fewer paid working hours. Furthermore, exposure to teachers with stereotypical grading practices reduces women's monthly earnings, widening the gender pay gap. The second chapter provides a conceptual framework for the mechanisms by which gender stereotypes affect human capital investment decisions. Lastly, the third chapter investigates the extent to which racial preferences in labor demand practices before the Civil Rights Act of 1964 reinforced occupational sorting or exclusion of black employees across occupations. Using a newly constructed dataset representing the historical evolution of labor demand in the United States between 1900 and 2009, I evaluate whether explicit racial preferences in employment practices have contributed to occupational sorting and exclusion. My results dissect racial preferences in job postings in the 19th century in the U.S., identifying two critical periods where the demand for black workers increased as measured by the job ads with racial references to African Americans: during the interwar period and WWII. In addition, my research indicates that fields such as "Business and Financial Operations," or "Office and Administrative Support," have historically had the lowest demand for black workers.