Capital Gains Tax Calculator

What you owe in federal tax when you sell an investment at a profit in 2026. The tax depends on how long you held it and on your other income, so the calculator works out the extra tax the sale adds to your return, including the 3.8% net investment income tax.

Updated Oct 1, 20262026 brackets, IRS Rev. Proc. 2025-32Runs in your browser, nothing is sent

The sale

$
$
fees, commissions, improvements
$
Held for

Your other income

$
this year + carryover
$
optional
%

Most states tax capital gains as ordinary income at your state rate; nine states have no income tax on them, and a few tax them at lower rates. Enter your state's marginal rate to include it.

Tax on this sale
$0

Taxable gain
$0
Rate on the gain
0%
all taxes ÷ gain
You keep
$0
sale price minus costs and tax
If held the other way
$0

How the gain is taxed

Ways to pay less

2026 long-term capital gains rates

Gains on assets held for more than a year are taxed at 0%, 15% or 20%, depending on your total taxable income including the gain. The gain is stacked on top of your other income, so the brackets fill from your wages upward.

RateSingleMarried filing jointlyHead of household
0%up to $49,450up to $98,900up to $66,200
15%to $545,500to $613,700to $579,600
20%above $545,500above $613,700above $579,600

Thresholds are taxable income, after the standard deduction of $16,100 for single filers and $32,200 for married couples. Short-term gains, on assets held a year or less, are taxed as ordinary income at your regular rate, from 10% to 37%. A few kinds of gain have their own rates: up to 28% on collectibles such as art, coins and precious metals, and up to 25% on depreciation recaptured when you sell rental property.

The 3.8% net investment income tax

On top of the capital gains rate, a 3.8% tax applies to investment income when your modified adjusted gross income is above $200,000 single, $250,000 married filing jointly or $125,000 married filing separately. It is charged on the smaller of your investment income or the amount you are over the threshold. These thresholds are not indexed for inflation, so more people reach them every year. The top federal rate on long-term gains is therefore 23.8%.

A worked example

A single filer earning $70,000 sells shares bought for $20,000 for $50,000. Their taxable income before the sale is $53,900, already above the 0% band, so the whole $30,000 gain is taxed at 15%: $4,500. Had they sold within a year, the gain would be ordinary income in the 22% bracket: $6,600. Waiting past the one-year mark saves $2,100.

The 0% rate is worth planning for. A single filer with $40,000 of wages has $23,900 of taxable income, so up to $25,550 of long-term gains fits under the $49,450 line and is taxed at nothing. Retirees and people between jobs can often sell gains tax-free in a low-income year.

Selling your home

If you owned and lived in your main home for at least two of the five years before the sale, up to $250,000 of the gain is tax-free, or $500,000 for a married couple filing jointly. Your cost includes what you paid, buying costs and the cost of improvements such as a new roof or an addition, which lowers the taxable gain. You can use the exclusion once every two years.

Losses and harvesting

Capital losses offset capital gains first. If losses are larger than gains, up to $3,000 a year ($1,500 married filing separately) can be deducted against other income, and the rest carries forward to future years with no time limit. Selling losing positions before year end to offset gains is called tax-loss harvesting. Watch the wash-sale rule: a loss is disallowed if you buy the same or a substantially identical security within 30 days before or after the sale.

Questions people ask

How long do I need to hold to get the long-term rate?

More than one year: from the day after you bought it to the day you sell, inclusive. Shares bought on March 3, 2025 qualify if sold on March 4, 2026 or later.

Is crypto taxed as a capital gain?

Yes. The IRS treats cryptocurrency as property, so selling, swapping one coin for another or paying for something with crypto is a taxable sale, with the same short- and long-term rules.

Do I pay capital gains tax if I reinvest the money?

Yes, in a regular brokerage account the gain is taxed when you sell, whatever you do with the proceeds. Inside a 401(k) or IRA there is no tax on sales; you are taxed on withdrawals instead, or not at all in a Roth.

Do dividends count?

Qualified dividends are taxed at the same 0%, 15% and 20% rates as long-term gains, and count toward the 3.8% NIIT. Ordinary dividends are taxed like wages.

What about state tax?

Most states tax gains as regular income. Washington has a separate tax on large long-term gains, and several states, including Alaska, Florida, Nevada, South Dakota, Tennessee, Texas and Wyoming, have no tax on them at all.