
Photo by RDNE Stock project on Pexels
Tax Loss Harvesting to Offset Capital Gains: Does It Work?
Tax-loss harvesting lets you sell underperforming investments to offset gains elsewhere in your portfolio — potentially saving hundreds in taxes each year. Here's how to do it without triggering the wash-sale rule.
Tax-Loss Harvesting: How to Turn Losing Positions Into a Tax Deduction
Most investors review their losers once a year — in January, after the December deadline has already passed. That's the wrong time. The harvesting window opens every time the market drops, and markets drop multiple times a year. Waiting for year-end means leaving money on the table for eleven months.
Tax-loss harvesting is not complex. You sell a position at a loss, use that loss to cancel realized gains elsewhere, and immediately buy a similar fund to stay invested. The IRS still taxes your gains eventually — you're just converting current tax into future tax. Deferred taxes are interest-free loans from the government. Every year you push a gain forward is a year that money stays invested and compounding.
Here's how to do it right — and how to avoid the two mistakes that wipe out the benefit.
This Only Works in Taxable Accounts
Photo by Tima Miroshnichenko on Pexels
Tax-loss harvesting does nothing inside a 401(k), IRA, or Roth. Losses in those accounts don't produce deductible losses — they disappear. You need a taxable brokerage account.
Before you start, you need three things:
- A position currently trading below what you paid — below your cost basis
- Some sense of your realized gains for the year — did you sell anything at a profit?
- A replacement fund selected in advance
That third item is where most people fail. Picking a replacement under time pressure — while watching a position fall — leads to bad decisions or wash-sale violations. Build the list before you need it.
Step 1: Sort Your Account by Unrealized Loss
Open your taxable brokerage account and sort all positions by unrealized gain/loss. You're looking for anything trading below your cost basis.
Example: you bought 50 shares of a broad-market ETF at $210 per share — cost basis $10,500. It now trades at $175, so the position is worth $8,750. That's a $1,750 unrealized loss that currently does nothing for you. Sell it, and you can apply that $1,750 against gains elsewhere.
Set a minimum threshold before you start. Harvesting a $200 loss at the 22% bracket saves $44 in federal taxes. That's probably not worth the time and recordkeeping unless it's fully automated. A loss of $1,000 or more is generally the point where manual effort pays off.
Step 2: Match Loss Type to Gain Type
Photo by Jan van der Wolf on Pexels
The IRS requires you to offset like against like:
- Short-term losses (held under 1 year) offset short-term gains first
- Long-term losses (held over 1 year) offset long-term gains first
- Leftover losses of either type can then cross over to offset the other category
This matters because short-term gains are taxed as ordinary income — up to 37% at the top bracket. Long-term gains top out at 20% for most investors, or 15% in the middle brackets.
If you're in the 24% bracket and you offset $5,000 in short-term gains with $5,000 in short-term losses, you've kept $1,200 in cash that would otherwise go to the IRS. Not theoretical — that's the actual math.
Step 3: Sell, Then Reinvest Immediately
Execute the sale. The loss becomes realized and reportable as a capital loss on your return.
If your total losses exceed your gains for the year, you can deduct up to $3,000 of net capital losses against ordinary income. Any excess carries forward indefinitely until used up.
Example: $8,000 in harvested losses, $2,000 in realized gains. Net loss: $6,000. Use $3,000 against your W-2 income this year. Carry $3,000 forward into next year.
Reinvest immediately — in the same transaction window if possible. Sitting in cash after the sale turns a tax strategy into market timing. You don't know when prices recover, and waiting to reinvest means your net exposure has dropped.
The Wash-Sale Rule: The One Rule That Can Kill the Benefit
Photo by Leeloo The First on Pexels
The wash-sale rule disallows the loss if you buy the same or substantially identical security within 30 days before or after the sale — a 61-day total window.
Selling a Vanguard Total Market ETF and immediately buying the same fund: wash sale. Loss disallowed.
Selling that fund and buying a Fidelity or iShares total market ETF tracking a different index: generally fine. The IRS has never formally defined "substantially identical" for index ETFs, and the consensus among tax professionals is that different-index funds from different providers are safe substitutes.
Build a written swap list before you need it. When markets drop 5%, you want to act in five minutes. Common pairs that most practitioners consider safe:
- VTI (Vanguard Total Market) → ITOT (iShares Core S&P Total Market)
- VXUS (Vanguard International) → IXUS (iShares Core MSCI Total International)
- VONG (Vanguard Russell 1000 Growth) → IVW (iShares S&P 500 Growth)
Having this list written down removes the decision under pressure.
Step 4: Reset Cost Basis and Set a 31-Day Calendar Alert
After the swap, your cost basis resets to what you paid for the replacement fund. If markets recover, that position will eventually show a gain — but you've deferred it, and deferral has compounding value over time.
Set a calendar reminder for 31 days out. At that point, you can sell the replacement and buy back the original holding, or hold the replacement permanently. Either works. What breaks the strategy: forgetting the 31-day rule and buying back the original too early.
State Taxes Make the Math Better Than You Think
The federal calculation is just the floor. If you live in a high-income-tax state, your effective savings rate on harvested losses is significantly higher than the federal rate alone suggests.
California conforms to federal capital loss rules — and the $3,000 deduction against ordinary income applies at the state level too. For someone in the 24% federal bracket and 9.3% California bracket, a $5,000 harvested loss saves approximately $1,665 — not the $1,200 you'd calculate from federal tax alone.
New York (top rate: 10.9%), Oregon (9.9%), and Minnesota (9.85%) create similar math. If your combined marginal rate — federal plus state — exceeds 33%, even losses below $1,000 may be worth harvesting when they're easy to execute.
Run the combined rate calculation before deciding a loss is too small to bother with.
If You Accidentally Trigger a Wash Sale
The loss isn't gone permanently. The disallowed amount gets added to the cost basis of the replacement shares, which means you'll recognize it when you eventually sell those shares.
Your brokerage should flag the wash sale on your 1099-B. Verify that it did, and confirm the adjusted cost basis is recorded correctly. An uncaught adjustment means either overpaying taxes in a future year or a discrepancy the IRS may question.
Harvest Year-Round, Not Just in December
The best opportunities don't come at year-end. They come during sharp corrections — which happen two to four times in most years, not just in Q4.
Set a standing rule: any taxable position down 10% or more gets reviewed within the week. When a broad market pullback hits 5–8%, scan all taxable positions before prices recover. Investors who harvested consistently through 2022's 20% decline built a carry-forward balance that sheltered a meaningful portion of gains during the 2023–2024 recovery.
That's the real value of doing this consistently: carry-forwards accumulate into a tax cushion that shields future gains. It's not a one-time trick — it's a running balance that grows every time you harvest and shrinks every time you use it against a gain. Over 20 years, the difference between someone who harvests opportunistically versus someone who only acts in December is measurable in portfolio size, not just tax savings.



