how is social security determined?

Is it calculated on the 5 highest incomes over your lifetime? Thank you