The tax implications of selling mutual funds come down to two numbers: how much your shares gained since you bought them, and how long you owned them. Gains on shares held more than a year are taxed at long-term capital gains rates of 0%, 15%, or 20% depending on your income. Gains on shares held a year or less are taxed at your ordinary income rate, which can reach 37%. Higher earners may owe an additional 3.8% surtax on top. And mutual funds can hand you a tax bill even in years you don’t sell a single share, through capital gains distributions the fund passes along to shareholders.
How the Gain Is Calculated
Your taxable gain or loss is the sale proceeds minus your cost basis.1Office of the Law Revision Counsel. 26 U.S. Code 1001 – Determination of Amount of and Recognition of Gain or Loss Cost basis is the price you originally paid, plus any dividends and capital gains distributions you reinvested along the way. Sell for more than basis, you have a gain. Sell for less, you have a loss.
Reinvested distributions are the piece investors most often overlook, and forgetting them is expensive. Because you already paid tax on those distributions in the year they were paid out, the reinvested dollars belong in your basis. Say you put $10,000 into a fund and reinvested $2,000 in distributions over the years. Your basis is $12,000, not $10,000. Sell for $15,000 and the taxable gain is $3,000, not $5,000. Ignore the reinvestments and you pay tax on the same money twice.
Your brokerage should track this automatically, but verify it, especially if you’ve moved shares between brokerages or held the fund a long time. Older account records are sometimes incomplete.
Only realized sales are taxable. Watching your fund’s price rise doesn’t trigger anything; the sale does. That means you control the timing. Selling in a lower-income year can push you into a more favorable bracket.
Short-Term vs. Long-Term Rates
The tax code draws a hard line at one year. Held a year or less, your gain is short-term and taxed at your ordinary income rate, which ranges from 10% to 37% for 2026.2Office of the Law Revision Counsel. 26 USC 1222 – Other Terms Relating to Capital Gains and Losses3Internal Revenue Service. Federal Income Tax Rates and Brackets Held more than a year, the gain is long-term and taxed at a much lower rate.
For 2026, single filers pay long-term capital gains rates as follows:4Office of the Law Revision Counsel. 26 USC 1 – Tax Imposed
- 0% on taxable income up to $49,450
- 15% on taxable income from $49,451 to $545,500
- 20% on taxable income above $545,500
Married couples filing jointly get higher thresholds: 0% up to $98,900, 15% from $98,901 to $613,700, and 20% above $613,700. For head-of-household filers, 0% runs up to $66,200 and the 20% rate begins above $579,600.
The gap between short-term and long-term is where real money sits. A high earner selling after 11 months might pay 37%. Wait one more month and the ceiling drops to 20%. For moderate earners, waiting can take the rate to 0%. Your purchase date matters.
The 3.8% Net Investment Income Tax
Higher-income investors owe an extra 3.8% surtax on net investment income, which includes mutual fund capital gains. The thresholds are $200,000 for single filers, $250,000 for married filing jointly, and $125,000 for married filing separately.5Office of the Law Revision Counsel. 26 USC 1411 – Imposition of Tax
The 3.8% applies to whichever is smaller: your net investment income, or the amount your modified adjusted gross income exceeds the threshold. A single filer with $230,000 of modified AGI including $50,000 of fund gains owes the surtax on $30,000, not the full $50,000. These thresholds haven’t been adjusted for inflation since 2013, so more taxpayers cross them each year.
Which Shares Are You Selling? Cost Basis Methods
When you sell only part of your position, you need a rule for identifying which shares went out the door. The IRS allows several, and the choice directly changes your tax.6Office of the Law Revision Counsel. 26 USC 1012 – Basis of Property-Cost
- Average cost adds up what you paid for every share and divides by the number of shares owned. Most mutual fund companies use this as the default. Simple, and workable if you’ve made many small purchases over the years.
- First in, first out (FIFO) treats the oldest shares as sold first. In a fund that has risen steadily, FIFO usually produces the largest gain because the oldest shares have the lowest basis. Those shares almost certainly qualify for long-term treatment, though.
- Specific identification lets you choose exactly which shares to sell. That’s the most control: pick higher-basis shares to shrink the gain, or pick shares held longer than a year to lock in long-term rates. The cost is bookkeeping. You have to identify the lot at the time of sale and keep records.
Once you pick a method for a given fund, you generally have to stick with it for that fund. If you’ve never thought about this, check your brokerage settings. The default is usually average cost, which may or may not be right for you.
Using Losses to Reduce What You Owe
Capital losses offset capital gains dollar for dollar. A $5,000 gain on one fund and a $3,000 loss on another leaves $2,000 to be taxed. Short-term losses offset short-term gains first, long-term losses offset long-term gains first, and any leftover crosses over.
If losses exceed gains for the year, you can deduct up to $3,000 of the excess against ordinary income ($1,500 if married filing separately).7Office of the Law Revision Counsel. 26 USC 1211 – Limitation on Capital Losses Anything beyond that carries forward indefinitely. A big loss year can shelter income for years afterward.
The Wash Sale Trap
Sell a fund at a loss and buy back a “substantially identical” fund within 30 days before or after the sale, and the IRS disallows the loss.8Office of the Law Revision Counsel. 26 USC 1091 – Loss From Wash Sales of Stock or Securities The disallowed loss gets added to the basis of the replacement shares, so the benefit is deferred rather than lost, at least in a taxable account.
What counts as “substantially identical” is not fully defined for mutual funds. Shares in the same fund clearly qualify. A fund from a different company with a different manager and strategy clearly doesn’t. Two index funds tracking the same benchmark are the gray zone; heavy overlap in holdings creates real risk. Switching between an S&P 500 fund and a total stock market fund is generally considered safe. Switching between two S&P 500 funds is not.
The rule applies across all your accounts, including IRAs. Sell a fund at a loss in your taxable account and buy it in your IRA within 30 days, and the loss is disallowed. Because IRAs don’t track basis the same way, the disallowed loss is permanently forfeited in that scenario rather than deferred.9Fidelity. Wash-Sale Rule: Avoid This Tax Pitfall
Watch automatic reinvestments too. If a fund reinvests a dividend within the 30-day window after your loss sale, that tiny purchase can wash part or all of the loss. Turn off automatic reinvestment on a fund before selling it at a loss.
You Can Owe Tax Without Selling
Mutual funds buy and sell securities inside the portfolio throughout the year. When the fund realizes a profit, it passes those gains through to shareholders as capital gains distributions, and you owe tax on them in the year they’re paid.10Internal Revenue Service. Mutual Funds (Costs, Distributions, etc.) 4 Reinvesting the distribution doesn’t change that.
These distributions are always treated as long-term capital gains, even if you’ve owned the fund only a few months.11Internal Revenue Service. Publication 550 – Investment Income and Expenses They appear in box 2a of Form 1099-DIV. Actively managed funds tend to distribute more than index funds because they trade more, which is one reason tax-conscious investors favor index or tax-managed funds in taxable accounts.
Retirement Accounts, Inherited Shares, and Gifts
Selling mutual fund shares inside a 401(k), traditional IRA, or Roth IRA does not trigger any current tax. You can rebalance or move to cash inside these accounts freely. What matters is what you eventually withdraw. Traditional 401(k) and IRA withdrawals are taxed as ordinary income regardless of whether the gains inside were short-term or long-term, and withdrawals before age 59½ typically carry a 10% penalty on top of income tax.12Office of the Law Revision Counsel. 26 USC 72 – Annuities; Certain Proceeds of Endowment and Life Insurance Contracts
Inherited shares get a stepped-up basis equal to the fund’s fair market value on the date the original owner died, not what they paid.13Office of the Law Revision Counsel. 26 USC 1014 – Basis of Property Acquired From a Decedent If a parent bought at $10,000 and the shares were worth $50,000 at death, your basis is $50,000. Inherited shares also automatically get long-term treatment.
Gifted shares are the opposite. When someone gives you shares during their lifetime, you inherit their original basis and holding period.14Office of the Law Revision Counsel. 26 USC 1015 – Basis of Property Acquired by Gifts and Transfers in Trust Same $10,000 purchase, gifted at $50,000: your basis stays $10,000. Sell for $52,000 and your gain is $42,000. Confusing inherited with gifted is an expensive mistake.
What You’ll Report and On Which Forms
Your brokerage sends Form 1099-B for each sale, showing the proceeds, the cost basis if tracked, and whether the gain is short- or long-term.15Internal Revenue Service. About Form 1099-B, Proceeds From Broker and Barter Exchange Transactions Capital gains distributions from funds you still hold come on Form 1099-DIV instead.
You report individual sales on Form 8949 and carry the totals to Schedule D of Form 1040.16Internal Revenue Service. About Form 8949, Sales and Other Dispositions of Capital Assets17Internal Revenue Service. About Schedule D (Form 1040), Capital Gains and Losses If every sale on your 1099-B already has basis reported to the IRS and you don’t need to adjust anything, you can skip Form 8949 and enter totals directly on Schedule D. Most mutual fund sales through major brokerages qualify.
State Tax
Federal is only part of the picture. Most states tax capital gains as ordinary income, with rates ranging from roughly 1% to more than 13%. A handful of states have no income tax. State tax rarely preserves the federal preferential rate for long-term gains, so a long-term federal gain may still be taxed at your full state rate. Build your state’s rate into any large sale decision before you pull the trigger.