To level the playing field, an inflation adjustment, or indexing factor, is applied to each year's earnings.
How AIME is calculated
The SSA publishes a list of indexing factors, and there is a separate list for each year of eligibility. When calculating your Social Security benefit, the list of indexing factors from the year in which you first became eligible for Social Security (when you turned 62) is used -- regardless of when you actually choose to start receiving Social Security payments.
For example, if you turned 62 in 2018 but don't start collecting Social Security until you turn 70 in 2026, you would use the indexing factors and benefit formula for the 2018 year of eligibility.
The appropriate indexing factors for your year of eligibility are then applied to each year of your earnings. After everything is indexed for inflation, the 35 highest-earning years are averaged together and then divided by 12 to produce the AIME.