It has been argued that a close relationship exists between human capital accumulation and wage dispersion. In this paper we build a general equilibrium OLG model of labor earnings and endogenous human capital (HC) accumulation, allowing for agents' heterogeneity in both ability and uninsurable idiosyncratic shocks, and verify that a specification consistent with recent changes in wage inequality observed in UK and US can also reproduce trends in education enrolment. We use macro- and micro-level data to estimate the parameters of a production function with three different kinds of human capital. A by-product of our estimation technique is an approximate empirical density of individual abilities over the working population. We use these estimates to simulate the model numerically and assess the effects of alternative education policies on inequality, productivity and HC accumulation. We also present general results on non concave value functions and discuss uniqueness and continuity of individual optimal policies when choice sets are non-convex.