Index funds are taxed in two places: on the dividends and capital gains the fund distributes to you each year, and on the profit you realize when you sell your shares. In a regular brokerage account, both are reportable every year the fund pays out or you sell at a gain. Inside a traditional IRA, 401(k), Roth IRA, or HSA, the annual tax disappears and the rules shift to withdrawal time. So the full answer to how index funds are taxed depends on three things: the account that holds the fund, how long you’ve owned the shares, and your total income for the year.
The Account Wrapper Decides Almost Everything
The fund itself matters less than where you keep it.
In a taxable brokerage account, every dividend, every capital gains distribution, and every sale at a profit is a reportable event. The brokerage reports distributions on Form 1099-DIV and sales on Schedule D, and you owe tax that year whether you spent the money or reinvested it automatically.1Internal Revenue Service. About Schedule D (Form 1040), Capital Gains and Losses
A traditional IRA or 401(k) suspends all of that. Contributions may reduce your taxable income the year you make them, nothing inside the account is taxed as it happens, and every dollar you withdraw in retirement is taxed as ordinary income regardless of whether it came from dividends, gains, or your original contribution.2Internal Revenue Service. Retirement Plans FAQs Regarding IRAs Distributions (Withdrawals)
A Roth IRA reverses the timing. You put in money you’ve already paid tax on, and qualified withdrawals later, including decades of growth, come out free of federal income tax.3Internal Revenue Service. Topic No. 451 Individual Retirement Arrangements
A Health Savings Account does something unusual: contributions are deductible, growth isn’t taxed inside the account, and withdrawals for qualified medical expenses are also tax-free.4HealthCare.gov. How Health Savings Account-Eligible Plans Work
Everything below applies to a taxable brokerage account. If your index fund sits inside a traditional IRA, 401(k), Roth IRA, or HSA, you can generally ignore annual distributions and sale-time gains until you take money out.
Annual Distributions: The Tax Bill Without a Sale
Many index fund investors get a tax bill in a year they never clicked “sell.” The reason is distributions. A fund is required to pass the income and realized gains from its underlying holdings through to shareholders, and those amounts are taxable whether you take the cash or reinvest it. The breakdown shows up on Form 1099-DIV each January.5Internal Revenue Service. About Form 1099-DIV, Dividends and Distributions
Dividends: Qualified vs. Ordinary
The stocks inside the fund pay dividends, and those flow through to you. Qualified dividends get the lower long-term capital gains rates of 0%, 15%, or 20% depending on your income. Ordinary dividends are taxed at your regular income tax rate, which tops out at 37% for 2026.6Internal 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 rate. To get that treatment you need to have held the fund shares more than 60 days during the 121-day window around the ex-dividend date, which is rarely an issue for long-term holders but can catch someone who buys just before a distribution and sells shortly after. Income from bond funds and REITs is typically taxed at ordinary rates instead.
Capital Gains Distributions
Even though index funds trade far less than active funds, some turnover is unavoidable. When the index adds or drops a company, or the fund has to sell to meet redemptions, it may realize a profit, and that profit is distributed to all shareholders. If the fund held the underlying security more than a year, the distribution is taxed at long-term capital gains rates.7Internal Revenue Service. Topic No. 409, Capital Gains and Losses
You owe this tax even if your own shares have lost value over the year. That disconnect is one of the main reasons tax-conscious investors prefer the ETF version of the same index.
Tax When You Sell Your Shares
The second tax event is the sale. Your taxable gain is the sale proceeds minus your cost basis, which is what you paid for the shares plus any reinvested distributions already taxed along the way.
Short-Term vs. Long-Term
Shares held one year or less produce short-term capital gains, taxed at your ordinary income rate. For 2026, that top rate is 37%, hitting single filers above $640,600 and married couples filing jointly above $768,700.6Internal Revenue Service. IRS Releases Tax Inflation Adjustments for Tax Year 2026
Shares held longer than one year produce long-term capital gains, which get preferential rates. For 2026:
- 0% rate on taxable income up to $49,450 (single), $98,900 (married filing jointly), or $66,200 (head of household).
- 15% rate above those floors but below $545,500 (single), $613,700 (married filing jointly), or $579,600 (head of household).
- 20% rate above the 15% thresholds.
Most investors land in the 15% band. The 0% rate is worth remembering, though. In a low-income year, a career gap, early retirement before Social Security begins, you can sell long-held index fund shares and pay no federal capital gains tax at all.7Internal Revenue Service. Topic No. 409, Capital Gains and Losses
Which Shares Are You Selling?
If you’ve bought the same fund across many years and reinvested distributions, you have dozens of separate lots at different prices. The IRS lets you choose a cost basis method to determine which shares count as sold.8Internal Revenue Service. Mutual Funds (Costs, Distributions, Etc.)
- First-in, first-out assumes the oldest shares go first. If the fund has climbed steadily, this usually produces the largest taxable gain because those old shares have the lowest basis.
- Specific identification lets you pick exactly which lots to sell. Choosing the highest-cost lots minimizes the gain. Most brokerages track lots for you.
- Average cost adds up what you paid for all shares and divides by the share count. You have to elect it, and it’s available only for shares acquired at different times and prices or through a dividend reinvestment plan.9Internal Revenue Service. Mutual Funds (Costs, Distributions, Etc.) 1
Specific identification gives you the most control. If you’re trimming only part of a position, picking your highest-cost lots is almost always the right call.
The 3.8% Net Investment Income Tax
Higher earners face an extra layer. The Net Investment Income Tax adds 3.8% on top of the regular dividend and capital gains rates. It applies to the smaller of your net investment income or the amount your modified adjusted gross income exceeds the threshold.10Internal Revenue Service. Topic No. 559, Net Investment Income Tax
Those MAGI thresholds are $200,000 single, $250,000 married filing jointly, and $125,000 married filing separately, and they are not indexed for inflation.11Internal 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. For a high-income investor selling a large long-held position, the combined federal rate reaches 23.8% before state taxes.
State Taxes
Federal is only part of the bill. Most states tax investment income the same way they tax wages. Eight states have no individual income tax at all. State rates range from 0% to over 13%, with a few outliers: one state exempts capital gains from income tax entirely, and at least one taxes capital gains income but not wages. In a high-tax state, combined federal and state tax on long-term index fund gains can push toward 37% once the NIIT is included.
How to Pay Less
Choose the ETF Version in Taxable Accounts
Index funds structured as ETFs have a built-in tax advantage over mutual fund versions of the same index. When large institutions redeem ETF shares, they typically receive the underlying stocks directly rather than cash, and because those in-kind exchanges aren’t treated as sales, the fund avoids realizing gains that would otherwise flow through to all shareholders. Many broad-market index ETFs go years without paying any capital gains distribution. In a taxable account, that structural edge is reason enough to prefer the ETF.
Harvest Your Losses
When a holding drops below what you paid, selling to lock in the loss creates a deduction. Realized losses offset realized gains dollar for dollar. If losses exceed gains, you can deduct up to $3,000 of the excess against ordinary income ($1,500 if married filing separately) and carry the rest forward indefinitely.12Office of the Law Revision Counsel. 26 U.S. Code 1211 – Limitation on Capital Losses
The trap 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 loss is disallowed.13Office of the Law Revision Counsel. 26 USC 1091 – Loss From Wash Sales of Stock or Securities For index funds, that means swapping one S&P 500 fund for another provider’s S&P 500 fund is risky; swapping into a fund that tracks a different broad index, such as a total stock market fund, is safer. The IRS hasn’t drawn a bright line, so wider gaps between the two indexes are safer.
Put the Right Fund in the Right Account
If you have both taxable and tax-advantaged accounts, placement matters. Bond funds, REIT funds, and high-turnover actively managed funds throw off a lot of ordinary income, so they fit best inside a traditional IRA or 401(k). Low-turnover index stock funds, which produce mostly qualified dividends and few capital gains distributions, do their best work in a taxable account where that efficiency pays off.
Inherited Index Funds Get a Step-Up in Basis
When you inherit index fund shares, the cost basis resets to the fair market value on the date of the original owner’s death. Decades of unrealized gain simply disappear for tax purposes.14Office of the Law Revision Counsel. 26 USC 1014 – Basis of Property Acquired From a Decedent
If a parent bought $50,000 of an S&P 500 index fund that grew to $200,000 by the time they died, the heir’s basis becomes $200,000. Selling immediately would produce no taxable gain. Inherited shares are also treated as long-term holdings no matter how briefly the heir has owned them, so later appreciation qualifies for the lower long-term rates. For elderly investors holding large appreciated positions, the step-up is often a reason not to sell during their lifetime.
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 the fund. You can claim a federal credit for your share. The amount is reported on Form 1099-DIV and reduces your federal tax bill dollar for dollar up to the foreign tax paid.15Internal Revenue Service. Foreign Taxes That Qualify for the Foreign Tax Credit
If total foreign tax on your 1099-DIV is $300 or less ($600 for married filing jointly), you can claim the credit directly on your return without Form 1116. Larger amounts require the form. One planning note: the credit only offsets taxes you actually owe, so holding an international index fund inside a Roth IRA, where qualified withdrawals are already tax-free, means the foreign tax is simply lost.