Your annual Form 1099-B lands in your inbox with an unwelcome surprise: an adjusted loss column marked with code W that zeroes out thousands in expected deductions.
You sold a declining position in December to lock in a clean tax write-off, only to watch the write-off vanish.
The tax code treats an investment as continuous whenever you acquire substantially identical economic exposure within thirty days before or after a loss sale. That rolling 61-day window applies across all personal, spousal, and retirement accounts, deferring your deduction into replacement cost basis or permanently wiping it out inside an IRA.
Mastering the calendar mechanics and multi-account rules lets you harvest market dips cleanly without forfeiting your tax relief.
Wash Sale Mechanics — Tracking Rules and Thresholds
The 61-Day Calendar Window That Triggers the Rule

The IRS measures a wash sale across an exact 61-consecutive-day window: the 30 calendar days before the sale date, the trade day itself, and the 30 calendar days immediately following.
This restriction applies strictly to trades closed at a capital loss.
Positions sold for a capital gain carry zero repurchase restrictions under the tax code, allowing immediate buybacks without consequence. But shedding a losing asset while acquiring replacement exposure anywhere inside that 61-day bracket disallows the immediate tax deduction. Buying replacement shares 29 days before harvesting the loss violates the rule just as directly as buying 29 days afterward.
Entering an equity contract carries the exact same legal weight as settling physical shares on the market.
Securing a call option, equity warrant, or forward contract within that 61-day bracket triggers the disallowance identically to purchasing underlying stock. The calendar counts every day consecutively, meaning market holidays and weekends never pause or shorten the active window for the taxpayer.
Every calendar day counts toward the final tally.
The 61-Day Wash Sale Window Distribution
Total calendar span governing loss disallowance under IRC Section 1091
How the Disallowed Loss Adjusts Your Cost Basis

Triggering a wash sale in a taxable account does not erase your tax deduction permanently; the disallowed dollar loss attaches directly to the cost basis of the replacement shares.
For example, selling 100 shares at a $500 loss and purchasing 100 replacement shares for $2,000 raises the cost basis on that new lot to $2,500. That upward adjustment preserves the financial loss, reducing taxable gains or expanding deductible losses when you eventually sell the replacement position in an unrestricted sale.
The original holding time carries over too.
The days you owned the initial shares add directly to the holding period of the replacement lot, which governs whether a future sale qualifies as a long-term or short-term transaction. You forfeit only the current-year write-off against other capital gains or ordinary income on the upcoming return.
The current deduction converts into a deferred tax reduction, preserving the dollar benefit until the replacement position is fully closed out in a clean transaction.
The deduction waits for a future sale.
Cost Basis Rules — Key Traps and Thresholds
Repurchasing in an IRA eliminates the deduction permanently because IRA accounts cannot adjust cost basis.
Automatic Dividend Reinvestments Often Trigger Unintended Violations

Automated dividend reinvestment plans frequently trigger wash sales without manual buy orders by executing fractional share purchases during regular corporate payout cycles that land inside your active 30-day post-sale window.
The tax code applies these disallowances on a proportional share-for-share basis. If an automated distribution reinvests a $30 dividend to purchase 0.5 shares within 30 days of a loss sale, the rule disallows the loss on only 0.5 shares, leaving the remaining loss deduction intact for that specific tax year.
The primary drawback is administrative clutter.
A tiny fractional reinvestment splits your tax lots, requiring tedious manual cost basis tracking across partial shares on Schedule D. Taxpayers harvesting large capital losses in dividend-paying assets must switch their account elections from automatic reinvestment to cash distributions well before executing the initial sell order.
Directing dividend payouts straight to core cash prevents scheduled corporate distributions from quietly interfering with planned loss harvesting.
Cash distributions protect the planned tax write-off.
Dividend Reinvestment Rules and Basis Mechanics
🗓️ Pre-Sale Window
Check for distributions in the 30 days prior to selling
⏱️ Holding Period Rule
Original holding time tacks onto new replacement shares
📈 Basis Adjustment
Disallowed dollar loss rolls into replacement share cost
⚠️ IRA Distribution Trap
Automated IRA reinvestment permanently forfeits the tax loss
Full 61-Day Window
The restriction spans 30 days before the sale date, the transaction day, and 30 days after.
The Rule Spans All Your Personal and Spousal Accounts

The IRS treats every account you or your spouse control as a single pool, meaning selling in one brokerage and repurchasing in another still triggers the restriction.
Your year-end 1099-B tax forms only calculate wash sales that happen inside that specific firm. If you sell at a loss through one custodian and buy replacement shares through another, or inside a company entity you manage, the legal burden to identify and report the disallowed loss falls entirely on you.
Retirement accounts create an even worse trap.
If you sell shares at a loss in a taxable account and repurchase identical shares inside a traditional or Roth IRA within 30 days, the tax write-off is permanently erased. Taxable accounts let you roll the disallowed loss into cost basis, but IRAs offer no basis adjustments, destroying the tax benefit completely.
A $1,500 realized loss replaced inside an IRA provides zero current deduction and zero future tax relief when you eventually withdraw the funds. The write-off disappears from your tax life entirely.
Cross-Account Mechanics: Taxable Brokerage vs IRA
Taxable Account Repurchase
- Original holding period attaches to replacement shares to help reach the 1-year long-term threshold
- Deferred loss unlocks the moment replacement shares are sold in a clean transaction outside the window
- Cross-broker trades require manual entry on IRS Form 8949 using adjustment code W
- Full loss deduction is preserved by waiting at least 31 full calendar days before buying back
IRA or Roth IRA Repurchase
- Active 61-day restriction covers 30 days before sale date through 30 days after
- Automatic dividend reinvestment (DRIP) inside an IRA triggers accidental loss elimination
- Purchases made inside a spouse's separate retirement account trigger the identical permanent penalty
- Safe workaround requires holding cash for 31 days or switching to a non-identical asset category
What the IRS Considers Substantially Identical Securities

The IRS treats securities as substantially identical when two financial instruments offer virtually indistinguishable economic exposure and risk to the investor.
Trading common stock for call options on that exact company violates the standard because the derivative contract grants direct equity exposure. A similar problem catches investors swapping competing S&P 500 index funds from separate providers. Even with different ticker symbols and management expense ratios, holding the identical underlying basket creates substantial wash sale risk.
Changing the benchmark index prevents the tax disallowance.
Selling a large-cap S&P 500 fund at a $2,000 loss and immediately buying a total stock market fund protects the deduction while keeping your dollars fully invested. The hundreds of mid-cap and small-cap companies in the total market index establish distinct underlying characteristics that tax regulators accept as a separate investment class.
Fixed-income assets follow a similar standard. Two corporate bonds issued by the exact same company avoid identical status whenever their maturity dates, annual coupon rates, or assigned credit ratings differ significantly.
⚠️ COMMON MISTAKE
Do Not Rebuy in Retirement Accounts
Repurchasing a sold security inside an IRA within 30 days permanently forfeits the tax write-off. Unlike a taxable account, an IRA cannot absorb the basis adjustment.
Safe Strategies to Maintain Market Exposure While Harvesting Losses

You can preserve your market position while locking in a tax loss by pairing disciplined proxy asset substitutions with strict calendar management across all your trades.
The proxy substitution strategy lets you sell a losing position and immediately purchase a highly correlated fund tied to a different index benchmark. This keeps your capital fully invested for any market rebound while preserving the tax write-off, eliminating the risk of sitting on the sidelines in cash.
Alternatively, you can stage by the calendar.
Under the calendar staging approach, you park your sale proceeds in a short-term Treasury fund or cash equivalent for 31 full calendar days before buying back the original asset. Sales made in late December require careful monitoring through late January because the 30-day forward window crosses into the new tax year.
Keep clear records of your trade dates, lot numbers, and replacement tickers across every household account. Clear documentation provides the verifiable paper trail required if the IRS questions your loss deductions.
⏳ Step-by-Step Loss-Harvesting Execution Sequence
Day -30: Audit Automated Inflows
Pause automatic dividend reinvestment (DRIP) and recurring buys across all IRA and taxable accounts.
Day 0: Select Specific Tax Lots
Use the Specific Identification accounting method instead of default FIFO to isolate your highest-cost shares.
Days 1 to 30: Maintain Trading Blackout
Block all repurchase orders, call options, and spousal trades involving the liquidated security.
Day 31: Re-Establish Primary Allocations
Reactivate scheduled automated deposits or rotate back into the original asset without penalty.
Frequently Asked Questions
Does the wash sale rule apply if I sell a stock for a gain?
No, the wash sale rule applies exclusively to realized capital losses. You can sell a winning security for a capital gain and buy it back five minutes later without triggering any disallowance penalty.
How does my brokerage report wash sales on Form 1099-B?
Brokerages display the disallowed amount in Box 1g of Form 1099-B and tag the transaction with code W. This indicates that the loss was disallowed and added to the basis of replacement shares bought in that specific account.
Can I claim a wash sale loss if I buy the stock back on day 31?
Yes. Once 30 full calendar days have passed after the trade settlement date, purchasing the security on day 31 falls outside the restriction window and leaves your harvested loss intact.
What happens if I sell crypto at a loss and buy it back immediately?
As of current IRS regulations, cryptocurrencies are classified as property rather than securities under Section 1091, meaning statutory wash sale rules have historically not applied to direct crypto trades, though legislative proposals frequently seek to close this difference.
Will options trades on the same stock trigger a wash sale?
Yes. Purchasing call options or selling deep-in-the-money put options on the same underlying stock within the 61-day window triggers the rule because options represent a contractual right to acquire substantially identical shares.
Executing Clean Loss Harvesting Without Tax Disallowances
Clean loss harvesting relies on three disciplined rules: pause automatic dividend reinvestment on target funds, wait a full 31 calendar days before repurchasing original shares, and use distinct index benchmarks to maintain market exposure.
Your tax write-off only disappears when trades violate that 61-day boundary or rebuy shares inside an IRA where disallowed losses vanish forever. Managing replacement dates and proxy assets as rigorously as your sell orders ensures your next 1099-B arrives with every harvested dollar intact instead of crossed out by code W.
Audit Your Recent Loss Sales
Review your brokerage trade confirmation dates from the past month to ensure no automated orders or spouse purchases fall inside your active 30-day window.

