Bitcoin US$ 85,996Ethereum US$ 2,753EUR/USD 1.149GBP/USD 1.339USD/BRL 5.13Bitcoin US$ 85,996Ethereum US$ 2,753EUR/USD 1.149GBP/USD 1.339USD/BRL 5.13
Investing BasicsUpdated 2026-09-2210 min read

What You Actually Owe in Taxes When You Sell Index Funds

Michael Chen
Michael Chen writes about personal finance fundamentals. Bay Area-based · finance enthusiast for 15 years.
Visual representation of the voice · not a photographic portrait
Share𝕏f
Selling an index fund taxes only your gain, not the whole withdrawal. See how holding time, account type and cost basis…
Quick answer: You are taxed on the gain, not on the amount you withdraw. Hold the shares more than one year and the gain is long-term, taxed at 0%, 15% or 20% depending on your income. Hold them a year or less and the gain is added to your regular income and taxed at your normal rate.↗ Share on X

You do not pay tax on the money you pull out of an index fund. You pay tax on the growth - what you sold the shares for, minus what you paid for them. If you owned those shares for more than one year, that growth is taxed at the long-term capital gains rate, which for most working people is 0% or 15%. If you owned them for one year or less, the growth gets stacked on top of your paycheck and taxed at your regular income tax rate. Everything else here is detail on top of those two sentences.

Do you owe tax on the whole amount you take out?

READ ALSODividend Stocks vs Index Funds: Which One Should You Pick? →Your Retirement Number: The 4% Rule Math, Step by Step →Retirement Savings Myths That Quietly Shrink Your Nest Egg →

No. Only on the gain.

Say you put $10,000 into an index fund. Years later it is worth $13,000 and you sell all of it. That $10,000 was already your money, and you already paid tax on it back when you earned it. Only the $3,000 of growth counts.

What happenedAmount
What you paid (your cost basis)$10,000
What you sold it for$13,000
Your capital gain$3,000
Amount the tax applies to$3,000

If the fund had dropped to $8,000 instead and you sold, you would have a $2,000 capital loss. A loss is not only a bad day. It can cut your tax bill, and we get to that further down.

Clear money tips in your inbox. No hype.

Does it matter how long you held the fund?

RECOMMENDEDUltimate Dynamic Personal Budget in Google Sheets (FinSavvyDesigns) → — A fully dynamic budget planner in Google Sheets to track income, expenses, and savings with an interactive dashboard.

Affiliate link. We may earn a commission on purchases, at no extra cost to you.

This content is informational and is not investment advice or financial consulting.

It matters more than almost anything else you control.

The dividing line is one year. Held the shares one year or less? The gain is short-term, and it is taxed at your normal income tax rate, the same rate as your wages. Held them more than one year? One year and one day is enough. Now the gain is long-term, and it gets its own, lower set of rates.

Same $3,000 gain, two very different bills:

How long you held itType of gainRate usedTax on a $3,000 gain
11 monthsShort-termYour income rate (example: 22%)$660
13 monthsLong-termLong-term rate (example: 15%)$450

Two extra months saved $210. On a $30,000 gain the same gap is $2,100. So look up the purchase date before you click sell. If you are three weeks from the one-year mark and do not need the cash now, waiting is often the cheapest move you will make all year.

What are the long-term rates?

READ ALSOHow to Rebalance Index Funds Without a Surprise Tax Bill →13 Retirement Savings Mistakes That Quietly Cost You →How Much Should You Have Saved for Retirement at Age 30? →

There are three long-term rates: 0%, 15% and 20%. Which one you land in depends on your taxable income for the year, not on the size of the gain by itself.

Most people with a normal job land in the 15% band. People with a low-income year - between jobs, an early retirement year, a year with a large deduction - can land in the 0% band and owe nothing at all on a long-term gain. That is a real and legal outcome, and it is why some people deliberately sell winners in a low-income year.

The income cutoffs for each band move every year with inflation. Do not trust a dollar figure you saw on a blog two years ago. Search for the IRS page on capital gains rates and read the numbers for the tax year in which you actually sold.

One more layer: an extra 3.8% tax on investment income kicks in once your modified adjusted gross income passes $200,000 filing single, or $250,000 married filing jointly. Those two numbers are fixed in the law and do not rise with inflation.

Does the type of account change the answer?

Completely. This is the part beginners miss most often.

Where the fund is heldTax when you sell inside itTax when money leaves the account
Regular taxable brokerage accountYes - capital gains taxNone beyond that
Traditional 401(k) or traditional IRANoneWithdrawal taxed as ordinary income
Roth IRA or Roth 401(k)NoneNone on a qualified withdrawal
Health savings account (HSA)NoneNone if used for qualified medical costs

Inside a retirement account, selling is silent. You can sell an index fund, buy a different one the same morning, and no tax event happens at all. Inside a regular brokerage account, every sale is reported and every gain is counted. So the first question is not how much tax you will owe. It is which account the fund is sitting in.

How do you find your cost basis?

Cost basis is what you paid. It decides the size of your gain, so a wrong basis means a wrong tax bill, usually one that is too high.

Three things go into it:

1. The money you originally put in.

2. Every dividend that was automatically reinvested into more shares. This is the single most expensive thing beginners forget. Reinvested dividends were already taxed in the year you received them. They raise your basis. Leave them out and you pay tax on the same money a second time.

3. Any sales load or transaction fee you paid to buy in.

Your broker sends you a Form 1099-B, usually in February, listing what you sold. For shares bought in recent years, called covered shares, the broker also reports your cost basis straight to the IRS. For older shares, called noncovered, the basis box may be blank and the burden is on you to prove what you paid. Old statements matter.

If you bought at different times, you also get to choose which shares to sell:

Seven steps to work out what you owe

1. Open your brokerage account and find the position. Look for the tax lot or cost basis view, not just the total balance.

2. Write down the purchase date and the cost basis of each lot you plan to sell.

3. Check the calendar. Mark each lot short-term (one year or less) or long-term (more than one year).

4. Subtract cost basis from the expected sale amount for each lot. That difference is the gain or the loss.

5. Add up long-term gains separately from short-term gains. They are taxed differently and are not mixed together.

6. Apply the rate. Short-term gains use your income tax bracket. Long-term gains use 0%, 15% or 20%.

7. Set the money aside the same day the sale settles. Do not spend a gain and then meet the bill in April.

If the gain is large enough that your paycheck withholding will not cover the extra tax, you may also owe an estimated tax payment during the year rather than at filing time. Ask a tax professional instead of guessing.

What if you sold at a loss?

A loss is useful. The order is fixed:

One trap: the wash sale rule. If you sell at a loss and buy the same fund, or a substantially identical one, within 30 days before or 30 days after the sale, the loss is disallowed for now. It is added to the cost basis of the new shares instead. Buying the same index fund back inside your IRA counts too, so you cannot dodge it by switching accounts.

Five mistakes that cost beginners real money

1. Forgetting reinvested dividends. You end up paying tax twice on the same dollars.

2. Selling at 11 months. A few weeks of patience can move the gain from your income rate to the long-term rate.

3. Assuming no tax form means no reporting. The sale reaches the IRS whether or not you notice it.

4. Thinking you are safe because you did not sell. Mutual funds pass capital gains distributions through to holders at year end, so you can owe tax on a fund you never touched. Index ETFs generally do this far less often.

5. Dumping the whole position in one year. Splitting a big sale across two tax years can keep you inside a lower band.

When should you stop and call a professional?

This article explains the general rules. It is not tax advice for your return, and no article can promise a particular outcome for your situation.

Talk to a CPA or an enrolled agent before you sell if any of these apply:

Your next step

Do not start with a calculator. Start with your account.

Log in to your brokerage today, open the fund position, and find the tax lot detail screen. Write down, for each lot: the purchase date, the number of shares, and the cost basis. Then mark each line short-term or long-term. That single sheet answers most of the question before any tax rate is involved, and it is exactly what an accountant will ask for first.

FAQ

Do I pay tax if I sell one index fund and immediately buy another?

Yes. In a taxable brokerage account, a swap is still a sale. The moment you sell, the gain is locked in and reportable, even if the money never leaves the account. Inside a 401(k), IRA or Roth, the same swap creates no tax event at all.

Can I owe tax on a fund I never sold?

Yes. Mutual funds pass capital gains distributions on to shareholders, usually in December, and those are taxable in a regular brokerage account even if you bought the fund that year and sold nothing. Index ETFs tend to make these distributions far less often.

How much should I set aside from the sale?

A cautious starting point is 15% to 20% of the gain for long-term gains, and your full income tax rate for short-term ones, plus anything your state charges. Set it aside the day the sale settles and confirm the real number with a tax professional before filing.

Clear money tips in your inbox. No hype.

Share𝕏f

Educational content, not personalized financial advice. Sources cited where applicable.

Clear money tips in your inbox. No hype.