The contribution of this paper is twofold. First, it builds and makes use of long-run data from Sweden on formal education that have never been used to date. Second, it provides a quantitative application of recent theoretical work on the link between demographic changes and economic growth through their effect on education. It concludes that changes in longevity may account for as much as 20% of the observed rise in education over the period from 1800-2000 via a horizon effect, but have little impact on income growth over the period. On the contrary, changes in population density and composition are central, mainly thanks to their effect on productivity. Most income growth over this period would not have materialized if demographic variables had stayed constant since 1800.