Last updated: July 2, 2026
Selling a stock at a loss and immediately buying it back sounds like a clean plan. The investor captures the tax deduction, stays invested, and moves on. However, the IRS has a specific rule that blocks this maneuver. However, it catches far more transactions than most investors realize. These include purchases made before the sale, repurchases inside retirement accounts, and options on the same underlying stock. Understanding this rule precisely protects investors from surprises at tax time.
Most explanations stop at ‘don’t buy the same stock within 30 days of selling it.’ In reality, however, the window runs in both directions, applies across every account the investor controls, and extends to substantially identical securities — a term the IRS has never defined with a bright-line rule. Therefore, this article covers the 61-day window precisely and what counts as substantially identical. It also explains what happens to a disallowed loss and where the rule traps investors.
What the Wash Sale Rule Prohibits

The window opens 30 days before the sale date, not after.
Specifically, Internal Revenue Code Section 1091 prohibits deducting a capital loss when investors acquire substantially identical securities within 30 days before or after the sale date. Consequently, the full restricted window under §1091 covers 61 calendar days. It includes 30 days before the sale, the sale date itself, and 30 days after. The rule only applies to losses — gains are never affected.
The 61-Day Window in Plain Numbers
Consider a concrete example. An investor sells 100 shares of NVIDIA on July 15 at a $2,000 loss. The §1091 window runs from June 15 (30 days before) through August 14 (30 days after).
In addition, any purchase of substantially identical NVIDIA securities anywhere in that range disallows the deduction. Furthermore, §1091 applies whether the repurchase happens in a taxable brokerage account, an IRA, a Roth IRA, or a spouse’s account. To avoid triggering the rule, the investor must wait until August 15 — the 31st day after the sale.
What Counts as Substantially Identical
In practice, however, the same company’s common stock is always substantially identical to itself. Selling Apple shares and buying Apple shares within the window always triggers §1091. Options on the same underlying stock also count. Congress amended §1091 in 1988 specifically to include contracts or options to buy or sell stock. Therefore, buying a call option on a stock you sold at a loss within the window disallows the deduction.
ETFs, Options, and the Gray Zone
Swapping one S&P 500 ETF for a different S&P 500 ETF from another fund family occupies a genuine gray zone. The IRS has issued no ruling on this specific scenario. Most tax practitioners treat two ETFs that track similar but not identical indexes as not substantially identical. However, no safe harbor exists.
By contrast, selling and buying the exact same ETF clearly triggers §1091. According to IRS Publication 550, preferred stock is not ordinarily substantially identical to common stock of the same company. Bonds of the same company are generally not substantially identical to its stock either.
| Security type | Substantially identical? | Notes |
|---|---|---|
| Same company’s common stock | Yes — always | Definitionally identical |
| Call option on same stock sold | Yes | §1091 amended in 1988 to include options |
| Different S&P 500 ETF, same index | Gray area | No IRS ruling; many practitioners say no |
| Exact same ETF, different purchase | Yes | Same fund, same underlying |
| Preferred stock vs. common stock | Generally no | Per IRS Publication 550 |
| Bond vs. stock of same company | Generally no | Per IRS Publication 550 |
Source: IRC §1091; IRS Publication 550 (2025 edition).
Where Wash Sale Losses Go When Disallowed

Deferred means recoverable later — unless the IRA trap fires.
A disallowed loss under this rule does not disappear in most cases. Instead, §1091(d) adds the disallowed loss to the cost basis of the replacement securities. This defers the tax benefit until the investor eventually sells those replacement shares without triggering another §1091 violation.
For example, suppose an investor buys 100 shares at $50 ($5,000 total) and sells at $40 for a $1,000 loss. The investor then repurchases within the window at $40.
Consequently, the $1,000 loss moves into the new position’s cost basis, setting it at $5,000 rather than $4,000. Moreover, when the investor eventually sells, that higher basis reduces the taxable gain or increases the deductible loss.
The IRA Trap: When the Loss Disappears Permanently
The most damaging scenario involves repurchasing in a tax-advantaged account. IRS Revenue Ruling 2008-5, published in IRS Internal Revenue Bulletin 2008-3 on January 22, 2008, addressed this directly.
Specifically, the ruling used a concrete example: individual A owns 100 shares of X Company stock with a basis of $1,000. On December 20, 2007, A sells those shares for $600, realizing a $400 loss. On December 21, 2007, however, A causes an IRA to purchase 100 shares at fair market value.
As a result, the IRS ruled the $400 loss disallowed under §1091. Critically, A’s IRA basis does not increase under §1091(d). The loss vanishes permanently. IRAs lack a cost basis that affects future taxation in the same way a taxable account does.
How the IRA Trap Differs From a Standard Deferred Loss
Ordinary losses under this rule are deferred, not destroyed. By contrast, the IRA version destroys them permanently. This distinction matters most for investors who sell a losing taxable position late in the year. Those investors may also hold the same stock in a retirement account with automatic rebalancing.
At first glance, common guidance says: ‘just wait 31 days to buy back the same stock and claim the loss.’ This is correct as far as it goes — but it ignores two practical traps.
First, automatic dividend reinvestment plans (DRIPs) can repurchase shares in the background, triggering §1091 without any deliberate action. Furthermore, the guidance only works if the repurchase happens in the same taxable account.
Moving the repurchase to an IRA does not sidestep the rule; under Rev. Rul. 2008-5, it makes the outcome worse by permanently disallowing the loss. In practice, institutional tax-loss harvesting strategies replace the sold security with a similar-but-not-identical instrument. Individual investors often skip this step.
Common Wash Sale Mistakes Investors Make
Three patterns account for most unintended violations that individual investors encounter. First, automatic reinvestment: DRIPs repurchase shares whenever dividends are paid. Consequently, if a DRIP reinvestment falls inside the 61-day window after a loss sale, §1091 fires automatically.
Second, cross-account purchases: many investors track each brokerage account separately. They forget §1091 applies across all accounts they control, including a spouse’s.
Third, option exercises during a vesting window: exercising employee stock options counts as a purchase. In practice, exercising options on the same stock within 30 days of a loss sale triggers §1091 — even without intending to repurchase.
Tax-Loss Harvesting and the 61-Day Boundary
Tax-loss harvesting is a legitimate strategy that §1091 constrains but does not eliminate. In practice, investors replace the sold security with a similar, not substantially identical, instrument during the 61-day window. Consequently, this keeps the investor exposed to the same broad sector while satisfying §1091’s requirements. In particular, understanding §1091’s boundaries is the prerequisite for using this strategy safely. Brokers report same-account violations on Form 1099-B but generally do not flag cross-account or cross-spouse transactions. Consequently, the tracking burden falls on the investor.
The wash sale rule, in other words, does not punish losses. It prevents investors from claiming a loss while maintaining the same economic position. Investors who understand the 61-day window precisely can plan around it effectively. Those who think it only applies after a sale — or that an IRA repurchase creates a workaround — may face a tax bill the loss was supposed to offset.
Related articles:
What is the wash sale rule in simple terms?
IRC §1091 disallows a capital loss deduction when an investor buys the same or substantially identical securities within 30 days before or after the loss sale. The 61-day window covers 30 days before the sale, the sale date itself, and 30 days after. In most cases, the disallowed loss is deferred — not destroyed — by adding it to the replacement security’s cost basis.
Does the wash sale rule apply to IRAs and Roth IRAs?
Yes. IRS Revenue Ruling 2008-5 confirmed that buying substantially identical stock in an IRA or Roth IRA within the 61-day window triggers §1091. The outcome is worse than a standard violation: the disallowed loss cannot increase the IRA’s cost basis, so the tax benefit disappears permanently rather than being deferred. Investors who sell at a loss in a taxable account should check for automatic purchases in any linked retirement account.
How do I report a wash sale on my tax return?
These violations appear on Form 8949 with code “W” in column (f), and the disallowed loss amount entered as a positive adjustment in column (g). The totals carry to Schedule D. Brokers report same-account violations on Form 1099-B, but they generally do not track cross-account or spousal accounts. Investors who trade the same securities across different accounts carry the cross-account tracking responsibility themselves.
This content is for educational purposes only and is not personalized financial advice. Investing involves risk, including possible loss of principal.
© 2026 Daily Finance Watch. Excerpts under 50 words with attribution and a link back are permitted. Full-article reproduction requires written permission.