How Index Funds Work
How an index fund copies a stock index, why it rarely needs to trade, what tracking error means, and why index funds cost so little to run.
An index fund is a mutual fund or ETF that tries to match the return of a stock index by holding the same stocks in the same proportions, instead of trying to pick winners. It does not aim to beat the market. It aims to be the market, minus a small fee.
In short: an index fund follows a published rulebook. The index provider decides which companies are in the index and how much each one weighs. The fund buys those companies in those weights, adjusts when the index changes, and charges a fee for doing the work. Because there are no analysts picking stocks and very little trading, the fee can be very low.
What the fund is copying
An index is a list of companies plus a formula for weighting them. The S&P 500 holds about 500 large US companies, and the S&P/TSX Composite holds the largest companies on the Toronto Stock Exchange. Most big indexes are market-cap weighted: each company’s weight equals its market value divided by the total market value of everything in the index. How those formulas work, and how a price-weighted index like the Dow differs, is covered in what is a stock index.
The index itself is just a number calculated by a company such as S&P Dow Jones Indices or FTSE Russell. You cannot buy it directly. An index fund is the product that turns that number into something you can own.
How an index fund tracks its index
Full replication
The simplest method is full replication: buy every stock in the index in its exact weight. If a company is 6% of the index, it is 6% of the fund. This works well for indexes of large, heavily traded companies, where buying every name is cheap and easy.
Sampling
Some indexes contain thousands of securities, including small or thinly traded ones that are costly to buy. A fund tracking such an index may use sampling (also called optimization): it holds a representative subset chosen so the fund’s sector mix, size profile and other characteristics closely match the full index. Sampling saves trading costs but adds a little risk that the fund’s return drifts from the index.
A worked example
Imagine a tiny index with three companies:
| Company | Share price | Shares outstanding | Market value | Index weight |
|---|---|---|---|---|
| Maple Widgets | $50 | 10 million | $500 million | 50% |
| Prairie Rail | $30 | 10 million | $300 million | 30% |
| Harbour Foods | $20 | 10 million | $200 million | 20% |
| Total | $1,000 million | 100% |
A fund with $1 million to invest buys $500,000 of Maple Widgets (10,000 shares), $300,000 of Prairie Rail (10,000 shares), and $200,000 of Harbour Foods (10,000 shares). Notice that it ends up owning the same fraction, 0.1%, of each company. That is the key property of a cap-weighted index fund: it owns a thin, equal slice of every company’s total market value.
Now suppose Maple Widgets rises 20% to $60 and the others are unchanged. The index’s total value goes from $1,000 million to $1,100 million, a 10% gain. The fund’s holdings go from $1,000,000 to $1,100,000, also a 10% gain. Maple Widgets is now 54.5% of both the index and the fund ($600 million out of $1,100 million). The fund did not have to trade at all.
Rebalancing: less than people think
Because a cap-weighted fund owns a fixed fraction of each company, price moves keep it aligned automatically. Trading is only needed when the index’s membership or share counts change:
- Additions and deletions. When a company joins or leaves the index (because it grew, shrank, was acquired, or went bankrupt), the fund buys or sells it.
- Share count and float changes. If a company issues new shares or buys back stock (see stock splits and buybacks), its index weight changes. S&P Dow Jones Indices updates S&P 500 share counts quarterly, with changes taking effect after the close on the third Friday of March, June, September and December, according to its published US index methodology.
- Cash flows. New money coming in gets invested across the index; withdrawals are met by selling a slice of everything (or, for ETFs, by handing over shares in kind).
- Dividends. Dividends paid by the companies are collected and either reinvested or passed through to fund holders.
Indexes that are not weighted by market value, such as equal-weighted indexes, must trade regularly to reset their weights, which raises costs. That is one reason most low-cost index funds track cap-weighted indexes.
Tracking difference and tracking error
No index fund matches its index perfectly. Two related terms describe the gap:
- Tracking difference is the simple gap between the fund’s return and the index’s return over a period. It is usually negative and roughly equal to the fund’s fee plus trading costs.
- Tracking error is how much that gap varies from period to period, measured as a standard deviation. A fund that trails by exactly 0.05% every year has a tracking difference of minus 0.05% and a tracking error near zero.
Arithmetic of the gap
Suppose an index returns 10.00% in a year. A fund tracking it charges 0.05% a year and loses another 0.03% to trading costs and cash it held briefly before investing. On $10,000, the index would have grown to $11,000. The fund grows to about:
$10,000 × (1 + 0.1000 - 0.0005 - 0.0003) = $10,992
The tracking difference is minus 0.08%, or $8 on $10,000. Small, but it is there every year.
The gap can also come from:
- Cash drag, from holding a small amount of uninvested cash for redemptions or awaiting dividends.
- Sampling, where the fund does not hold every stock.
- Withholding taxes on foreign dividends, which the fund pays but the index may assume away.
- Securities lending income, which works in the other direction: some funds lend shares to short sellers and earn fees that offset part of the expense ratio.
Why index funds are cheap
An actively managed fund pays analysts and portfolio managers to research companies and decide what to buy. It also tends to trade more, which costs money in commissions and bid-ask spreads. An index fund does not need a research team, trades rarely, and benefits from scale: running a $100 billion fund costs far less than 100 times a $1 billion fund.
The result shows up in the fee, which in the US is called the expense ratio and in Canada the management expense ratio (MER). The Investment Company Institute’s Trends in the Expenses and Fees of Funds, 2024 reported asset-weighted average expense ratios of 0.05% for US index equity mutual funds and 0.14% for index equity ETFs in 2024, compared with 0.64% for actively managed equity mutual funds. Asset-weighted means bigger funds count for more, so these figures reflect what the typical dollar paid, not the typical fund.
In Canada, index funds have historically carried lower embedded advice costs too. The Canadian Securities Administrators noted in Consultation Paper 81-408 (2017) that passive funds typically paid dealers a trailing commission of 0.10% to 0.25% a year, compared with about 1% on actively managed equity funds. How those embedded fees work, and what changed in 2022, is covered in how investment fees work.
Mutual fund or ETF?
The same index can be tracked by a traditional mutual fund or by an exchange-traded fund. The holdings can be nearly identical; the difference is in how you buy and sell. A mutual fund is bought from the fund company at one price calculated after the market closes. An ETF trades on an exchange throughout the day like a stock. That difference, and what it means for taxes and costs, is in ETFs vs mutual funds.
What can go wrong
Index funds solve the stock-picking problem. They do not solve every problem.
- You get the whole market’s losses. An S&P 500 index fund fell along with the index in every bear market. Matching the market means matching its drawdowns. See stock market crashes in history.
- Concentration. Cap weighting means the biggest companies dominate. When a handful of very large companies make up a big share of an index, an index fund is less diversified than “500 companies” suggests.
- The index can be narrow. A fund that tracks a single sector, a single small country, or a quirky rules-based “smart beta” index is still an index fund, but it may be expensive, concentrated, or built around a back-tested idea.
- Index changes are public. When a stock is announced as joining a major index, other traders can buy ahead of the effective date and sell to index funds at higher prices. The cost is usually small but real.
- Low fee is not the only cost. Commissions, spreads on thinly traded ETFs, currency conversion, and an advisor’s fee on top can add up to more than the fund’s fee.
- Same name, different index. “Canadian equity index fund” can mean the S&P/TSX Composite, the S&P/TSX 60, or an FTSE or MSCI Canada index. Read which index the fund tracks.
The short version
An index fund copies a published index, usually by owning every stock in proportion to its market value. Because price moves keep that proportion in line automatically, it trades only when the index changes or money flows in and out. Its return is the index return minus a small, predictable gap from fees and costs, which is why low cost is the whole point. What it cannot do is protect you from the market itself.
Related: Active vs Passive Investing · ETFs vs Mutual Funds · What Is a Stock Index? · Diversification Explained
Stay in the loop
New explainers, by email
One short email when a new plain-English explainer goes up. No price tips, no "next 100x coin", no selling your address. Unsubscribe any time.