How capital gains are taxed
When you sell a stock, fund, crypto or other investment for more than you paid, the profit is a capital gain. How it's taxed depends on how long you held it:
- Short-term (one year or less): taxed as ordinary income, at 10% to 37%.
- Long-term (more than one year): taxed at 0%, 15% or 20%, depending on your total taxable income. Qualified dividends get the same rates.
Long-term capital gains brackets
The rate depends on where the gain lands in your taxable income. Gains fill the space above your other income, so part of a gain can be taxed at 0% and the rest at 15%.
| Filing status | 2026: 0% up to | 2026: 15% up to | 2027: 0% up to | 2027: 15% up to |
|---|---|---|---|---|
| Single | $49,450 | $545,500 | $51,050 | $563,200 |
| Married filing jointly | $98,900 | $613,700 | $102,100 | $633,600 |
| Head of household | $66,200 | $579,600 | $68,350 | $598,400 |
| Married filing separately | $49,450 | $306,850 | $51,050 | $316,800 |
Above the 15% limit, the rate is 20%. Amounts are taxable income (after deductions), from IRS Rev. Proc. 2025-32 and Rev. Proc. 2026-35.
Worked example
A single filer with $60,000 of wages sells shares held for three years at a $20,000 gain in 2027. Taxable income is $63,400. The first $7,650 of the gain fits under the 0% limit; the remaining $12,350 is taxed at 15%, for $1,853 of tax. Had the shares been held less than a year, the same gain would cost $3,538.
Losses
Losses offset gains first, short-term against short-term and long-term against long-term, then across. If losses are bigger than gains, up to $3,000 a year ($1,500 if married filing separately) comes off your other income, and the rest carries forward with no time limit.
The 3.8% net investment income tax
If your modified AGI is over $200,000 ($250,000 for joint filers, $125,000 married filing separately), an extra 3.8% applies to the smaller of your investment income or the amount you're over. These thresholds aren't adjusted for inflation.
Crypto
The IRS treats crypto as property, so selling, swapping or spending it follows these same rules. Crypto you earn by mining or staking is ordinary income when you receive it; see the crypto mining tax calculator.
Frequently asked questions
What is the capital gains tax rate for 2027?
Long-term gains are taxed at 0%, 15% or 20%. For a single filer, 0% applies up to $51,050 of taxable income and 15% up to $563,200; joint filers get 0% up to $102,100 and 15% up to $633,600. Short-term gains are taxed as ordinary income.
How long do I have to hold an investment for long-term rates?
More than one year. Count from the day after you bought it through the day you sold it.
How much capital loss can I deduct?
Losses first offset gains. If you have a net loss, up to $3,000 a year ($1,500 if married filing separately) can offset other income, and the rest carries forward to future years.
Do I pay capital gains tax if I reinvest the money?
Yes. Selling triggers the gain even if you buy something else right away. Sales inside a 401(k), IRA or HSA aren't taxed when they happen.
Sources
- IRS Rev. Proc. 2025-19 (2026 HSA limits)
- IRS Rev. Proc. 2025-32 (tax year 2026 inflation adjustments)
- SSA 2026 contribution and benefit base
- IRS Form 1040-ES
- IRS: 2026 standard mileage rate (72.5 cents, Jan–Jun)
- IRS Notice 2025-67: 2026 retirement plan limits
- IRS Rev. Proc. 2026-15: 2026 vehicle depreciation limits
- IRS Announcement 2026-11: 76 cents from July 1, 2026 (IRB 2026-29)
- IRS Rev. Proc. 2026-24 (2027 HSA limits)
- IRS Notice 2026-66 (2027 retirement plan limits)
- IRS Rev. Proc. 2026-35 (tax year 2027 inflation adjustments)
- SSA 2027 contribution and benefit base