Key takeaways
- Short-term gains are taxed as ordinary income at your marginal rate; long-term gains get 0%, 15%, or 20% rates.
- For single filers in 2026, long-term gains are tax-free while taxable income stays below $49,450.
- Gains stack on top of ordinary income, so a single sale can be taxed partly at 0% and partly at 15%.
- The 3.8% net investment income tax applies above $200,000 of MAGI for single filers and $250,000 for married filers.
- State income tax applies on top and usually taxes gains at ordinary rates.
Short-term versus long-term
The holding period decides the rate. An asset held for more than one year produces a long-term gain, which qualifies for the preferential capital gains brackets. An asset held for one year or less produces a short-term gain, which is taxed like wages, interest, or business income.
That single difference can double the tax. A single filer with $90,000 of other income is in the 22% bracket; the same $25,000 gain is taxed at 15% if long-term and about 22% if short-term. Waiting a few weeks to cross the one-year mark is often worth more than chasing a slightly better sale price.
How gains stack on ordinary income
The long-term brackets apply to taxable income, not to the gain alone. The IRS first calculates tax on ordinary income, then adds the long-term gain on top. The gain fills whatever space remains in the 0% bracket before spilling into 15% and then 20%.
Example: $90,000 of other income, the $16,100 standard deduction, and a $25,000 long-term gain. Ordinary taxable income is $73,900, which already exceeds the $49,450 zero-bracket ceiling, so the entire gain is taxed at 15% and the federal tax is $3,750. If ordinary income were $40,000, part of the gain would fall in the 0% bracket and the tax would be much lower.
The 2026 long-term brackets
For single filers in 2026, long-term gains are taxed at 0% up to $49,450 of taxable income, at 15% from there to $545,500, and at 20% above that. Married filing jointly doubles most of these thresholds: 0% to $98,900 and 15% to $613,700. Head of household uses $66,200 and $579,600.
Short-term gains do not use these brackets at all. They are added to ordinary income and taxed through the standard 10%, 12%, 22%, 24%, 32%, 35%, and 37% brackets. The calculator reports the short-term tax separately so the two effects are visible.
The 3.8% net investment income tax
A surtax of 3.8% applies to the smaller of your net investment income or the amount by which modified AGI exceeds $200,000 for single filers, $250,000 for married filing jointly, or $200,000 for head of household. The thresholds are not indexed, so more filers cross them each year.
The tax is calculated on investment income, which includes capital gains, dividends, interest, rent, and royalties. Wages are not investment income, but they count toward the MAGI threshold. That is why a high salary plus a modest gain can trigger the surtax. The calculator adds the NIIT to the total tax on gains.
Planning around the brackets
Because the 0% bracket is a fixed amount of taxable income, the space can be used deliberately. A retiree drawing from savings can realize gains tax-free up to the ceiling each year. An investor with a large gain can spread sales across tax years to stay under a threshold.
Two cautions. First, realizing gains can push ordinary income into a higher bracket indirectly by increasing AGI, which affects credits, Medicare premiums, and the NIIT threshold. Second, tax-loss harvesting can offset gains, but the wash-sale rule blocks a loss if you repurchase the same security within 30 days.
The calculator does not model credits, itemized deductions, or the alternative minimum tax. Use it to compare scenarios, then confirm the final number with tax software or a preparer.
Frequently asked questions
Do I pay capital gains tax when I sell my home?
Usually not. A primary residence sale qualifies for an exclusion of up to $250,000 of gain for single filers and $500,000 for married couples, provided you owned and lived in the home for two of the last five years. Gains above the exclusion are taxed, and depreciation taken after 1997 is recaptured at up to 25%.
What is the difference between a realized and unrealized gain?
An unrealized gain exists on paper while you still hold the asset; it is not taxed. A realized gain occurs when you sell, and that is when the tax is triggered. The calculator works with realized gains, because those are the amounts that appear on your return.
Can capital losses reduce the tax?
Yes. Capital losses first offset capital gains of the same type, then the other type, and up to $3,000 of ordinary income per year. Excess losses carry forward. The calculator does not accept negative inputs, so net out losses before entering the gain.
Are long-term gains always taxed at a lower rate?
Not always. If your ordinary taxable income is already above the 15% ceiling, long-term gains are taxed at 20%. Very high-income filers can also owe the 3.8% NIIT, which brings the top effective rate on long-term gains to 23.8%. For most middle-income filers, however, the long-term rate is lower than the ordinary rate.
Sources
- IRS — Topic 409, capital gains and losses
- IRS — Publication 550, investment income and expenses
- IRS — Net investment income tax
Primary sources used for rates, rules, and definitions.