We are often told that most people can't beat the market. And the corollary to that is that we should all buy index funds. An index fund is safer, because with an index fund you are diversified and you've minimized your risks. But there's a downside to index funds as well. The more stocks you own (and an index fund represents an investment in many, many stocks), the worse your overall returns will be. That's because an index fund is, by definition, a mediocrity. With an index fund you own the good, the pretty good, the average, the below average, and the awful.

Can you beat an index fund? A great way to find out is to play Motley Fool CAPS. In this stock-picking game, you pick the stocks that you think will "beat the market." And the software tracks your stock picks versus the S&P 500 index. I've been playing CAPS for many years, and it's given me confidence that my stock picks will indeed beat the market over time. Here's why individuals who pick stocks can and do outperform the market.

Money raining down on a businessman holding an umbrella.

Image source: Getty Images.

1. Index funds are limited

An index fund limits itself to a category, and then buys all the stocks in that category. When people talk about "the market," they are usually talking about the U.S. stock market. It's one of the strongest markets in the world, if not the strongest. So if you were to buy an index fund in Australia or Nigeria, your returns would be limited to the overall returns in those markets.

Some of the most popular index funds track the 500 American large-caps. These funds own shares in 500 companies in a variety of major industries in the U.S. economy. A large-cap stock is one that has been a big winner over time. So if you buy an index fund that tracks 500 large-cap stocks, you're investing in the most successful U.S. companies.

How can an individual investor hope to do better than that? Actually there are a couple of ways.

2. Some sectors are stronger than others

A major index fund protects you with diversity. With an index fund, you're going to have a partial interest in many tech stocks, yes, but you'll also own oil stocks, grocery store chains, airplanes, accounting firms, and more. Not all of these sectors are as dominant (or fast-growing) in the U.S. economy as tech stocks.

For many years there was a fad of buying FAANG stocks, an acronym that represented shares of Facebook, Amazon (AMZN 1.30%), Apple, Netflix, and Google. Facebook is now known as Meta Platforms, and Google has become Alphabet, so the acronym doesn't work anymore. But for many years, investors in FAANG stocks outperformed the larger market.

That's because tech stocks overall have had fantastic returns over the last several decades. Many tech companies are growing fast. And technology -- particularly software -- has very high profit margins for mature businesses. So tech stocks have been very popular investment vehicles, and they have definitely outperformed grocery stores and the like.

Of course you might have a year when there's a "tech wreck" and all of those stocks get hammered. In that particular year, the holder of an index fund would outperform FAANG, because big money would flow away from the tech sector and into whatever was performing well. So an index fund limits your upside, but it also protects your downside for when there's a crash.

3. Index funds miss the best investment prospects

The only thing that beats the best stocks of today are the best stocks of tomorrow. The strongest investment you can make is to buy shares of a small-cap that goes on to become a mega-cap. The people who get rich in the stock market are the people who bought Amazon when it was a $6 billion company, or Netflix when it was a $4 billion company.

If you had invested $1,000 in Amazon back in the day, you'd be a millionaire now.

AMZN Chart

AMZN data by YCharts

It's not rocket science. Indeed, in my opinion investing is more art than science. The trick to making that million with Amazon was to be risk-tolerant enough that you were able to buy shares in an unprofitable start-up that was the top dog and first mover in internet commerce. And then you had to be patient enough to hold on to your shares for a couple of decades, while you allowed the miracle of compound returns to work its magic over time.

There's no index fund that will capture that. Small-cap funds only own small-cap stocks, and sell them when the companies start to succeed. (They have to sell, because successful small-caps don't stay small-caps for long, and small-cap funds can only hold small-caps). The large-cap index funds wait and wait and wait until a company is obviously successful. Amazon joined the S&P 500 in 2005, 10 years after its initial public offering. At the time, Amazon had a $19 billion market cap.

A $1,000 investment in Amazon in 2005 will probably be worth at least $100,000 in 2025. Amazon has been a fantastic stock for a lot of people. But there's no question that early investors in Amazon did significantly better than the late arrivals. So that's the key to "beating the market." Find those amazing small-cap stocks out there -- the ones with huge market opportunities -- and buy and hold those stocks for a couple of decades.