Tax-Loss Harvesting — Use Investment Losses to Offset Capital Gains and Up to $3,000 of Ordinary Income
What Is It?
Tax-loss harvesting is the practice of selling investments that have declined in value to realize a capital loss, which can then be used to:
- Offset capital gains dollar-for-dollar (eliminating the tax on those gains)
- Offset up to $3,000 of ordinary income per year if losses exceed gains
- Carry forward any unused losses indefinitely to offset gains or income in future years
The key insight: after selling the losing position, you immediately reinvest the proceeds in a similar (but not identical) investment, maintaining essentially the same market exposure while locking in the tax benefit. The portfolio barely changes; the tax savings are real.
At a 15% long-term capital gains rate, eliminating $10,000 of capital gains through harvested losses saves $1,500 in taxes. At the 20% rate with the 3.8% NIIT, the same harvest saves $2,380.
The Mechanics
Step 1 — Identify positions with unrealized losses. Review your taxable brokerage account holdings for positions with a current value below your cost basis (what you paid). Brokerage portals typically display unrealized gain/loss for each position.
Step 2 — Sell the losing positions. The sale realizes the loss and creates a capital loss on your tax return (Form 8949/Schedule D). Short-term losses (held under 1 year) offset short-term gains first; long-term losses offset long-term gains first. Remaining losses can then cross over: long-term losses can offset short-term gains and vice versa.
Step 3 — Reinvest immediately in a similar investment. To maintain your market exposure, buy a different but correlated investment in the same asset class. For example:
- Sell a Total US Market Index fund → buy a different Total US Market Index fund from a different provider
- Sell an S&P 500 ETF → buy a similar large-cap US equity ETF with different constituents
- Sell a sector ETF → buy a broader fund in that sector
Step 4 — Wait 30 days before repurchasing the original. The wash-sale rule prohibits buying the “substantially identical” security 30 days before or after the sale. Violating this disallows the loss.
Step 5 — Report on Schedule D. Your brokerage’s year-end 1099-B will show proceeds and cost basis. Enter on Form 8949 and Schedule D.
The Wash-Sale Rule — The Critical Constraint
Under IRC § 1091, if you sell a security at a loss and buy a “substantially identical” security within 30 days before or after the sale, the loss is disallowed. The disallowed loss is added to the basis of the newly purchased shares instead.
Substantially identical means the exact same security or a very similar one. Courts and the IRS consider:
- The same stock: selling Apple shares and buying Apple shares → wash sale
- Options on the same stock: selling Apple shares and buying Apple call options → likely wash sale
- Different funds tracking the same index from the same provider: generally considered substantially identical (e.g., VFINX and VFIAX, two share classes of the same Vanguard fund)
- Different funds tracking similar but distinct indexes: generally not substantially identical (e.g., Vanguard Total Stock Market ETF (VTI) vs. iShares Core S&P Total US Stock Market ETF (ITOT))
Key caveat: The IRS has never formally defined “substantially identical” for index funds, creating some ambiguity. Conservative practice is to switch to a fund tracking a meaningfully different index.
Netting Rules
Losses and gains net in this order:
- Short-term losses vs. short-term gains
- Long-term losses vs. long-term gains
- Net short-term loss vs. net long-term gain (or vice versa)
- Any remaining net capital loss offsets up to $3,000 of ordinary income per year
- Remaining losses carry forward to the next tax year (no expiration)
What Most People Don’t Know
- Carried-forward losses retain their character. Long-term losses carried forward remain long-term. Short-term carried-forward losses remain short-term. This matters because short-term losses offset higher-taxed short-term gains first.
- Automated “robo-advisors” harvest daily. Services like Betterment and Wealthfront harvest losses automatically when market volatility creates opportunities. If you manage your own taxable account, you must monitor this manually — consider doing a review during any market decline of 5%+.
- Wash sales apply across all accounts you control. If you sell a stock at a loss in your taxable account and buy it in your IRA or spouse’s account within the 30-day window, the wash-sale rule applies. The loss is permanently disallowed (not just deferred) because it moved to a tax-advantaged account.
- Tax-loss harvesting is most valuable in high-income years. The benefit scales with your marginal rate on capital gains. If you’re in the 0% capital gains bracket (taxable income under ~$47,000 single / $94,000 MFJ for 2024), harvesting losses has minimal current-year benefit — though it can still be worthwhile for future years.
- Do not let the tax tail wag the investment dog. If a declining investment still has strong fundamentals you believe in, harvesting the loss and reinvesting in a similar fund is sensible. But don’t sell a quality position at a loss just for the tax benefit if doing so disrupts your long-term strategy.
Legal Basis
- 26 U.S.C. § 1211 — Limitation on capital losses ($3,000 ordinary income offset rule)
- 26 U.S.C. § 1212 — Capital loss carryovers
- 26 U.S.C. § 1091 — Loss from wash sales
- IRS Schedule D and Form 8949 — Capital gains and losses reporting
Frequently Asked Questions
I have $15,000 in realized capital gains this year. If I harvest $15,000 in losses, do I owe zero tax on the gains?
Yes, assuming the character matches — long-term losses netting against long-term gains, or short-term losses netting against short-term gains, eliminates the tax on those gains entirely. If you have more losses than gains, up to $3,000 of the excess loss also offsets ordinary income, and the rest carries forward.
I sold a stock at a loss on December 20th. Can I buy it back on January 21st (32 days later)?
Yes — 32 days after the sale is outside the 30-day wash-sale window. You can repurchase the identical security after 30 days and the loss is fully deductible. Keep records of the exact dates. Note: the 30-day window also applies to the 30 days before the sale — if you bought the same security in late November, selling it in December may trigger the wash-sale rule on that purchase.
Does tax-loss harvesting make sense in an IRA or 401(k)?
No — losses inside tax-advantaged accounts (IRAs, 401(k)s) have no tax consequence. Capital gains and losses inside these accounts are not reported or deductible. Tax-loss harvesting only applies to taxable brokerage accounts.
I have $30,000 in carry-forward losses from last year. How do I use them?
Carry-forward losses automatically offset capital gains in the current year first (reported on Schedule D), then up to $3,000 offset ordinary income. If you have a $30,000 carry-forward and $20,000 in current-year capital gains, the gains are fully offset and $10,000 of loss remains. Of that remaining $10,000, $3,000 offsets ordinary income this year, and $7,000 carries forward again. This continues until the loss is fully used.