Capital Gains Tax Calculator
Estimate the federal tax on selling a stock, fund, or other asset — with 2026 long-term rates (0/15/20%), short-term ordinary rates, and the 3.8% NIIT for higher earners.
How this capital gains tax calculator works
When you sell an asset — stock, a fund, crypto, or property — for more than you paid, the profit is a capital gain, and the IRS taxes it. How much you owe depends on two things: how long you held the asset and how much other income you have. This calculator estimates your federal tax by combining both, and adds the 3.8% Net Investment Income Tax when it applies.
Your gain is simply the sale price minus your cost basis (what you originally paid, including commissions). The calculator then applies the right rate depending on whether the gain is long-term or short-term, and shows your after-tax proceeds.
Long-term vs. short-term: the one-year line
The single biggest factor in your capital gains tax is the holding period. Hold an asset for more than one year and the profit is a long-term gain, taxed at preferential rates of 0%, 15%, or 20%. Hold it for one year or less and it is a short-term gain, taxed as ordinary income at your regular marginal rate — which for many people is 22%, 24%, or higher. Selling even a day past the one-year mark can dramatically cut the tax, which is why the holding period matters so much.
2026 long-term capital gains rates
Long-term rates are not flat — the rate you pay depends on your total taxable income, and the gain stacks on top of your other income. For the 2026 tax year, a single filer pays:
- 0% on long-term gains while total taxable income stays under $49,450;
- 15% on income from there up to $545,500;
- 20% on anything above that.
Married-filing-jointly thresholds are higher ($98,900 and $613,700). Because the gain fills these bands on top of your other taxable income, a single sale can be partly taxed at 0% and partly at 15% — this calculator handles that band-by-band split for you.
The 3.8% Net Investment Income Tax (NIIT)
Higher earners owe an extra 3.8% NIIT on investment income, including capital gains. It kicks in when modified adjusted gross income exceeds $200,000 (single) or $250,000 (married filing jointly), and applies to the lesser of your net investment income or the amount over that threshold. The result is that some investors face an effective long-term rate of 18.8% or 23.8% rather than 15% or 20%. The calculator adds this automatically when your income crosses the line.
What this calculator does not include
To stay clear and broadly accurate, this tool estimates federal capital gains tax on a single sale. It does not model state capital gains tax (most states tax gains as ordinary income), the special 28% rate on collectibles, Section 1250 depreciation recapture on real estate, the home-sale exclusion, wash-sale rules, or the offsetting of gains with capital losses. For a sale with any of these features, or before making a decision, consult a tax professional and verify current rules at IRS Topic No. 409.
Planning a sale of vesting equity instead? Our RSU tax calculator handles the supplemental-withholding side, and the retirement calculator shows how tax-advantaged accounts let gains compound without an annual tax drag.