Capital Gains Tax in the US, Explained
When you sell an investment for more than you paid, you have a capital gain. How much tax you owe depends almost entirely on one number: how long you held it.
Short-term vs long-term — the only distinction that matters
Short-term gain: you held the asset for one year or less. Taxed as ordinary income — same brackets as your salary (up to 37%).
Long-term gain: you held it more than one year. Taxed at preferential rates: 0%, 15%, or 20%.
The holding period clock starts the day after you buy and ends the day you sell.
2024 long-term capital gains brackets
| Rate | Single (taxable income) | Married Filing Jointly |
|---|---|---|
| 0% | Up to $47,025 | Up to $94,050 |
| 15% | $47,025 – $518,900 | $94,050 – $583,750 |
| 20% | Over $518,900 | Over $583,750 |
"Taxable income" here includes the gain itself. A retiree with $60K of LTCG and no other income could owe zero federal tax on a chunk of those gains.
Cost basis is everything
Your gain = sale price − cost basis. Cost basis is what you paid, plus commissions and reinvested dividends. Brokers report basis on Form 1099-B for most assets, but always double-check — wrong basis is the #1 capital-gains return error.
The wash-sale rule
If you sell a stock at a loss and buy the same or substantially identical security within 30 days (before or after), the loss is disallowed. It gets added to the basis of the replacement shares instead. This rule applies across all your accounts — including your spouse's and your IRA.
Tax-loss harvesting in plain English
Losses offset gains dollar-for-dollar. If you have $10,000 of gains and $4,000 of harvested losses, you're only taxed on $6,000. Excess losses up to $3,000/year can offset ordinary income; anything beyond that carries forward indefinitely.
Net Investment Income Tax (NIIT)
An extra 3.8% applies to investment income (including capital gains) above $200K single / $250K MFJ. Easy to forget; built into our Capital Gains Calculator.
Special cases worth knowing
- Primary home: Up to $250K single / $500K MFJ of gain is excluded if you lived there 2 of the last 5 years.
- Collectibles (art, coins, precious metals): taxed at up to 28%, not the LTCG brackets.
- Crypto: taxed exactly like stocks. Every sale, swap, and purchase with crypto is a taxable event.
Run your own numbers
Use our free, in-browser calculators — no signup, no data collection.
Open the calculators