PennyCompass

Capital Gains Tax Calculator 2026

Free capital gains tax calculator for tax year 2026. Computes federal LTCG (0/15/20%) and STCG, plus Net Investment Income Tax (NIIT) for high earners.

Published

Compute federal tax owed on capital gains, including both short-term and long-term rates and the Net Investment Income Tax for high earners.

Excluding capital gains.

Total capital gains tax

LTCG tax

STCG tax (ordinary rate)

NIIT (3.8% if applicable)

Effective rate on gains

Worked example

Take a single filer with $90,000 of ordinary income who sells a long-held investment for a $30,000 long-term capital gain and has no short-term gains. Long-term gains stack on top of ordinary income to decide which capital-gains band they fall in. For 2026 single filers, the 0% band runs up to $48,350 and the 15% band up to $533,400. Because the $90,000 of ordinary income already fills the 0% band, the entire $30,000 gain lands in the 15% band, so the long-term tax is $30,000 times 15%, which is $4,500. There are no short-term gains, so nothing is taxed at ordinary rates here. The Net Investment Income Tax only applies once modified income tops $200,000 for a single filer, and total income here is $120,000, so no NIIT is owed. Total tax on the gain is $4,500, an effective rate of 15%, leaving $25,500 after tax.

Item Amount
Ordinary income (stacking base)$90,000
Long-term capital gain$30,000
LTCG rate that applies15%
Long-term capital gains tax$4,500
NIIT (income below $200k)$0
After-tax proceeds on gain$25,500
Tax vs kept on a $30,000 long-term gain Kept $25,500 After-tax proceeds: $25,500 (85%) Capital gains tax: $4,500 (15%)

How it is calculated

The United States taxes long-term and short-term capital gains very differently. Assets held more than a year qualify for preferential long-term rates of 0%, 15%, or 20%, with the band determined by stacking the gain on top of your ordinary income. Assets held a year or less are short-term and are taxed at your ordinary marginal income-tax rate, which the tool finds by measuring the extra income tax those gains add to your return. On top of either, high earners may owe the 3.8% Net Investment Income Tax once modified adjusted gross income exceeds $200,000 single or $250,000 joint, applied to the lesser of net investment income or the amount over the threshold. The effective rate shown is total tax divided by total gains, which blends the long-term, short-term, and NIIT pieces. State capital-gains tax is not included.

Frequently asked questions

Short-term vs long-term capital gains?
Short-term: held 1 year or less. Taxed at ordinary income rates (10-37%). Long-term: held more than 1 year. Taxed at preferential rates (0%, 15%, or 20% depending on income).
What are the 2026 LTCG brackets?
For single filers: 0% on LTCG up to $48,350 taxable income, 15% from $48,350 to $533,400, 20% above $533,400. For MFJ: 0% up to $96,700, 15% to $600,050, 20% above.
What is NIIT?
Net Investment Income Tax: 3.8% additional tax on investment income (including capital gains) above $200K MAGI (single) or $250K (MFJ). High earners often pay 23.8% effective on LTCG (20% + 3.8% NIIT).
Can I offset gains with losses?
Yes. Capital losses offset capital gains dollar-for-dollar. Excess losses can offset up to $3,000 of ordinary income per year ($1,500 MFS) and carry forward indefinitely.

Related calculators

Sources

  1. IRS Publication 15-T (2026) — Federal Income Tax Withholding Methods, Internal Revenue Service
Embed this calculator on your site (free)

Paste this code into your page. The calculator stays up to date automatically and links back to PennyCompass.

Calculator by PennyCompass