TaxChapter 65 min read

Capital Gains Tax — Stocks, ETFs, Crypto, and Real Estate Sales

O
OIYO EditorialContributor
6/10

What Is Capital Gains Tax?

When you sell an asset for more than you paid for it, the profit is a capital gain — and it’s taxable. The tax rate depends on how long you held the asset.

Capital Gain=Amount RealizedAdjusted Basis\text{Capital Gain} = \text{Amount Realized} − \text{Adjusted Basis}
  • Amount Realized: sale price minus selling costs (commissions, closing costs)
  • Adjusted Basis: original purchase price plus capital improvements

Short-Term vs. Long-Term Rates

Holding PeriodTax Rate
≤ 1 year (short-term)Ordinary income rate (10%–37%)
> 1 year (long-term)0%, 15%, or 20%

2024 Long-Term Capital Gains Rates (Single Filers)

Taxable IncomeRate
00 – 47,0250%
47,02647,026 – 518,90015%
Over $518,90020%

Key principle: holding an investment for just one day past the 1-year mark can drop your rate from 22–37% (ordinary) to 0–20% (long-term). Timing matters.


Net Investment Income Tax (NIIT)

High-income taxpayers owe an additional 3.8% NIIT on net investment income (including capital gains).

NIIT threshold (2024)

  • Single: $200,000 MAGI
  • Married Filing Jointly: $250,000 MAGI

Example

MAGI 300,000(single)300,000 (single) → 100,000 above threshold
NIIT = 100,000×3.8100,000 × 3.8% = 3,800 (if all net investment income)


Primary Residence Exclusion (§ 121)

The biggest capital gains break available to most homeowners.

Exclusion amounts

  • Single: $250,000
  • Married Filing Jointly: $500,000

Requirements

  • Owned the home for at least 2 of the last 5 years
  • Used it as primary residence for at least 2 of the last 5 years
  • Have not used the exclusion in the past 2 years

Example

Bought for 300,000;soldfor300,000; sold for 650,000 (MFJ)

  • Gain: $350,000
  • Excluded: 500,000(thegainisfullyexcluded500,000 (the gain is fully excluded → 0 tax)

Stock and ETF Taxation

Scenario:Sell100shares of ABC at$80(bought at$50,held14months)Gain=($80$50)×100=$3,000long-term gainAt15%long-term rate:$3,000×15%=$450taxAt22%short-term rate(if held less than1year):$3,000×22%=$660taxDifference:$210—the cost of impatience\begin{aligned} &\text{Scenario}: \text{Sell} 100 \text{shares of ABC at} \$80 (\text{bought at} \$50, \text{held} 14 \text{months}) \\ \text{Gain} &= (\$80 − \$50) \times 100 = \$3,000 \text{long-term gain} \\ \text{At} 15\% \text{long-term rate}: \$3,000 \times 15\% &= \$450 \text{tax} \\ \text{At} 22\% \text{short-term rate} (\text{if held less than} 1 \text{year}): \$3,000 \times 22\% &= \$660 \text{tax} \\ &\text{Difference}: \$210 — \text{the cost of impatience} \end{aligned}

Wash Sale Rule

Cannot deduct a loss if you repurchase substantially identical securities

within 30 days before or after the sale.

Example:

Nov 15: Sell XYZ at a $2,000 loss

Dec 1: Buy XYZ back

  • Loss is DISALLOWED (wash sale)
  • Disallowed loss adds to the basis of the new shares

Workaround: wait 31 days, or buy a similar (not identical) ETF immediately


Cryptocurrency Taxation

The IRS treats cryptocurrency as property, not currency. Every taxable event triggers a capital gain or loss.

Taxable crypto events

✓ Selling crypto for USD
✓ Trading one crypto for another (e.g., BTC → ETH)
✓ Buying goods/services with crypto
✓ Receiving crypto as income (taxed as ordinary income)

Non-taxable

✗ Buying crypto with USD
✗ Transferring crypto between your own wallets
✗ Holding

Example

Bought 1 ETH at 1,000(Jan2023)Sold1ETHat1,000 (Jan 2023) Sold 1 ETH at 3,500 (Mar 2024) — held 14 months
Long-term gain = $2,500 → taxed at 0–20% depending on income


Tax-Loss Harvesting

Strategically realize losses to offset gains and reduce taxes.

Example:

  • Long-term gains realized: $10,000

  • Loss harvested from a losing position: −$4,000

  • Net taxable gain: $6,000

  • At 15%: 6,000×156,000 × 15% = 900 (vs. $1,500 without harvesting)

  • Tax saved: $600

Rules:

  • Losses first offset same-type gains (short against short, long against long)
  • Remaining net loss can offset the other type
  • Up to $3,000 of net capital loss can offset ordinary income per year
  • Unused losses carry forward indefinitely

Timing:

  • Review unrealized losses in November–December
  • Harvest before year-end; reinvest to maintain market exposure (watch wash sale rule)

Carried Interest and Collectibles

Collectibles (art, coins, wine, stamps):

  • Long-term rate capped at 28% (not 15/20%)
  • Short-term taxed as ordinary income

Carried interest (investment fund managers):

  • Performance fees taxed as long-term capital gains if holding period > 3 years
  • Subject to ongoing legislative scrutiny

Practice Quiz

Q1. You bought stock for $5,000 and sold it 11 months later for $8,500. Your marginal income tax rate is 24%. How much is your approximate capital gains tax?

$8,500 − $5,000 = $3,500 short-term gain (held less than 1 year).
Tax = $3,500 × 24% = $840. Had you waited one more month, the long-term rate (likely 15%) would have reduced the bill to $525 — saving $315.

Q2. A married couple bought their home for $400,000 and sold it for $950,000 after living there for 3 years. How much is taxable?

Gain = $550,000. The § 121 exclusion for MFJ is $500,000.
Taxable gain = $550,000 − $500,000 = $50,000.

Q3. You sold Stock A at a $6,000 long-term gain and Stock B at a $2,500 long-term loss. What is your net taxable long-term gain?

$6,000 − $2,500 = $3,500 net long-term gain.

O

OIYO Editorial

Editorial Desk

The OIYO editorial desk researches money, law, lifestyle, and self-understanding topics against primary sources and public statistics. Every piece carries source notes and is reviewed on a regular cycle for accuracy and usefulness.