Index funds are taxed in two ways in a regular brokerage account: you owe tax each year on the dividends and capital gains the fund distributes, and you owe tax on any profit when you sell shares. Hold the same fund inside a traditional IRA, 401(k), Roth account, or HSA and those annual tax events go away, replaced by rules that apply when money comes out of the account. So the real answer to how index funds are taxed depends less on the fund and more on the account it sits in, how long you’ve held your shares, and your income.
Distributions You Owe Tax On Every Year
Many index fund investors are surprised by a tax bill in a year they never sold anything. That bill comes from distributions. Index funds are required to pass through the income and realized gains from the underlying portfolio to shareholders, and those distributions are taxable whether you take the cash or reinvest it. Your fund company reports the breakdown on Form 1099-DIV each January.1Internal Revenue Service. About Form 1099-DIV, Dividends and Distributions
Dividends
The stocks inside the fund pay dividends, and those dividends flow through to you. The rate depends on whether they’re classified as “qualified” or “ordinary.” Qualified dividends are taxed at the same lower rates as long-term capital gains: 0%, 15%, or 20%, depending on your income. Ordinary dividends are taxed at your regular income tax rate, which can reach 37% for 2026.2Internal Revenue Service. IRS Releases Tax Inflation Adjustments for Tax Year 2026
Most dividends from a broad U.S. stock index fund qualify for the lower rates. To get that treatment, you need to have held the fund shares for more than 60 days during the 121-day window surrounding the ex-dividend date. That’s rarely an issue for long-term investors, but it can trip up someone who buys right before a distribution and sells shortly after. Income from bond funds and REITs held inside index funds is typically taxed at ordinary rates.
Capital Gains Distributions
Even though index funds trade far less than actively managed funds, some turnover is unavoidable. When the index adds or removes a company, or when the fund sells holdings to meet redemption requests, any profit on those sales gets distributed to all shareholders as a capital gains distribution. It’s taxed at long-term capital gains rates if the fund held the underlying securities for more than a year.3Internal Revenue Service. Topic No. 409, Capital Gains and Losses
You owe tax on these distributions even if your own shares have fallen in value over the year. That disconnect catches many investors off guard and is one of the main reasons tax-conscious investors prefer the ETF structure over the mutual fund structure for taxable accounts.
Taxes When You Sell Shares
The second tax event happens when you sell shares at a profit. Your taxable gain equals the sale proceeds minus your cost basis, which is what you originally paid plus any reinvested distributions. Your brokerage reports sales on Schedule D each year.4Internal Revenue Service. About Schedule D (Form 1040), Capital Gains and Losses
Short-Term vs. Long-Term Gains
How long you held the shares determines the rate. Shares held one year or less produce a short-term gain, taxed at your ordinary income tax rate. Shares held longer than one year produce a long-term gain and qualify for preferential rates. For 2026:
- 0% rate: taxable income up to $49,450 for single filers, $98,900 for married filing jointly, or $66,200 for head of household.
- 15% rate: income above those floors but below $545,500 (single), $613,700 (married filing jointly), or $579,600 (head of household).
- 20% rate: income exceeding the 15% thresholds.
Most investors land in the 15% bracket. The 0% rate creates a real planning opportunity in low-income years, such as early retirement or a career gap, when long-held index shares can sometimes be sold with no federal capital gains tax at all.3Internal Revenue Service. Topic No. 409, Capital Gains and Losses
Cost Basis Methods
Getting your basis right is how you avoid overpaying. If you’ve been buying shares over years and reinvesting distributions, you could have dozens of separate lots at different prices. The IRS allows several methods for identifying which shares you’re selling.5Internal Revenue Service. Mutual Funds (Costs, Distributions, Etc.)
- First-in, first-out (FIFO) assumes the oldest shares are sold first. In a steadily appreciating fund, FIFO typically produces the largest taxable gain because your oldest shares have the lowest basis.
- Specific identification lets you choose exactly which lots to sell. Picking higher-cost lots minimizes your gain, and most brokerages handle the tracking automatically.
- Average cost adds up what you paid for all shares and divides by the total number of shares. You must elect this method, and it’s available only for shares acquired at different times and prices or through a dividend reinvestment plan.6Internal Revenue Service. Mutual Funds (Costs, Distributions, Etc.) 1
Specific identification gives you the most control. If you’re selling only part of a position and want to minimize the tax hit, selecting your highest-cost lots is almost always the right move.
The 3.8% Net Investment Income Tax
Higher earners face an additional layer on top of the regular rates. The Net Investment Income Tax adds 3.8% on whichever is smaller: your net investment income, or the amount by which your modified adjusted gross income exceeds the filing threshold.7Internal Revenue Service. Topic No. 559, Net Investment Income Tax
The MAGI thresholds are $200,000 for single filers, $250,000 for married filing jointly, and $125,000 for married filing separately. These amounts are not indexed for inflation, so more taxpayers cross them each year.8Internal Revenue Service. Questions and Answers on the Net Investment Income Tax
Net investment income includes qualified and ordinary dividends, capital gains from selling fund shares, and capital gains distributions from the fund itself. A high-income investor selling a large position could face a combined federal rate of 23.8% on long-term gains, before any state tax.
State Taxes
Most states tax investment income too, and rates vary widely. Eight states have no individual income tax at all. A few states have specific rules for capital gains: one exempts them from state income tax entirely, and at least one taxes only capital gains and not wages. State income tax rates run roughly from 0% to over 13%, and those rates generally apply to investment income the same way they apply to wages. In a high-tax state, the combined federal and state rate on gains can approach or exceed 37% even on long-term holdings after the NIIT.
How Tax-Advantaged Accounts Change the Picture
Everything above assumes a taxable brokerage account. Move the same index fund into a retirement account and the annual tax events disappear.
A traditional IRA or 401(k) defers tax. Contributions may reduce your taxable income in the year you make them, and dividends and gains inside the account aren’t taxed as they occur. Every dollar you withdraw in retirement is then taxed as ordinary income, regardless of whether the underlying growth came from dividends, capital gains, or contributions.9Internal Revenue Service. Retirement Plans FAQs Regarding IRAs Distributions (Withdrawals)
A Roth IRA flips the timing. You contribute after-tax dollars, so contributions aren’t deductible, but qualified withdrawals, including decades of accumulated growth, come out completely free of federal income tax.10Internal Revenue Service. Topic No. 451 Individual Retirement Arrangements
Traditional accounts have a catch on the back end. Starting at age 73, you must take required minimum distributions each year, and those withdrawals are taxed as ordinary income. Skip an RMD or take less than required and the penalty is a 25% excise tax on the shortfall, reduced to 10% if you correct it within two years.11Internal Revenue Service. Retirement Topics – Required Minimum Distributions (RMDs)
Roth IRAs require no distributions during the original owner’s lifetime, one of their most significant advantages. Roth 401(k)s previously required RMDs, but that requirement was eliminated starting in 2024.
Ways to Reduce Your Index Fund Tax Bill
Index funds are already among the more tax-efficient investments available, but a few deliberate moves cut the bill further.
Tax-Loss Harvesting
Selling an investment that has fallen below what you paid locks in a loss that offsets capital gains dollar-for-dollar. If your losses exceed your gains, you can deduct up to $3,000 of the excess against ordinary income ($1,500 if married filing separately), and carry any remaining loss forward with no expiration.12Office of the Law Revision Counsel. 26 U.S. Code 1211 – Limitation on Capital Losses
The catch is the wash sale rule. Buy back the same fund or a “substantially identical” security within 30 days before or after the sale and the IRS disallows the loss entirely.13Office of the Law Revision Counsel. 26 USC 1091 – Loss From Wash Sales of Stock or Securities
This matters for index investors because selling one S&P 500 fund and immediately buying a different provider’s S&P 500 fund could be treated as a wash sale since both track the same index. A safer approach is switching to a fund that tracks a different but similarly broad index, such as moving from an S&P 500 fund into a total stock market fund. The IRS hasn’t published bright-line rules on what counts as “substantially identical” for index funds, so the wider the gap between the two indexes, the safer you are.
Asset Location
If you have both taxable and tax-advantaged accounts, where you place each holding matters. Tax-inefficient investments like bond funds, REIT funds, and high-turnover actively managed funds generate a lot of ordinary income and benefit most from the shelter of a traditional IRA or 401(k). Low-turnover index stock funds, which produce mostly qualified dividends and minimal capital gains distributions, fit naturally in taxable accounts. The compounding effect over a 20- or 30-year holding period can add meaningfully to your ending balance.
ETF vs. Mutual Fund Structure
Index funds structured as ETFs have a built-in tax edge over identical index funds structured as traditional mutual funds. When large institutional investors want to redeem ETF shares, they typically exchange them for the underlying stocks directly rather than forcing the fund to sell holdings for cash. Because these in-kind exchanges are not treated as taxable sales, the ETF avoids realizing capital gains that would otherwise flow through to shareholders.
In practice, many broad-market index ETFs go years without any capital gains distributions at all. If you hold the mutual fund version of the same index in a taxable account, you’re likely receiving annual capital gains distributions and owing tax on gains you didn’t choose to realize. For taxable accounts, the ETF wrapper is almost always the better choice for this reason alone.
Inherited Index Funds
When you inherit index fund shares, the cost basis resets to their fair market value on the date of the original owner’s death. This step-up in basis effectively erases all unrealized gains that accumulated during the decedent’s lifetime.14Office of the Law Revision Counsel. 26 USC 1014 – Basis of Property Acquired From a Decedent
Inherited shares are also treated as long-term holdings regardless of how long the decedent or the heir actually held them, so any future appreciation qualifies for the lower long-term capital gains rates. For elderly investors holding large appreciated positions, the step-up is often a reason not to sell, even when rebalancing might otherwise make sense.
International Index Funds and the Foreign Tax Credit
If you own an international index fund, the countries where the underlying companies are based often withhold tax on dividends before the money reaches you. You can claim a federal credit for your share of those foreign taxes. Your fund reports the amount on Form 1099-DIV, and you claim the credit on your return.15Internal Revenue Service. Foreign Taxes That Qualify for the Foreign Tax Credit
If total foreign taxes on your 1099-DIV are $300 or less ($600 for married filing jointly), you can claim the credit directly without filing the separate Form 1116. Larger amounts require the form but are still worth claiming. One reason to hold international index funds in a taxable account rather than a Roth IRA is that the foreign tax credit only offsets taxes you actually owe. Inside a Roth, where qualified withdrawals are already tax-free, those foreign taxes are lost.