Abstract editorial illustration representing the wash-sale rule, the IRS timing constraint on tax-loss harvesting. Flat vector composition: two stylized calendar page icons flank a central sale-event marker, with paired directional arrows spanning a coral-gold highlighted timing window of 30 days on each side. Clean electric blue, navy, and gold palette on an off-white background.
The wash-sale rule creates a 61-calendar-day danger window — 30 days before and 30 days after a loss sale — during which repurchasing the same or substantially identical security may disallow the realized capital loss under IRC §1091. Timing awareness is central to any tax-loss harvesting workflow that aims to produce real tax benefit.

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.

Hover a day on the calendar above. The shaded band is the 61-day wash-sale window around your loss sale (day 0).

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.

Abstract editorial illustration showing a blocked disallowed loss — a coral X mark over a blue geometric tax-lot tile — with a gold arrow carrying the deferred amount into an adjacent replacement tile representing the cost-basis carryover. The tax benefit is transferred to the replacement position, not erased. Clean flat vector fintech style on off-white background.
When the wash-sale rule applies in a taxable account, the disallowed loss may transfer as added cost basis to the replacement shares — deferring the tax benefit rather than eliminating it permanently.

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.

Abstract editorial illustration showing a horizontal spectrum from clearly identical — two matching blue geometric tiles stacked on the left — through a gold ambiguous gradient zone in the center to clearly different — two distinct-shaped tiles diverging on the right. Represents the substantially identical judgment spectrum in tax-law analysis: clear at both extremes, uncertain in the middle.
The phrase "substantially identical" creates a spectrum: same-CUSIP shares sit at one end, clearly distinct securities at the other, with an ambiguous middle zone where practitioner judgment and IRS guidance apply.

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

DRIP AUTO-BUY Dividend reinvestment auto-buys inside the window break the harvest HOUSEHOLD ACCOUNTS A spouse or IRA account purchase can disallow the loss — or permanently eliminate the benefit in an IRA PARTIAL RE-ENTRY Buying back a portion of the sold position triggers wash-sale treatment on those replacement shares
Three common triggers that may break a tax-loss harvest without the investor realizing it — all involving a same-symbol purchase inside the 61-day window through an automated or secondary account channel.

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:

  1. Sell the losing position.
  2. Buy a replacement with similar economic exposure but not the same security.
  3. Hold through the window.
  4. Only return to the original if the timing and replacement logic still make sense.
SELL AT A LOSS Exit the losing lot Capture the paper loss as a realized event BUY REPLACEMENT Similar exposure Different security — not substantially identical HOLD 31+ DAYS Let the window expire Both the prior 30-day and after clocks clear HARVEST COMPLETE Realized loss is usable Offset gains or carry forward under IRC §1212
The four-step harvest workflow that avoids wash-sale disallowance: exit the losing position, buy a non-identical replacement with similar market exposure, let both the prior and after windows expire, then confirm the realized loss is usable.

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.

The hidden truth: good TLH is not just about finding a loss. It is about finding a loss and a clean replacement path.

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
Abstract editorial illustration of three interconnected blue account cards arranged in a triangle formation, connected by gold lines representing linked household accounts. A gold arc scanner sweeps across all three accounts, representing system-wide wash-sale awareness tracking tax lots, replacement securities, pending orders, and household purchases simultaneously. Electric blue and gold palette on off-white background.
Wash-sale management spans tax lots, replacement candidates, household accounts, and the timing of pending orders — a portfolio-system scope that single-account tools typically miss.

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.

See how HarvestEngine handles the rule