All of this is correct, but the standard S&P 500 index doesn't include dividends, so your typical index fund will (should) do 1-4% better each year than the S&P 500. The S&P 500 does have a lesser-known version that includes the total returns:
https://www.google.com/finance?q=INDEXSP%3ASP500TR&ei=WWJNWK...