Investing in index funds has long been considered one of the smartest investment moves you can make. Index funds are affordable, enable diversification, and tend to generate attractive returns over time. Historically, index funds outperform other types of funds that are actively managed by top investment firms.

An index fund is a type of mutual fund or exchange-traded fund (ETF) -- a bundle of securities that collectively track the performance of a market index such as the S&P 500 (SNPINDEX:^GSPC). An index fund contains the same investments in approximately the same proportion as the index the fund tracks. The index itself is usually focused on a specific sector, geography, or stock exchange.

In 2007, Warren Buffett made a $1 million bet that an S&P 500 index fund would beat the returns of an actively managed hedge fund over 10 years -- and he won in a landslide.

Buffett's victory may be reason enough for some investors to start adding index funds to their portfolios. If you need more convincing, read on to understand what index funds are and why they are so popular.

Benefits of index funds

Index funds enable broad diversification, have low costs, and provide attractive returns. Learn more about these key benefits:

1. Broad diversification

The most obvious benefit of investing in index funds is that your portfolio becomes instantly diversified, minimizing the likelihood of losing some or all your money.

Consider an index fund that tracks the S&P 500. This index fund would hold about 500 different stocks. While the performance of each of these 500 stocks fluctuates over time, investing in a fund that holds all of them matches your portfolio's performance to that of the index itself. Diversifying your portfolio among so many companies, by investing money into just one index fund, ensures that the value of your portfolio is not overly correlated with the fortunes of any one company listed in the index.

Graphic of a stock chart.

Image source: Getty Images.

2. Low costs

Another major benefit of investing in index funds is that the costs, including taxes and management fees, may be lower than those associated with other types of investment funds.

Low management fees: The first cost to consider is the management fee each fund manager annually collects. The amount of the fee, which varies based on the value of your holdings, is determined by the fund's expense ratio. If you hold $1,000 in a mutual fund with a 1% expense ratio, for example, you would pay $10 as the management fee.

Actively managed mutual funds have expense ratios that often range between 1% and 2%. Most of that fee pays for portfolio managers to make buy-and-sell decisions in an attempt to outperform the overall market.

Index funds, by contrast, are passively managed. Since they simply track an index by buying and holding all of the stocks in that index, the holdings of the index fund rarely change. The expense ratio is comparatively low because there's little work required of the index fund's manager.

Index funds' expense ratios typically range between 0.05% and 0.07%, and some index funds have expense ratios as low as 0%. If you hold $1,000 in index fund with a 0.05% expense ratio, then you would pay just $0.50 as the management fee.

Lower turnover ratio

The turnover ratio measures the percentage of a fund's holdings replaced in a single year. For example, if a fund invests in 100 stocks and 10 are swapped out this year, then the turnover ratio is 10%.

Naturally, index funds have a lower turnover ratio than actively managed funds. Index fund turnover ratios are usually about 1% to 2% per year, compared to 20% or higher for some actively managed mutual funds.

Lower taxes on capital gains

If a fund sells a stock for profit, then the difference between the initial purchase price and the final sale price is considered a capital gain. Funds with higher turnover ratios accrue capital gains more frequently, which results in more taxes owed by the fund's investors.

This isn't as much of a concern with index funds, though, thanks to their low turnover ratios. Since fund managers aren't selling stocks all the time, there aren't often capital gains to pass through to shareholders.

3. Attractive returns

As Buffett knew when he made his $1 million bet, even the smartest and most diligent portfolio managers can rarely steer actively managed funds to beat index funds. Only about 23% of actively managed mutual funds outperform the S&P 500 over five years, according to research by Standard & Poor's.  Other studies support this number as well.

Individual companies both outperform and underperform the market, but, in general, the overall stock market increases in value over time. As a result, index funds yield generally high returns for low cost, which make them an excellent value for any investor.

How to start investing in index funds

You can purchase index funds through a brokerage firm or a mutual fund company such as Fidelity Investments or Vanguard. Your first step is to look at the index funds' offerings and whether the funds have investment or account minimums.

If you don't plan to invest much money initially, prioritize funds that don't have account minimums. Alternatively, you can get started with an ETF version of an index fund instead of a typical mutual fund, which is more likely to have a high minimum investment. The minimum purchase for an ETF is never more than one share.

Then, choose an index. The S&P 500 and the Dow Jones Industrial Average (DJIA) (DJINDICES:^DJI) are two of the best-known indexes for U.S. stocks, and index funds that track them are a good choice for beginning investors. But there are many more options. Look at how various index funds have performed historically. You should also check their expense ratios and compare them to other funds tracking the same or similar indexes.

Whether you're new to investing or already experienced, an index fund is a great asset to add to your portfolio. It takes a little time to find the right index fund for you, but once you do, you can sit back and let your money grow.