US capital gains: long-term, short-term, NIIT & harvesting
The 0/15/20% rates, the unindexed 3.8% NIIT, qualified dividends, the wash-sale rule and tax-loss harvesting.
Capital gains are the most rate-sensitive part of the US tax code: a single calendar day separates ordinary income from preferential 0/15/20% rates, and a quietly-frozen $200,000 threshold drags more taxpayers into an extra 3.8% surcharge every year. Used well, the same rules are an extraordinary planning tool. Used badly, they're an expensive surprise.
Long-term versus short-term
Assets held more than one year qualify for the long-term capital gains (LTCG) rates of 0%, 15% or 20%. Held a year or less, the gain is short-term and taxed at your ordinary marginal rate up to 37%. The holding period starts the day after you buy and includes the sale day.
| Rate | Single | MFJ | HoH |
|---|---|---|---|
| 0% | $49,450 | $98,900 | $66,200 |
| 15% | $545,500 | $613,700 | $579,600 |
| 20% | above $545,500 | above $613,700 | above $579,600 |
The Net Investment Income Tax
Qualified dividends
Dividends that meet the IRS's 60-day holding period test (60 days within a 121-day window starting 60 days before ex-dividend) get the same 0/15/20% rates as LTCG. Dividends that fail the test — often because you traded around the ex-date — are taxed as ordinary income, an expensive surprise for active traders.
The wash-sale rule
Sell a security at a loss and buy back a substantially identical one within 30 days before or after — including the same fund in your spouse's account or your IRA — and the loss is disallowed. The disallowed loss is added to the new lot's cost basis (so you eventually get it back), and the holding period “tacks” onto the new lot. But under Rev. Rul. 2008-5, when the replacement is bought in your IRA, the loss is permanently disallowed— there's no basis step-up inside the IRA to recover it later.
Tax-loss harvesting
Realize losses to offset gains. The order matters: short-term losses first net against short-term gains, and long-term losses against long-term gains, before cross-netting. Net losses then offset up to $3,000 of ordinary income a year ($1,500 if married filing separately), and the rest carries forward indefinitely.
To stay invested while harvesting, pair the loss with a non-identical replacement— e.g., sell an S&P 500 ETF and buy a total-stock-market ETF. Different enough to dodge the wash-sale rule, similar enough to keep your market exposure.
Done methodically, harvesting can save several thousand dollars a year in a market that's done essentially nothing.
Cost-basis methods
- FIFO is the IRS default: first lots in, first lots out.
- Specific identification lets you nominate which lots to sell — typically the highest-basis ones (HIFO) to minimize gains or maximize losses. You must elect it at or before the trade.
- Average cost is available for mutual funds — once chosen, hard to switch.
The special rate categories
- Unrecaptured §1250 gain on rental real estate (depreciation recapture): max 25%.
- Collectibles — art, antiques, gold bullion, gems: max 28%.
- Qualified Small Business Stock (§1202): up to 100% exclusion on qualifying C-corp shares held five years.
A worked example
Maya is single with $250,000 of ordinary income and a portfolio that realised $50,000 of long-term gains and $10,000 of long-term losses this year.
| Step | Amount |
|---|---|
| Net long-term gain ($50k − $10k) | $40,000 |
| × 15% LTCG rate | $6,000 |
| + NIIT 3.8% × lesser of NII or excess MAGI | $1,520 |
| Total federal tax on the gain | $7,520 (≈ 18.8%) |
State tax sits on top. If Maya lived in California, the same gain could cost an additional ~$5,000.
Carried interest
Investment-fund sponsors' carried-interest stakes must be held three years for any gain to qualify as long-term — the TCJA rule, preserved by OBBBA. Held less than that, the gain is taxed as ordinary income at up to 37%. Held three years or more, it falls to 20% LTCG (plus 3.8% NIIT where it applies).
Sources & further reading
This guide is general information, not personal tax advice, and reflects the rules we believe to apply as at June 2026 — rates and thresholds change. Always check your own figures against the IRS and consider a qualified adviser before acting. You remain responsible for the accuracy of anything you file.
Run scenarios on your gains
Model LTCG, NIIT and harvesting moves alongside your federal + state liability in AI TaxPilot.
Start freeFrequently asked questions
What are the long-term capital gains tax rates?
0%, 15% or 20% depending on your taxable income — far lower than ordinary rates. Assets held a year or less are short-term and taxed at your ordinary income rate.
What is the Net Investment Income Tax?
An extra 3.8% on investment income for higher earners (MAGI over $200,000 single / $250,000 married filing jointly), stacking on top of the capital-gains rate. Its thresholds are not adjusted for inflation.
What is the wash-sale rule?
It disallows a loss if you buy a substantially identical security within 30 days before or after the sale. A loss triggered in an IRA is permanently disallowed; crypto is currently exempt.
How does tax-loss harvesting work?
You realise losses to offset capital gains and up to $3,000 of ordinary income a year, carrying any excess forward — while steering clear of the wash-sale rule.