In this paper I study the impact of increasing longevity on pay-as-you-go pension systems. First, I show that increasing longevity increases the internal rate of return. The size of the effect differs for different policy regimes. It is higher for the case where the retirement age is increased to keep the system in balance than for the case where the necessary adjustment is achieved by reducing pension benefits. Second, I study optimally chosen retirement decisions and I show that the socially optimal policy involves a shorter working life than the private optimum. The social optimum can be implemented by the use of a PAYG system that combines an actuarial and a flat pension.