Tax-loss harvesting, without the headache
How to turn a losing position into a real tax saving — the wash-sale rule that trips everyone up, and when harvesting is a waste of time.
The short answer
Tax-loss harvesting means selling a losing position to realize a capital loss that offsets gains, plus up to $3,000 of ordinary income a year in the US, with the rest carried forward. The landmine is the wash-sale rule: rebuy the same or a substantially identical security within 30 days and the loss is disallowed. Skip it inside tax-advantaged accounts.
Nobody enjoys looking at a red position. But a loss you’re already sitting on has one redeeming feature: handled right, it can lower your tax bill. That’s the whole idea behind tax-loss harvesting, and it’s one of the few genuinely free lunches in investing — a way to salvage value from a mistake without needing to be right about anything.
The concept is simple. The execution has exactly one landmine, and it catches almost everyone the first time. Let’s cover both.
How does tax-loss harvesting lower your tax bill?
It turns a paper loss into a deduction. When you sell an investment for less than you paid, you realize a capital loss, and the IRS lets you use it in three ways (IRS Publication 550, “Capital Losses”):
- Offset capital gains. Sold a winner this year for a $5,000 gain? Realize a $5,000 loss elsewhere and you’ve cancelled the tax on it.
- Offset ordinary income, up to a limit. In the US, if your losses exceed your gains, you can deduct up to $3,000 of the excess against regular income each year ($1,500 if you are married and file separately).
- Carry the rest forward. Losses beyond that don’t vanish — Publication 550 lets you carry the unused part into later years until it is completely used up.
So a position that’s down $8,000 isn’t only a paper loss. It’s potentially $8,000 of gains you can shelter, or years of $3,000 income deductions, or some blend. You’re converting a bad pick into a smaller tax bill.
What is the wash-sale rule?
It is the rule that disallows your loss if you buy the same or a “substantially identical” security within 30 days before or after the sale. Here’s where people get burned, and it’s worth reading twice.
The rule is in section 1091 of the Internal Revenue Code (26 U.S.C. § 1091), and Publication 550 spells out what counts: buying the shares, acquiring them in a fully taxable trade, acquiring a contract or option to buy them, or buying them in your IRA or Roth IRA. It exists precisely to stop people from selling for the tax break at 10:00 and buying back at 10:01 to keep their position.
The 30-day window is a 61-day minefield in practice: 30 days before, the day of, and 30 days after. A few things people don’t realize:
- It reaches beyond the account you sold in. Publication 550 lists buying the replacement in your IRA or Roth IRA, and a purchase by your spouse or a corporation you control, as wash sales too.
- Automatic dividend reinvestment can trip it silently. If a fund you “harvested” reinvests a dividend into more shares inside that window, congratulations, you’ve partially washed your own sale.
- Buying more of the losing stock right before you harvest counts too.
Break the rule and, in most cases, the disallowed loss isn’t gone forever — Publication 550 adds it to the cost basis of the replacement shares, and their holding period includes the time you held the shares you sold. But you lose the deduction this year, which is usually the entire reason you did it. The exception is the IRA case: when the replacement is bought inside an IRA, the publication excludes it from that basis adjustment, so the loss does not come back later.
Can you harvest a loss and stay invested?
Yes, as long as what you buy in the meantime is not substantially identical. The obvious worry: “If I sell to harvest the loss, I’m out of the market for 30 days. What if it rips higher without me?”
Fair concern. You can sell the loser and, instead of sitting in cash, hold something similar but not substantially identical while the 30 days pass. Some investors swap into a fund with similar exposure that tracks a different index; whether two funds are “substantially identical” is not defined by the IRS, so confirm the choice with a tax professional. Selling a single stock and holding a broad sector ETF for a month is a looser version of the same idea, since stock of one company is ordinarily not substantially identical to a fund.
“Substantially identical” is a genuinely fuzzy line. Publication 550 says only that you must consider all the facts and circumstances, and that stock of one corporation is ordinarily not substantially identical to stock of another; it gives no list for funds. So the game is to be clearly different, not clever-lawyer different.
When is tax-loss harvesting not worth it?
When there is no tax to save, or the saving is smaller than the friction. It’s not always the move, and chasing it religiously wastes time and racks up trading friction:
- In a tax-advantaged account. Inside an IRA or 401(k), gains and losses don’t have annual tax consequences. There’s nothing to harvest.
- When the loss is tiny. Harvesting a $60 loss to save maybe $15 in tax, while paying spreads and burning an afternoon, is a hobby, not a strategy.
- When you’d be selling something you want to keep forever anyway. If the thesis is intact and you have no gains to offset, sometimes the cleanest thing is to just… hold it and move on.
The strongest time to harvest is late in the year, once you can see your realized gains for the year and know exactly how much loss is actually useful to book.
Tradune surfaces harvestable losses across your holdings with the estimated dollar impact attached, so you can see which red positions are actually worth acting on — and which aren’t. It’s a heads-up, not tax advice; for anything involving your specific return, loop in a tax professional.
Related tool: Tax-loss harvesting calculator — estimate the tax saving on a losing position in seconds.
Related guides
See this in your own portfolio
Tradune runs these numbers automatically across everything you hold.
Start freeFree for everyone right now · no card · nothing to buy