Demographic trends in most developed economies are characterized by rising longevity and decreasing birthrates. These trends endanger the sustainability of the current public pension systems. Therefore social security reform proposals are on the agenda in many countries. This paper demonstrates that the analysis of fiscal sustainability of social security must include an additional dimension of public policy, namely education funding. Indeed, the productivity growth of future workers, which depends on human capital accumulation, may outweigh the impact of the demographic problem. This fact is true under both pay-as-you-go (PAYG) and fully funded (FF) social security system. We consider an OLG economy where government, in addition to running social security, also funds education of future workers by means of taxes collected from the current ones. The education tax rates are chosen, in each period, by a majoritarian rule among the relevant constituents. We demonstrate that while the FF system results in relatively higher rates of physical capital accumulation, then under some conditions, other things equal, the PAYG social security regime leads to the choice of relatively higher respective levels of education tax rates in all generations, and thereby to higher rates of human capital accumulation.