Sell an appreciated asset — stocks, mutual funds, real estate, a stake in a business — and capital gains tax comes into play. How long you held the asset changes everything about the bill: short-term gains are taxed as ordinary income at rates up to 37%, while long-term gains enjoy preferential rates of 0%, 15%, or 20%. Understanding which bucket your sale falls into, and how the brackets stack, can meaningfully change how much of a gain you keep.
Short-Term vs. Long-Term: One Year Is the Line
Assets held one year or less produce short-term gains, which are folded into your ordinary income and taxed at the regular 10%–37% brackets — no special treatment at all. Assets held longer than one year — at least a year and a day from purchase to sale — qualify as long-term and use the special, generally much lower rates below. The holding period is calculated from the day after purchase through the day of sale.
2026 Long-Term Capital Gains Brackets
| Rate | Single | Married Filing Jointly | Head of Household |
|---|---|---|---|
| 0% | Up to $49,450 | Up to $98,900 | Up to $66,200 |
| 15% | $49,451 – $545,500 | $98,901 – $613,700 | $66,201 – $579,600 |
| 20% | Over $545,500 | Over $613,700 | Over $579,600 |
How Gains Stack on Top of Ordinary Income
To find your long-term rate, first tally your ordinary taxable income, then stack the capital gain on top of it — the gain doesn't get its own separate bracket calculation from zero. Example: a Single filer with $40,000 of ordinary taxable income and a $20,000 long-term gain. The 0% bracket runs to $49,450, leaving $9,450 of room above the $40,000 of ordinary income, so $9,450 of the gain is tax-free and the remaining $10,550 is taxed at 15%.
Second example: a Single filer with $520,000 of ordinary taxable income realizes a $50,000 long-term gain. Since their ordinary income already exceeds the $49,450 and $545,500 thresholds' lower bound, the first $25,500 of the gain (up to the $545,500 mark) is taxed at 15%, and the remaining $24,500 is taxed at 20% — illustrating how a single large sale can straddle two capital gains brackets at once.
Qualified Dividends Get the Same Treatment
Qualified dividends — generally, dividends from US corporations and many foreign companies that meet IRS holding-period requirements — are taxed at these same 0%/15%/20% long-term capital gains rates rather than as ordinary income. Non-qualified (ordinary) dividends do not get this treatment and are taxed at your regular income tax rates.
Watch for the NIIT
High-income investors may also owe the 3.8% Net Investment Income Tax (NIIT) when Modified AGI exceeds $200,000 (Single) or $250,000 (Married Filing Jointly). The NIIT applies on top of the regular capital gains rate, so a filer in the 20% bracket who also owes NIIT faces a combined 23.8% federal rate on the affected gains. This calculator does not currently model the NIIT, so add it yourself if your income is above those thresholds.
Tax-Loss Harvesting and the Wash-Sale Rule
Selling positions at a loss can offset gains dollar for dollar, and up to $3,000 of net capital loss beyond that can offset ordinary income each year, with any excess carried forward to future years indefinitely. The catch is the wash-sale rule: buying a "substantially identical" security within 30 days before or after the sale that generated the loss disallows the loss for tax purposes that year, deferring it instead.
Cost Basis Sets Your Gain
Your taxable gain is the sale price minus your cost basis — generally what you originally paid, adjusted for reinvested dividends, stock splits, or improvements (for real estate). Keeping accurate basis records, especially for assets held many years or acquired in pieces (like dividend reinvestment purchases), avoids overpaying tax on a sale down the road.
💡 Planning to sell a winning position that's just short of the one-year mark? Holding it a little longer to cross into long-term status can cut the tax rate on the profit from as high as 37% down to 15%, or even 0% — often the single highest-leverage tax-timing decision an individual investor can make.
Selling Your Home: A Much Larger Exclusion
Long-term capital gains rules apply to a primary residence sale too, but with a major exception layered on top: if you owned and lived in the home as your primary residence for at least 2 of the 5 years before the sale, you can exclude up to $250,000 of gain (Single) or $500,000 (Married Filing Jointly) from tax entirely — no 0%/15%/20% bracket math needed for gain below that threshold. Only the portion of gain above the exclusion is taxed under the regular long-term capital gains rules described above.
Inherited and Gifted Assets Get Different Basis Rules
These two situations are easy to mix up but work very differently:
- Inherited assets generally receive a "stepped-up" basis equal to fair market value on the date of death — built-in gains that accrued during the deceased's lifetime disappear entirely for tax purposes, which is why heirs who sell inherited property soon after often owe little or no capital gains tax.
- Gifted assets carry over the giver's original cost basis rather than resetting — if your parent bought stock for $5,000 and gifts it to you when it's worth $30,000, your basis for a future sale is still generally $5,000, not $30,000.
Tax-Loss Harvesting: A Worked Example
An investor has a $12,000 long-term gain from one position and a $9,000 long-term loss available in another. Selling both in the same year nets to a $3,000 taxable gain instead of $12,000 — cutting the capital gains bill by roughly three-quarters in this example, assuming no wash-sale violation. If the loss position instead totaled $15,000, the investor could offset the entire $12,000 gain, use the standard $3,000 annual limit against ordinary income, and carry any further remainder forward — indefinitely into future years.