United States

Capital Gains Tax Calculator

Estimate 2026 US federal tax on a sale, other short- and long-term gains, and qualified dividends, including net investment income tax.

Investment sale — 2026

Holding period

Usually long-term means held more than one year; one year or less is short-term. Inherited assets have special rules.

Include acquisition costs and applicable basis adjustments.

Annual income and filing status

Filing status

Ordinary AGI excluding every gain, loss and qualified dividend entered here. Include nonqualified dividends. Assumes no foreign-income MAGI adjustments or other investment income subject to NIIT.

Defaults to the 2026 basic standard deduction for your status. Enter your applicable deduction; age/blindness additions and special deductions are not automatic.

Exclude the sale above. Enter losses and applicable short-term loss carryovers as negative amounts.

Exclude the sale above. Include applicable long-term loss carryovers. Losses are negative.

Qualified dividends use preferential rates, but are not capital gains for loss netting.

Estimated federal investment tax

Additional federal tax, including NIIT

Gain / loss on this sale
$20,000.00
Short-term result after netting
$0.00
Long-term result after netting
$20,000.00
Preferential income in 0% band
$0.00
Preferential income in 15% band
$20,000.00
Preferential income in 20% band
$0.00
Change in regular income tax
$3,000.00
Net investment income tax (3.8%)
$0.00
Net gains and dividends after tax
$17,000.00
Annual capital-loss deduction limit applied
$0.00
Estimated unused capital loss
$0.00
Estimated modified AGI
$100,000.00

Tax shown is the change versus the same ordinary income and deductions without these investments. A negative amount is an estimated tax reduction. The rate bands include qualified dividends.

IRS data checked: 2026-10-04. 2026 US federal estimate for ordinary investment assets. Excludes state tax, AMT, collectibles, depreciation recapture, home-sale exclusions and special stock rules.

About this tool

Selling stocks, funds or other investments for more than you paid creates a capital gain, and the federal tax on it depends on how long you held the asset, your filing status and your other income. This calculator estimates the extra 2026 US federal tax caused by one sale together with any other gains, losses and qualified dividends you enter, including the 3.8% net investment income tax (NIIT) when your income is high enough.

The result is the change in tax compared with the same year without these investments, so you see what the sale actually adds. Use it before selling to compare a short-term sale with waiting past the one-year mark, or to see how a realized loss offsets other gains. State tax and the special cases listed under the calculator are not included.

How gains are taxed

Sale proceeds less adjusted basis and selling fees give the gain or loss. Opposing short- and long-term results offset each other. Remaining short-term gains use ordinary brackets; remaining long-term gains and qualified dividends stack above ordinary taxable income in the 0%, 15% and 20% bands. Unused deductions reduce taxable investment income. The preferential calculation is capped at the ordinary tax on all taxable income.

G=P−B−FTNIIT=0.038min⁡(N,max⁡(0,M−H))G = P - B - F \qquad T_{NIIT}=0.038\min(N,\max(0,M-H))

Losses and the NIIT threshold

P is proceeds, B is basis and F is selling fees. Net losses can offset up to $3,000 of ordinary income ($1,500 if married filing separately); unused losses may carry forward. NIIT is 3.8% of the smaller of net investment income N or modified AGI M above threshold H: $200,000 for single/head of household, $250,000 for joint/surviving spouse and $125,000 for separate filers. This estimate assumes all entered gains and qualified dividends are subject to NIIT and no other NIIT income or expenses. Apply wash-sale and other basis adjustments before entering amounts.

Example

A single filer with $80,000 of other income and the $16,100 standard deduction sells shares for $30,000 that cost $10,000, after holding them for more than a year. The $20,000 long-term gain sits on top of $63,900 of ordinary taxable income. Because that ordinary income is already above the $49,450 top of the 0% band, the whole gain falls in the 15% band and adds $3,000 of federal tax, leaving $17,000 after tax.

If the shares had been held one year or less, the $20,000 would be a short-term gain taxed as ordinary income, all of it at 22% here, and the extra tax would be $4,400. With only $40,000 of other income, the same long-term gain fits entirely in the 0% band and adds no federal tax. At $220,000 of other income and a $40,000 long-term gain, modified AGI reaches $260,000, so $1,520 of NIIT is added to $6,000 of regular tax.

Frequently asked questions

How long do I need to hold an investment to get long-term rates?

Generally more than one year. Assets held one year or less produce short-term gains, which are taxed at ordinary income rates, while long-term gains use the 0%, 15% and 20% rates. Inherited assets and some other property follow special holding-period rules, so check IRS Topic 409 if your situation is unusual.

Will a capital gain push my salary into a higher tax bracket?

Long-term gains and qualified dividends are stacked on top of ordinary taxable income, so your wages are taxed at the same rates as before. The gain itself can be split across the 0%, 15% and 20% bands, and a large gain can raise modified AGI enough to trigger NIIT. Short-term gains work differently: they are added to ordinary income and taxed at your bracket rates.

How do capital losses reduce my tax?

Losses first offset gains of the same type, then gains of the other type. If a net loss remains, up to $3,000 ($1,500 if married filing separately) can reduce ordinary income each year, and the rest may carry forward. For a single filer with $80,000 of other income, an $8,000 long-term loss uses $3,000 this year, cuts federal tax by about $660 and leaves $5,000 to carry forward.

What is the net investment income tax?

NIIT is an extra 3.8% federal tax on investment income for higher earners. It applies to the smaller of your net investment income or the amount by which modified AGI exceeds $200,000 (single or head of household), $250,000 (married filing jointly or surviving spouse) or $125,000 (married filing separately). See IRS Topic 559 for the full rules.

Why might my actual tax bill be different?

The estimate covers 2026 federal tax on ordinary investment assets only. State income tax, the alternative minimum tax, collectibles, depreciation recapture, home-sale exclusions and special stock rules are left out, and deductions or credits that phase out with income are not modeled. Apply wash-sale and other basis adjustments before entering amounts, and confirm the final figures on your return or with a tax professional.

IRS sources

Link with your values

Add these parameters to this page’s address to open it with the values filled in, for example to share a calculation or to link to it from an AI assistant. The result is calculated in the browser: the page HTML shows an example for the default values, and the tool sets the data-url-params attribute once the link’s values are applied.

ParameterValueIf omitted
holding_periodHolding periodone of: long, shortdefault long
proceedsSale proceeds (USD)amount without a currency symbol; allowed 0–10000000required
cost_basisAdjusted cost basis (USD)amount without a currency symbol; allowed 0–10000000required
selling_costsSelling fees (USD)amount without a currency symbol; allowed 0–10000000counted as 0
filing_statusFiling statusone of: single, joint, separate, headdefault single
ordinary_income_yearlyOther income before deductions (USD)amount without a currency symbol; allowed 0–10000000required
deductionsStandard or itemized deductions (USD)amount without a currency symbol; allowed 0–10000000calculated by the tool
other_short_term_gainsOther net short-term gains / losses (USD)amount without a currency symbol; allowed -10000000–10000000counted as 0
other_long_term_gainsOther net long-term gains / losses (USD)amount without a currency symbol; allowed -10000000–10000000counted as 0
qualified_dividendsQualified dividends (USD)amount without a currency symbol; allowed 0–10000000counted as 0

Examples

  • ?proceeds=48000&cost_basis=21000&ordinary_income_yearly=95000
  • ?holding_period=short&proceeds=12000&cost_basis=9000&selling_costs=50&filing_status=joint&ordinary_income_yearly=140000&qualified_dividends=1800

Write decimals with a point. Encode a space as %20, + as %2B, # as %23 and & as %26.

Result elements: [data-result-block="capital_gains_tax_calculator"]