The wash-sale rule is the line between competent tax-loss harvesting and self-inflicted damage.
If you get it wrong, the IRS disallows the loss. That means you traded, took the friction, and did not get the tax benefit you thought you were getting.
If you get it right, it becomes a scheduling and replacement problem. Serious software can handle that. But the rule is worth understanding because it shapes nearly every TLH decision.
The rule in plain English
What does the wash-sale rule say, and when does it apply to a loss sale?
Under IRC §1091, if you sell a security at a loss and buy the same or substantially identical security inside the 30-day window before or after that sale, the IRS disallows the loss — making the effective danger window 61 calendar days total.
- 30 days before the sale
- the day of the sale
- 30 days after the sale
That is why wash-sale awareness has to look both backward and forward. A purchase you already made can ruin the harvest just as easily as a purchase you make after the sale.
The calendar below is the picture worth keeping in mind. Hover any day to see what an action on that day means for a same-symbol buy made on the loss sale date.
What disallowed actually means
Does a disallowed wash-sale loss simply vanish, or does the tax benefit transfer somewhere?
The loss does not simply disappear in every case. In a taxable account, it is generally added to the basis of the replacement shares, so the benefit is deferred rather than immediately recognized.
That sounds less bad than it feels. In practice, the point of harvesting is to improve taxes now or to build a usable loss bank. A delayed benefit is still a broken workflow.
The phrase that makes this messy
Why does the phrase "substantially identical" create so much confusion for investors?
The IRS uses the term substantially identical, not a bright-line list — which is exactly why this topic keeps generating confusion. There is no comprehensive checklist of what qualifies.
The operational lesson is simple: do not play games with near-clones unless your system is intentionally designed to handle them conservatively.
Good TLH software should assume caution where the line is fuzzy, especially with index funds and close substitutes.
The real-world traps
1. Dividend reinvestment
What are the most common real-world traps that trip wash-sale rules without the investor realizing it?
The most common trap is a DRIP: you sell a position at a loss, then your dividend reinvestment plan automatically buys a few shares back inside the window. The result is a wash sale without ever touching the keyboard.
2. Spouse and household accounts
The rule is not just about one login. A spouse account can create the problem. In some cases, an IRA can make the result even worse because the loss benefit may not be recoverable the way it is in taxable accounts.
3. Partial re-entry
You sell 200 shares, then buy back 50 because you think the stock bottomed. The wash-sale treatment follows the replacement shares. This is one of the easiest ways to quietly break a harvest.
The right way to work around it
What is the legitimate workflow for harvesting a loss while staying clear of the wash-sale rule?
The legitimate tax-aware workflow is straightforward:
- Sell the losing position.
- Buy a replacement with similar economic exposure but not the same security.
- Hold through the window.
- Only return to the original if the timing and replacement logic still make sense.
That is the core reason replacement quality matters so much. A harvest is only useful if the portfolio stays in roughly the right place while the clock runs.
Why this matters for HarvestEngine
Why is wash-sale awareness essential — not optional — for a serious tax-loss harvesting system?
Wash-sale awareness is not a nice extra. It is table stakes for any TLH product that is meant to produce real tax benefit.
That means the system has to think across:
- tax lots
- replacement candidates
- household accounts
- pending buys and recent buys
- portfolio exposure after the swap
That is exactly why HarvestEngine is being built as a portfolio system instead of a one-screen tax gadget.
The investor takeaway
What is the main wash-sale risk for investors harvesting losses on their own?
Harvesting manually, the wash-sale rule is the easiest place to make a mistake that goes unnoticed until tax season — DRIP purchases, spouse-account trades, and partial re-entries can all trigger it silently.
When evaluating TLH software, wash-sale competence is one of the first things worth assessing. A real product should know what else is held in the household, what was recently purchased, and what replacement keeps the portfolio clean without repurchasing substantially identical securities.
Read this next with TLH 101, what counts as "substantially identical", the IRS code cheat sheet, dividend washing and the ex-dividend trap, crypto and the §1091 gap, the three sleeves, and wash-sale rules across spouse accounts.