CalcWisp

Capital Gains Calculator

Enter what you paid, what you sold for and your other income to estimate the federal tax on the gain, using 2026 brackets.

Free, no sign-upRuns in your browserHow we calculate

$
$
$
$

Taxable income after deductions, before this gain.

Estimated federal tax on the gain
$2,250
15% of a $15,000 gain · $12,750 kept after tax
Capital gain
$15,000
Capital gains tax
$2,250
Net investment income tax (3.8%)
$0
Gain after tax
$12,750
2026 federal brackets
RatePart of gainTax
15%$15,000$2,250
How this was calculated
  1. Gain = sale 25000 − purchase 10000 − costs 0 = 15000.
  2. Long-term gain stacked on top of 60000 taxable income, with 2026 thresholds 49450 (0%) and 545500 (15%).

Federal estimate only: state tax, the collectibles and real-estate rules, and loss carryovers are not included. Educational, not tax advice.

Capital Gains Calculator · free on CalcWisp

How capital gains tax is calculated

This capital gains calculator starts with your gain: sale price minus purchase price minus selling costs. If you held the asset for one year or less, the gain is short-term and taxed like ordinary income at your bracket. If you held it longer, it is a long-term gain taxed at 0%, 15% or 20% depending on your total taxable income. Sources: IRS Topic 409 and Rev. Proc. 2025-32 for the 2026 thresholds.

The 2026 long-term rates

For a single filer the 0% rate applies up to $49,450 of taxable income, 15% up to $545,500 and 20% above that. For married couples filing jointly the limits are $98,900 and $613,700, and for heads of household $66,200 and $579,600. The gain is stacked on top of your other income, so one sale can be split across brackets. Example: a single filer with $40,000 of taxable income sells shares for a $20,000 gain. The first $9,450 is taxed at 0% and the remaining $10,550 at 15%, a tax of $1,582.50.

The 3.8% net investment income tax

Higher earners also owe the net investment income tax of 3.8% on the lesser of their investment income and the amount their modified adjusted gross income exceeds $200,000 (single or head of household) or $250,000 (married filing jointly). A $100,000 gain for a single filer with $600,000 of other income pays 20% ($20,000) plus 3.8% ($3,800), $23,800 in total (IRS Topic 559).

What this estimate leaves out

State income tax, the higher rates on collectibles, the special rules for selling a home (up to $250,000 or $500,000 of gain can be excluded), and capital losses carried forward are not included. Losses offset gains and up to $3,000 of other income a year. To project what an investment could earn before tax, try the ROI calculator or the compound interest calculator.

Frequently asked questions

What are the long-term capital gains tax rates for 2026?

0%, 15% or 20% depending on taxable income. For a single filer the 0% rate goes up to $49,450 and the 15% rate up to $545,500; married filing jointly it is $98,900 and $613,700.

How is a short-term capital gain taxed?

A gain on an asset held one year or less is taxed as ordinary income at your regular bracket, from 10% to 37%.

What is the net investment income tax?

A 3.8% tax on investment income for single filers with modified AGI above $200,000 and joint filers above $250,000, applied to the lesser of the investment income and the excess.

How do I calculate my capital gain?

Gain = sale price − purchase price (cost basis) − selling costs such as fees. A negative result is a capital loss.

Can capital losses reduce my tax?

Yes. Losses first offset capital gains, then up to $3,000 of ordinary income per year, with any remainder carried forward.

Related tools