Today, the most pressing challenges for public economics are of macroeconomic nature: pensions, debt, income distribution, and fiscal sustainability. All these problems are compounded by the phenomenon of demographic transition and aging. This graduate textbook addresses these issues with the help of state-of-the-art macroeconomic tools that are based on a sound microfoundation and rooted in empirical evidence. Different from the standard partial-equilibrium analysis in traditional textbooks on public economics, the concept of general equilibrium helps to account for compensating or amplifying side-effects of economic policy.GAUSS and MATLAB computer code as well as teaching material (slides) are available as downloads from the author's homepage.