This study uses German social security records to provide novel evidence about the heterogeneity in life expectancy by lifetime earnings and, additionally, documents the distributional implications of this earnings-related heterogeneity. We find a strong association between lifetime earnings and life expectancy at age 65 and show that the longevity gap is increasing across cohorts. For West German men born 1926–28, the longevity gap between top and bottom decile amounts to about 4 years (about 30%). This gap increases to 7 years (almost 50%) for cohorts 1947–49. We extend our analysis to the household context and show that lifetime earnings are also related to the life expectancy of the spouse. The heterogeneity in life expectancy has sizable and relevant distributional consequences for the pension system: when accounting for heterogeneous life expectancy, we find that the German pension system is regressive despite a strong contributory link. We show that the internal rate of return of the pension system increases with lifetime earnings. Finally, we document an increase of the regressive structure across cohorts, which is consistent with the increasing longevity gap.