Investors buy funds that track the S&P 500 (^GSPC -0.58%) because the index includes 500 of the biggest, best-known companies in the U.S. stock market. Yet at least recently, the best-known stocks in the index actually haven't contributed as much to the market's gains as some of the lesser-known, smaller stocks that barely make their way into the index.

Small is in
Take a look at the following chart, showing the gains in three different stock indexes:

^SPX Chart

S&P 500, S&P 100, and Russell 2000 data by YCharts.

The line in the middle, weighing in with a gain of almost 18%, represents the full S&P 500. Slightly below that is the S&P 100, which includes the 100 biggest stocks in the S&P 500. As you can see, the S&P 100 has underperformed the broader S&P 500 by more than a percentage point, showing that the companies at the smaller end of the large-cap universe have contributed more to the broader index's performance than the top megacaps included in the benchmark.

Moving further still down the size spectrum, the Russell 2000 (RUSSELLINDICES: ^RUT) has put in the best performance of all, crushing the megacap S&P 100 by more than five percentage points and topping the S&P 500 by almost four percentage points.

Why are big stocks falling behind?
Typically, small-cap stocks tend to do better during times of economic growth. That's because unlike the largest, most mature companies, small-caps tend to be younger and more nimble in taking advantage of changing conditions and jumping on profitable opportunities. Moreover, precisely because they're smaller, they have a lot further to grow, attracting investors who don't want the limited upside of blue-chip megacap stocks.

On the other hand, large-cap stocks gain in popularity during times of slower growth and recession. Without the massive financial resources that large caps have, smaller companies are much more vulnerable to adverse economic conditions, and although their size can make it easier for them to adapt, they nevertheless face the challenge of surviving through credit crunches and other capital-market disruptions.

How to score better gains
If you think that the bull market has further to go, then investing in smaller stocks can make a big difference in your overall returns. Whether you go with the simple index-tracking investment iShares Russell 2000 (IWM -1.06%) or pick individual stocks on your own, adding small-cap exposure to your portfolio can help you appreciate the growth power of up-and-coming companies as they find their market niches and start to prosper.