Average Indexed Monthly Earnings (AIME): The SSA calculates your AIME by adjusting your highest 35 years of earnings for inflation.
Impact of Zero-Income Years: If you have less than 35 years of earnings, the SSA will add zeros to your record to reach the 35-year total.
If You Have More Than 35 Years of Earnings: Only your highest 35 years of earnings are considered. If you have more than 35 years of earnings
Late Career Earnings: If you continue to work into your 60s or later and earn more than in previous years, these years can replace lower-earning or zero-income years in your top 35, potentially increasing your benefit amount.
Early Retirement and Zeros: If you retire early and stop earning before you have 35 years of work history, you'll have more zeros factored into your benefit calculation
Delayed Retirement Credits: Conversely, delaying retirement beyond your full retirement age can increase your benefits, offsetting some of the impact of zero-income years.
In summary, years with zero income do affect Social Security payments if they are included in your highest 35 years of earnings.