It's hard to beat the market. There are people who manage the feat, but they're a tiny minority. 

Interestingly, and maybe not surprisingly, it's easier to beat the market when the market tanks. So in 2021, when the market gained 29%, 85% of money managers underperformed the index. In 2022, when the S&P 500 lost 18%, only 51% of money managers underperformed. And if that seems like success, remember that it's still more than half!

If that still sounds impressive, consider that the market gains annually far more frequently than it loses. That means that overall, the market is much more likely to outperform any actively managed funds.

If you can't beat them, join them

Even Warren Buffett, one of the tiny few who have done it, advises most people to invest in an index fund that mirrors the S&P 500. Over time, it has been one of the most powerful vehicles for creating wealth. It's also less stressful than picking out what you hope will be winners. Buffett has said that he's advised his wife to invest all her money in the S&P 500 after his death.

It's simple to calculate how much money you'd have today if you did just that 20 years ago with $10,000. 

^SPX Chart

^SPX data by YCharts

The total would be more than $65,000, which implies a return of 555%. This includes all dividends, by the way. You'd make this much without worrying about which stocks are going which way or whether to pull from one and add to another.

Of course, you can invest this way in addition to owning a portfolio of single stocks, just like Buffett's Berkshire Hathaway (BRK.A -0.76%) (BRK.B -0.69%). A diversified group of about 25 stocks chosen with care, plus or including an investment in an index fund, provides excellent chances of creating a healthy and market-beating stock portfolio. 

But if all you did was invest in the market through an index fund, you'd be just fine.

Don't discount monthly contributions

Here's where it gets even better. If you had made monthly contributions over that time, you'd have made much more money. Over the past 20 years, the index has gained a total average annual return of around 10%. If you initially invested $10,000 and added $100 per month, you'd have $136,000 today.

$10,000 invested over 20 years.

Image source: Investor.gov.

For those who did the math, yes, you added $24,000 over those 20 years. But since they haven't been invested for the full 20 years, they haven't borne the full fruit of compound interest -- yet. 

Why it makes sense to invest in the market

One of Warren Buffett's recurring themes when he talks to shareholders is his confidence in America. And investing in the stock market demonstrates confidence in the potential of the U.S. and its businesses. 

There will always be events that affect the market in the short term, whether for good or for bad. They're almost never predictable. Consider the COVID-19 pandemic, practically the epitome of a black swan event, or an event that you cannot predict. Investing in the market gives you the power of the long-term story that America brings to the table, and to your wallet.

Living through this period of severe inflation might hammer this home. There have been worse times, even periods of hyperinflation. Those are rare, and they may not come to pass again in your lifetime. But having funds in an S&P 500 index fund provides security despite any challenges in the environment, and it still offers incredible long-term gains.