How capital gains are taxed
Long-term gains are stacked on top: the part below the 0% breakpoint is taxed at 0%, up to the 15% breakpoint at 15%, and above at 20%
NIIT = 3.8% × min(gains, MAGI − threshold)
Short-term gains (assets held one year or less) are taxed like wages, at your ordinary brackets. Long-term gains (held more than one year) and qualified dividends get lower rates. Your ordinary income fills the brackets first, and the gains sit on top, which is why the same gain can be taxed at 0% for one person and 15% for another.
2026 long-term capital gains brackets
| Filing status | 0% up to | 15% up to | 20% above |
|---|---|---|---|
| Single | $49,450 | $545,500 | $545,500 |
| Married filing jointly | $98,900 | $613,700 | $613,700 |
| Married filing separately | $49,450 | $306,850 | $306,850 |
| Head of household | $66,200 | $579,600 | $579,600 |
Amounts are total taxable income, including the gains. The net investment income tax adds 3.8% on investment income above modified AGI of $200,000 (single, head of household), $250,000 (married filing jointly) or $125,000 (married filing separately). These thresholds are set in the law and aren't adjusted for inflation.
Worked example
A single filer earns $60,000 and sells stock held three years for a $20,000 gain. Taxable income is $80,000 − $16,100 = $63,900, of which $43,900 is ordinary income.
- 0% on $49,450 − $43,900 = $5,550 of the gain
- 15% on the other $14,450 = $2,167.50
Tax on the gain: $2,167.50, about 10.8% of it. No NIIT, because income is under $200,000.
Holding period
Start counting the day after you bought. The day you sell counts. Bought January 3, 2025: selling on January 3, 2026 is one year exactly, so short-term; selling January 4, 2026 or later is long-term. Inherited property is always long-term, and gifts usually carry over the giver's holding period.
What this calculator leaves out
- Collectibles (coins, art, precious metals) taxed at up to 28%, unrecaptured section 1250 gain on real estate depreciation taxed at up to 25%, and section 1202 small business stock. These need the full Schedule D worksheet, so they aren't modeled. Enter only gains taxed at 0/15/20%.
- Losses. Enter net gains. Capital losses offset gains first, and a net loss deducts up to $3,000 a year ($1,500 married filing separately) against other income, with the rest carried forward. Net them out yourself first.
- Other income is treated as ordinary and as your modified AGI for the NIIT, along with the gains. Interest and nonqualified dividends would add to net investment income.
- The senior deduction, credits, AMT and state tax aren't included. Home sales may qualify for a $250,000 / $500,000 exclusion first.
Sources
- IRS Rev. Proc. 2025-32 – §4.03: 2026 0% and 15% breakpoints; §4.01 brackets; standard deduction
- IRS Topic 409, Capital gains and losses – holding period, 25% and 28% rates, loss limits
- IRS Publication 550 – how to count the holding period
- 26 U.S.C. 1411 (net investment income tax) – 3.8% NIIT and its fixed thresholds
- IRS Topic 559, Net investment income tax