The S&P 500 has had an average return of 11.38% over the last 40 years, but like all market indexes it doesn't have a straight line in terms of performance.
Looking back, its worst performing year was in 1931 when returns were negative 47.07% (although it wasn't 500 businesses back then). Its best year was just 2 years later in 1933, when the market returned 46.59%.
If you take from 1957, when it was the S&P 500, the market index's worst year was negative 38.49% in 2009 and its best year was in 1995 when investors gained 34.11%.