Labor informality accounts for nearly 40% of the labor force in Latin America. While a more traditional view sees this phenomenon as a consequence of barriers to mobility resulting from poorly designed labor regulations, recent work provides evidence that individuals choose informal jobs based on their comparative advantage. In this paper, I develop a dynamic life-cycle model estimated with rich Chilean longitudinal data, in which individuals jointly decide on their schooling and labor participation, to investigate the extent to which comparative advantage drives participation in informal labor markets. I find that human capital accumulation and preferences for job amenities explain up to 72% of transitions between the informal and the formal sector while labor market segmentation accounts for 28%. These barriers to mobility are decreasing in education. These results are largely driven by heterogeneous preferences and returns to skills across sectors. For example, more educated individuals assign a higher relative importance to non-wage benefits, particularly in formal jobs, while less educated individuals value more monetary rewards; high ability workers are more productive in the formal sector, while low ability workers are more productive in the informal sector; and unlike labor market experience acquired in informal activities, experience acquired in formal jobs is transferable across sectors. Finally, using the model to simulate the effects of a 20% wage subsidy in formal jobs for young workers, I find that individuals react to labor market expectations and their decisions are persistent. The subsidy would decrease the incentives to informality for both targeted groups and younger workers, while the reduction in informality rates as a consequence of the policy would remain persistent for all the life-cycle.