They are...
Retirement benefits are calculated using a workers highest 35 years earnings. If the worker has an earnings record of more than 35 years, years with the lowest earnings are dropped. Only those earnings that the worker paid Social Security taxes on are counted. Thus, if the worker earned $100,000 in 2001, that years income would be counted as $80,400 for determining benefits, since the worker only paid Social Security taxes on that lower amount.
Earnings for previous years are indexed so that all years are measured by the same ability to purchase goods and services. This indexing increases past earnings to account for both inflation and increases in average wage growth. (See below for how past earnings are indexed.) For instance, if it would take $11.48 in 2002 dollars to equal $1.00 earned in 1951, and $1.53 to equal $1.00 earned in 1990.
Once all 35 years earnings records are indexed to the same standard, they are added together and divided by 420 (the number of months in 35 years). The result is the Average Indexed Monthly Earnings (AIME), and is used to calculate Social Security benefits. --
Determining Average Indexed Monthly Earnings (AIME)