The first exchange-traded fund (ETF) created was the SPDR S&P 500 ETF. It was a logical first step for what has now become a massive product category.

There are multiple ways to use ETFs in a portfolio, but one of the best ways for long-term investors is still to simply buy the broad-based S&P 500 index. But before you do that, consider the Invesco S&P 500 Equal Weight ETF (RSP -0.12%), a better performing S&P 500 index variant.

What does the S&P 500 index do?

From a big-picture perspective, the S&P 500 index isn't actually meant to track the market. The 500 or so stocks in the index are hand-selected by a committee to be representative of the U.S. economy.

In keeping with that goal, the stocks in the index are market-cap weighted. This means that the largest companies have the greatest impact on the performance of the index and index-tracking ETFs like the Vanguard 500 Index ETF (which has a lower management fee than the SPDR S&P 500 Index ETF). That's basically what would happen with the real world, too.

A person whispering into the ear of another person that is surprised.

Image source: Getty Images.

It just so happens that tracking the U.S. economy has worked out well over time. And, thus, the S&P 500 index has been adopted as the key benchmark for the U.S. market.

History is very clear that over time, even if you bought at market peaks, just owning the S&P 500 index, via a low-cost mutual fund or ETF, has worked out very well.

As the graph below highlights, even deep downturns and recessions (represented by the shaded areas) now appear to be little more than blips along the S&P 500 index's climb higher. That includes the dot.com crash at the turn of the century, when the Y2K bug had investors worried about the risk of a technology collapse, and the deeply troubling financial crisis around the Great Recession, when the potential for a global economic collapse was the worry.

SPY Chart

SPY data by YCharts.

Buy the S&P 500 or the same index with a slight twist?

If all you did was buy the S&P 500 index, and kept buying it to benefit from dollar-cost averaging, you would probably end up pretty happy when you retired. But there is a potentially better alternative, which is just a minor variation on the same index. You can own it as an exchange-traded fund via the purchase of the Invesco S&P 500 Equal Weight ETF.

The nice part about the Invesco Equal Weight ETF is that it owns all of the same stocks as the S&P 500 index. So it remains broadly representative of the U.S. economy. The only difference is in the way the stocks in the ETF are weighted. As the name suggests, every stock is given the same weight as every other stock. This means that every stock has the same impact on performance. It is an important twist.

One of the problems with market-cap weighting is that the hottest stocks are often bid up to the point where they are the largest stocks. This is great during bull markets, but it can end up leaving the index overweight in some sectors. If a bear market comes around and the hot sectors cool off, the market can take a big hit. Equal weighting avoids this issue.

RSP Chart

RSP data by YCharts.

A second problem with market-cap weighting is that smaller, faster growing companies don't affect the index as much as larger companies. Equal weighting helps to increase the benefit over time from companies that are quickly growing, but smaller.

And the Invesco S&P 500 Equal Weight ETF will tend to have a higher yield than a market-cap weighted S&P 500 ETF because larger, popular stocks often have lower yields. By investing more in smaller, higher yielding stocks, the Invesco S&P 500 Equal Weight ETF boosts the overall portfolio's yield by around 30 basis points.

Put it all together, and the Invesco S&P 500 Equal Weight ETF is a winner

As the chart above highlights, the Invesco S&P 500 Equal Weight ETF has outperformed SPDR S&P 500 ETF on both a price-only basis and on a total-return basis, which assumes the reinvestment of dividends. You can argue that the differences here aren't that large given the long time periods being considered, which is true.

However, if you are looking for any edge you can get, the Invesco S&P 500 Equal Weight ETF's approach has, over time, proved to be the better choice for passive long-term investors.