Millennials, or those born between 1982 and the early 2000s, don't have a lot going for them. They're buried in student debt. A lot of them are unemployed. Raises have been unheard of and job security is a dream.

But one thing millennials have going for them is time.

Most millennials aren't going to retire for another 30 years, at a minimum. Some have half a century or more ahead of them to save. The muscle that compound interest has over these periods is staggering.

So this finding, from a recent Wells Fargo survey, made me cringe: "Half of millennials (49%) say they are confident in their own abilities to earn and save money for their financial future, and more than a quarter (27%) say 'time is on my side for my savings/investments to grow.'"

Only 27% say time is on their side? Even though about half say they'll be able to save for their future?

That's astounding.

Earlier this year, Standard Life asked a group of retirees what their biggest financial regrets were. The No. 1 complaint: "I wish I had saved for retirement earlier."

I won't bore you with statistics on how much you'll benefit from beginning to save in your 20s instead of your 30s. It's huge, and I think most people know it. They get the math.

What I think most millennials are skeptical of is the idea that they'll earn a decent rate of return on their investments. After all, compounding doesn't work if you aren't earning anything. And the last decade has crushed people's return expectations. As economist Russ Roberts put it to me, it's hard to teach your kids about compound interest when they earn half a cent a year on their savings account.

Sure enough, Wells reports: "More than half of millennials (52%) say they are 'not very confident' or 'not at all confident' in the stock market as a place to invest for retirement."

But you know exactly what's going on here: Millennials are taking the performance of the stock market over the last decade and extrapolating it over the next three, four, or five decades.

Which is as irrational as it is predictable. I dug into the historical data to see how the S&P 500 (^GSPC -1.07%) has performed over every 25-year period from 1900 to 1987. Measured on a monthly basis, there are 1,053 of these periods. Here's what I found:

  • The worst return over all 25-year periods is a gain of 153%.
  • The average (mean) return over all 25-year periods is gain of 1,240%.
  • The median return over all 25-year periods is a gain of 959%.

The worst you did was more than double your money. And this period includes the Great Depression, two world wars, and the interest rate spike of the 1970s.

The fact that we put so much focus on short-term volatility in a market where long-term returns have been so astounding is a giant disservice to investors -- especially to those who have time on their side.