What Is Capital Gains Tax?
When you sell stocks, crypto, real estate, or other property for more than you paid, the profit is a capital gain. The IRS generally taxes that gain when you realize it—at sale—not while you hold the asset. Your cost basis is usually what you paid plus certain fees; proceeds are what you receive when you sell.
Capital Gain = Sale Proceeds − Cost Basis (simplified)
This guide covers federal rules for individual investors. State taxes, the 3.8% Net Investment Income Tax (NIIT), and complex situations like wash sales or multiple tax lots need professional review.
Short-Term vs Long-Term Capital Gains
Holding period is the main fork in US federal treatment:
- Short-term (≤ 1 year): Taxed as ordinary income at your marginal bracket (10%–37% for 2024 federal rates, depending on income).
- Long-term (> 1 year): Qualifies for preferential rates—typically 0%, 15%, or 20% for most securities (collectibles and some real estate have special rules).
Selling one day before versus one day after the one-year mark can change which rate schedule applies. Track purchase dates carefully, especially for volatile assets like crypto.
How to Calculate Your Gain
- Record your purchase price and any buying fees.
- Record your sale price and selling fees.
- Subtract cost basis from proceeds to get the capital gain (or loss).
- Determine whether the holding period is short-term or long-term.
- Apply the appropriate federal rate based on income and holding period.
Use our free capital gains tax calculator to run a single-sale federal estimate with 2024 bracket assumptions. For many crypto transactions, see our crypto tax calculator for FIFO/LIFO lot matching.
2024 Federal Rate Overview
Long-term capital gains rates for 2024 depend on taxable income thresholds (single filer examples from IRS guidance):
| Rate | Typical income range (single) |
|---|---|
| 0% | Up to ~$47,025 taxable income |
| 15% | ~$47,026 – $518,900 |
| 20% | Above ~$518,900 |
Thresholds change annually and vary by filing status. Verify current IRS Publication 550 or speak with a CPA before filing.
What Basic Estimates Miss
- State and local capital gains taxes
- 3.8% Net Investment Income Tax (NIIT) for higher earners
- Capital loss offsets and $3,000 ordinary income offset rules
- Wash sale adjustments for securities
- Alternative Minimum Tax (AMT)
- Multiple tax lots and partial sales
Next Steps
Use a calculator for planning, then confirm with a qualified tax professional before selling large positions or filing. Keep brokerage 1099-B statements, purchase confirmations, and wallet export history for audit-ready records.