Independent fund research. Built on SEC filings.

How we research funds

Tax calculator

Capital gains tax calculator: what you'll owe on a sale

Estimate the federal tax on selling a stock, mutual fund or ETF, whether it's a short- or long-term gain, including the 3.8% net investment income tax and your state tax.

After deductions, not counting this sale.

Total tax on this sale
$2,250
Your gain
$15,000
Federal capital gains tax
$2,250
Net investment income tax
$0
Effective rate on the gain
15.0%
What you keep from the sale
$22,750

Holding more than a year saves about $1,050 in federal tax versus short-term rates.

Breakdown
ItemAmount
Gain taxed at 0%$0
Gain taxed at 15%$15,000
Gain taxed at 20%$0
Federal capital gains tax$2,250
Net investment income tax (3.8%)$0
State tax$0
Total tax$2,250

Worked example

The short answer

Selling shares for $25,000 that cost $10,000 after more than a year gives a $15,000 long-term gain. For a single filer with $80,000 of other taxable income in 2026, the federal tax is about $2,250, all at the 15% rate. There's no net investment income tax at that income.

Holding more than a year saves about $1,050 in federal tax versus short-term rates. Long-term gains are taxed at 0%, 15% or 20%; short-term gains at ordinary rates up to 37%.

Updated Nov 18, 2026

How capital gains tax is calculated

Gain = sale price − cost basis (what you paid, plus reinvested dividends and commissions). Held one year or less, it's short-term and taxed like wages. Held more than a year, it's long-term.

Long-term gains are stacked on top of your other taxable income. The part of the gain that fits below the 0% threshold is tax-free, the part between the thresholds is taxed at 15%, and anything above the 20% threshold at 20%. That's why the same gain can be taxed differently for two people.

Net investment income tax: 3.8% on the smaller of the gain or the amount your modified AGI exceeds $200,000 (single) or $250,000 (joint). The calculator estimates MAGI as your taxable income plus the standard deduction plus the gain.

Losses offset gains first, then up to $3,000 of ordinary income a year, with the rest carried forward.

Long-term capital gains tax brackets

Taxable income thresholds for long-term capital gains rates
Filing status0% up to (2026)20% above (2026)0% up to (2027)20% above (2027)
Single$49,450$545,500$51,050$563,200
Married filing jointly$98,900$613,700$102,100$633,600
Head of household$66,200$579,600$68,350$598,400

Source: IRS Rev. Proc. 2025-32 and 2026-35

Income between the two thresholds pays 15%. Collectibles and some real-estate gains have different rates.

Federal income tax brackets, 2026 and 2027 (taxable income)
RateSingle 2026Married filing jointly 2026 Single 2027Married filing jointly 2027
10%$0–$12,400$0–$24,800 $0–$12,800$0–$25,600
12%$12,400–$50,400$24,800–$100,800 $12,800–$52,025$25,600–$104,050
22%$50,400–$105,700$100,800–$211,400 $52,025–$109,125$104,050–$218,250
24%$105,700–$201,775$211,400–$403,550 $109,125–$208,325$218,250–$416,650
32%$201,775–$256,225$403,550–$512,450 $208,325–$264,550$416,650–$529,100
35%$256,225–$640,600$512,450–$768,700 $264,550–$661,375$529,100–$793,650
37%Over $640,600Over $768,700 Over $661,375Over $793,650

Sources: IRS Rev. Proc. 2025-32 (IR-2025-103, Oct. 9, 2025); IRS Rev. Proc. 2026-35 (IR-2026-133, Nov. 5, 2026) .

Mutual fund distributions and ETF tax efficiency

With a mutual fund you can owe capital gains tax without selling anything. When the fund's manager sells holdings at a profit, the fund must distribute those net gains to shareholders, usually in December, and they're taxable in a regular brokerage account even if reinvested. Actively managed funds with high turnover tend to distribute the most.

Index funds trade less, so they distribute less. Most ETFs distribute little or nothing because they can hand low-basis shares to market makers through "in-kind" redemptions instead of selling them. If you hold funds in a taxable account, an ETF version of the same strategy is often more tax-efficient; our ETF equivalent finder can help. In an IRA or 401(k), distributions aren't taxed at all.

Capital gains tax FAQ

How much is capital gains tax?

Long-term gains (assets held more than a year) are taxed at 0%, 15% or 20% depending on your taxable income; most people pay 15%. Short-term gains are taxed as ordinary income, at rates up to 37%. High earners may also owe the 3.8% net investment income tax. In the example, a $15,000 long-term gain for a single filer with $80,000 of other taxable income costs about $2,250 in federal tax.

What are the 2026 capital gains tax brackets?

For 2026, the 0% rate applies to taxable income up to $49,450 for single filers ($98,900 married filing jointly). The 20% rate starts at $545,500 single ($613,700 joint). Income between those levels pays 15%. Your gain is stacked on top of your other income to find which rate applies.

Do I pay capital gains tax on mutual funds I didn't sell?

Possibly. Mutual funds must pass along net gains from their own trading as capital-gain distributions, usually in December, and you owe tax on them in a taxable account even if you reinvest. Index funds distribute less than actively managed funds, and most ETFs distribute little or nothing thanks to the in-kind redemption process, which is why ETFs are often more tax-efficient.

How can I reduce capital gains tax?

Hold for more than a year to get long-term rates, sell losing investments to offset gains (tax-loss harvesting), realize gains in low-income years when the 0% rate applies, give appreciated shares to charity, and hold tax-inefficient funds in IRAs or 401(k)s where there is no yearly tax.

What is the net investment income tax?

A 3.8% tax on investment income, including capital gains, for people with modified AGI above $200,000 (single) or $250,000 (married filing jointly). These thresholds aren't adjusted for inflation. The tax applies to the smaller of your investment income or the amount you are over the threshold.

Can capital losses offset ordinary income?

Yes, up to $3,000 a year ($1,500 if married filing separately) after offsetting all your gains. Unused losses carry forward to future years with no expiration.