Calculate your capital gains tax on stocks, real estate, or crypto. See short-term vs long-term rates, the 3.8% NIIT surcharge, primary residence exclusion, and net proceeds after tax.
Short-Term vs Long-Term Capital Gains: The Tax Difference
The IRS draws a hard line at one year. Hold an asset for more than 12 months and you qualify for preferential long-term rates. Sell earlier and the gain is taxed as ordinary income — potentially at rates twice as high as long-term rates.
2026 Long-Term Capital Gains Tax Rates
Rate
Single
Married Filing Jointly
Head of Household
0%
Up to $48,350
Up to $96,700
Up to $64,750
15%
$48,350 – $533,400
$96,700 – $600,050
$64,750 – $566,700
20%
Over $533,400
Over $600,050
Over $566,700
Plus 3.8% NIIT if MAGI exceeds $200,000 single / $250,000 married.
The Depreciation Recapture Trap
If you sell a rental property, any depreciation you claimed during ownership is subject to “depreciation recapture” — taxed at a maximum 25% rate, regardless of your bracket. Example: You bought a rental for $300,000 (land excluded), depreciated $50,000 over 10 years, and sold for $400,000. Your gain calculation: $400k sale price minus $250k adjusted basis (cost minus depreciation) = $150,000 gain. But $50,000 of that is taxed as recapture (max 25%), and only $100,000 qualifies for long-term capital gains rates.
Tax-Loss Harvesting: Turning Losses Into Tax Savings
If you hold positions that are down, selling them to realize losses offsets your capital gains. You can then immediately buy a similar (but not identical — wash sale rule) investment to maintain your market exposure. This strategy is most powerful in taxable brokerage accounts and near year-end. Keep track of your cost basis for every position — tax software can’t help you if you don’t have the records.
You must hold the asset for more than one year (366+ days) to qualify for long-term capital gains rates. The difference is substantial: short-term gains are taxed as ordinary income (up to 37%), while long-term gains are taxed at 0%, 15%, or 20% depending on your income. On a $50,000 gain, the difference between short-term (22% bracket) and long-term (15%) is $3,500 in tax savings — just by waiting a few more months.
If you've lived in your primary residence for at least 2 of the last 5 years, you can exclude $250,000 of gain from taxes (single) or $500,000 (married filing jointly). Example: You bought for $300,000, sell for $600,000 — that's a $300,000 gain. As a married couple, the entire gain is excluded. You don't even need to report it. The exclusion can be used once every 2 years. Depreciation you claimed if you ever rented the property is not excluded and is taxed at up to 25%.
The NIIT is an additional 3.8% tax on investment income (including capital gains) for high earners. It applies if your modified AGI exceeds $200,000 (single) or $250,000 (married joint) AND you have net investment income. This means your effective long-term capital gains rate is 18.8% (15%+3.8%) or 23.8% (20%+3.8%) at high income levels. The NIIT applies to dividends, interest, rental income, and capital gains — but NOT to wages or self-employment income.
Cryptocurrency is treated as property by the IRS. Every sale, trade, or use to purchase goods is a taxable event. Hold for over a year → long-term capital gains rates (0%/15%/20%). Hold for under a year → short-term rates (ordinary income, up to 37%). Mining income is taxed as ordinary income at receipt. Staking rewards are taxed as ordinary income. Crypto-to-crypto trades are taxable events — you can't defer by swapping Bitcoin for Ethereum. The IRS requires reporting on Form 8949.
Yes — capital losses offset capital gains dollar-for-dollar. If you have $30,000 in gains and $10,000 in losses, you only pay tax on $20,000. If your losses exceed gains, you can deduct up to $3,000 of net capital losses against ordinary income per year, carrying forward the remainder indefinitely. Tax-loss harvesting — deliberately selling losing positions to offset gains — is a legitimate strategy used by sophisticated investors to reduce their annual tax bill.