This study analyzes the long-run effects of secondary school track assignment for students at the achievement margin. Theoretically, track assignment maximizes individual outcomes when thresholds between tracks are set at the level of the indifferent student, and any other thresholds would imply that students at or around the margin are better off by switching tracks. We exploit non-linearities in the probability of track assignment across achievement to empirically identify the effect of track assignment on educational attainment and wages of students in the Netherlands, who can be assigned to four different tracks. We find that attending higher tracks leads to increases in years of schooling by around 1.5 years for students at the lowest and the highest choice margin, and wage gains of around 15% and 5%, respectively. For the margin between the two middle tracks, attending the higher of the two tracks has no effect on educational attainment and decreases wages by around 12%. The negative returns for the medium margin and the relatively low returns for the higher margin (compared to the required educational investments) are partly mediated by motivation and study choice.