Tax · 7 min read

Capital Gains and Tax-Loss Harvesting

Year-end is when investors can deliberately realize losses to offset gains — but only if trades settle in the right tax year and you avoid the wash-sale trap.

How capital gains are taxed

  • Short-term (held ≤1 year): taxed at ordinary income rates
  • Long-term (held >1 year): preferred rates of 0%, 15%, or 20% depending on income
  • Net investment income tax (NIIT) of 3.8% may apply on top for higher earners
  • State tax usually treats all gains as ordinary income — model both layers

Tax-loss harvesting mechanics

Selling a losing position generates a capital loss that first offsets capital gains of the same character (short vs. long), then offsets the other character, and finally up to $3,000 of ordinary income per year. Unused losses carry forward indefinitely.

  • Net short-term losses against short-term gains first (best because they offset higher-taxed gains)
  • Then net against long-term gains
  • Excess loss: up to $3,000 against ordinary income each year
  • Carryforward what you can't use — it doesn't expire
The CPA-Ready Business Finance Starter Kit cover

Free download

The CPA-Ready Business Finance Starter Kit

A practical, advisor-grade workbook for owners and founders — the foundations your CPA wishes every client showed up with. Books, taxes, cash flow, and entity decisions, in one place.

  • Monthly bookkeeping rhythm
  • Tax-ready document checklist
  • Entity & S-Corp decision guide
  • Cash flow & owner pay basics

No signup required. Informational only — consult your CPA for advice.

Ready for the next step?

See the full Lead-Magnet Funnel — from free checklist to advisor-grade systems.

Open the funnel

The wash-sale rule

If you sell at a loss and buy a substantially identical security within 30 days before or after, the loss is disallowed and added to the basis of the replacement shares. The 30-day window applies across all your accounts — including IRAs and a spouse's account.

  • Wait 31 days before repurchasing the exact same security
  • Or rotate into a similar-but-not-identical fund (e.g., S&P 500 ETF → total-market ETF)
  • Watch automatic dividend reinvestment in IRAs — it can silently trigger a wash sale

Year-end execution

  • Run a realized + unrealized gain/loss report in late November
  • Place trades early enough to settle in the current tax year (typically the last few business days)
  • Coordinate with any planned Roth conversions, RMDs, or stock comp vesting
  • Track basis carefully — broker 1099-Bs occasionally miss adjustments

Frequently asked

Does tax-loss harvesting work in retirement accounts?

No — gains and losses inside IRAs and 401(k)s don't flow to your 1040. Harvesting only matters in taxable brokerage accounts.

Can I harvest losses and immediately buy back if it's a different ticker?

Yes, as long as the replacement isn't 'substantially identical.' Two different broad-market ETFs from different providers tracking different indexes are usually fine; identical share classes of the same fund are not.

Recommended next step

Download the Year-End Tax Planning Guide

Every November-and-December move worth making — retirement deadlines, equipment timing, S-Corp payroll, charitable giving, loss harvesting, and the close checklist — in one CPA-built PDF.

Next step

Need a real human? Find a verified CPA in your city.