Snowballr provides financial education, not investment advice. Verify any advisor on FINRA BrokerCheck.
Snowballr
More
GuidesProtect your moneyScenariosEmbed on your site
Free · No sign-up required
Investments · 2026 federal + state + NIIT

Capital gains tax calculator

Long-term vs short-term holding, with NIIT 3.8% surtax and state tax. The holding-period decision is one of the most expensive lines in personal finance.

Last reviewed May 22, 2026Fact-checked against primary sourcesEditorial standards
Built from: IRS · FINRA · SEC · BLS · Federal Reserve · Freddie Mac · Methodology & sources
The 1-year deadline that matters most

A $15,000 gain in the 22% bracket: $3,300 federal tax if sold at day 364 (short-term, ordinary income). $2,250 federal tax if sold at day 366 (long-term, 15%). One day later → $1,050 saved. The first thing to check before any stock sale is the holding period.

2026 long-term capital gains brackets

RateSingle income up toMFJ income up to
0%$48,350$96,700
15%$533,400$600,050
20%above $533,400above $600,050

The LTCG brackets stack on top of your ordinary income. So a single filer with $85K wage income + $20K long-term gain pays 15% on the gain (since $85K + part of the gain crosses into the 15% LTCG band).

The 0% bracket is the most underused tax optimization

Retirees in a low-income year, or anyone in a sabbatical year between jobs, can sell appreciated stock with $0 federal tax on the gain as long as total taxable income stays under the 0% threshold. Then immediately rebuy to reset cost basis higher (the wash-sale rule only applies to losses, not gains). This "tax-gain harvesting" is the inverse of tax-loss harvesting, and it's almost never used because it requires intentionally low income.

Tax-loss harvesting

Sell losers to offset gains. Losses first match same-type gains (short vs short, long vs long), then cross-type, then up to $3,000/yr against ordinary income. Unused carries forward forever. The catch: wash-sale rule. If you repurchase the same or "substantially identical" security within 30 days before or after the loss sale, the IRS disallows the loss. Workaround: swap into a different index fund tracking a similar (not identical) index — e.g., sell VTI, buy ITOT or SCHB instead.

NIIT (Net Investment Income Tax)

An additional 3.8% surtax on investment income (gains, dividends, interest, rental) when modified AGI exceeds $200K single / $250K MFJ / $125K MFS. It's not progressive — it applies to all investment income once you cross the threshold. A top earner faces 20% LTCG + 3.8% NIIT + state = 23.8% to ~37% federal + state on long-term gains.

Related calculators