Wash Sale Rule: How to Avoid Traps and Preserve Tax Losses

The wash sale rule disallows losses when identical securities are repurchased within 61 days, creating hidden risks across accounts, IRAs, and spousal holdings.

,

Few tax rules cause as much silent damage as the wash sale rule, not because it’s obscure, but because it applies in ways investors rarely expect. Most people understand the basic idea: sell a stock at a loss, wait a bit, then buy it back. What they miss is the complex structure beneath this surface-level understanding, a gap where significant tax benefits can be lost.

The rule has a structural reach that extends far beyond a single brokerage account. It touches spousal holdings, retirement accounts, automatic dividend reinvestments, and cross-broker transactions, all without generating an alert from your broker or platform.

What follows is a strategic breakdown of how the rule actually works, where it creates unexpected exposure, and what thoughtful investors can do to preserve their tax losses without triggering a disallowance they never saw coming.

Trader hands separate red and green transaction slips beside a sand timer for Wash sale rule timing.

What the Wash Sale Rule Actually Covers

At its core, the wash sale rule disallows a tax loss when an investor sells a security at a loss and then repurchases a substantially identical security within a specific time window. The IRS codified this under IRC Section 1091, and IRS Publication 550 provides the working framework most investors and tax professionals use when preparing federal returns.

The critical distinction that most people get wrong involves the length of that window. Commonly described as a “30-day rule,” the actual window spans 61 days: 30 days before the sale, the day of the sale itself, and 30 days after. This pre-sale period is what catches most investors off guard.

The 61-Day Window in Practice

Consider a straightforward scenario: an investor holds shares of a technology company and decides in mid-March to harvest a tax loss from that position.

If that same investor had purchased additional shares of the same stock during late February (perhaps to take advantage of a dip), those February shares would count as replacement shares within the wash sale window, and the loss would be disallowed retroactively.

Similarly, a December loss-harvesting move that seems clean can become a wash sale if the investor repurchases before January 31 of the following year. The rule doesn’t reset with the calendar; it follows the date of the sale, regardless of the tax year.

What Counts as “Substantially Identical”

The IRS has deliberately avoided providing a precise definition of “substantially identical,” which creates strategic ambiguity. However, the practical guidance available draws some useful distinctions:

  • Selling shares of a company and buying the exact same shares back is always a wash sale.
  • Buying call options on a stock you just sold at a loss triggers the rule.
  • Common stock and preferred stock of the same company are generally not substantially identical, unless the preferred shares are convertible into common at favorable terms.
  • Two ETFs tracking different indexes, such as one following the S&P 500 and another following the Russell 1000, are generally considered distinct.
  • An ETF and a mutual fund tracking the exact same index and holding identical portfolios represent a gray area the IRS has not ruled on definitively.

The safest approach for investors practicing tax-loss harvesting is to replace a sold position with something that tracks a similar but measurably different market segment for at least 31 days before reconsidering the original holding.

How the Disallowed Loss Is Treated

When a wash sale occurs, the tax loss doesn’t simply disappear. Instead, the disallowed amount gets added to the cost basis of the replacement shares. This mechanism defers the loss rather than eliminating it, at least in most cases.

Additionally, the holding period of the original shares carries over to the replacement shares. That detail matters significantly for investors who are close to the one-year threshold that separates long-term from short-term capital gains treatment.

A carried-over holding period can push replacement shares into long-term territory earlier than their actual purchase date would suggest, which typically means a lower tax rate when those shares are eventually sold.

Wash Sale Mechanics at a Glance

ScenarioLoss OutcomeBasis AdjustmentHolding Period
Repurchase in taxable accountDeferredAdded to replacement sharesCarries over
Repurchase in traditional IRAPermanently lostNo adjustment possibleNot applicable
Repurchase in Roth IRAPermanently lostNo adjustment possibleNot applicable
Spousal account repurchaseDeferred or lostDepends on account typeCarries over

The distinction between deferral and permanent loss is not a minor technicality. For investors executing significant loss-harvesting strategies, the IRA trap represents one of the most costly mistakes in individual tax planning.

The IRA Trap and the Cross-Account Problem

The most damaging wash sale scenario involves replacement shares purchased inside an IRA, whether traditional or Roth.

When an investor sells a stock at a loss in a taxable brokerage account and then buys an identical security inside an IRA within the 61-day window, the loss is disallowed. While the initial disallowance tracks with the general rule, what happens next is uniquely destructive.

Because IRAs don’t track cost basis the same way taxable accounts do (distributions are taxed as ordinary income regardless of the purchase price), the disallowed loss cannot be added to the IRA’s basis. Revenue Ruling 2008-5 confirmed this outcome. Consequently, the loss is not deferred. It is permanently destroyed. There is no future sale at which the investor recovers that benefit.

The Broker Reporting Gap

A structural blind spot compounds the cross-account risk: brokers are only required to track and report wash sales on identical securities within the same account at the same institution. If an investor sells at a loss at Fidelity and buys back within 30 days at Schwab, neither broker will flag the transaction as a wash sale.

However, the IRS can identify the pattern through its own 1099 matching systems. The responsibility for tracking cross-account wash sales rests entirely with the investor or their tax professional. Overlooking this creates a false sense of compliance that only surfaces when the IRS sends a notice.

Dividend Reinvestment Plans and Automatic Triggers

One of the most common accidental wash sale triggers involves dividend reinvestment plans, known as DRIPs.

When an investor sells a position at a loss but has automatic dividend reinvestment turned on, the stock may pay a dividend within the 30-day window following the sale. The broker’s automatic reinvestment then purchases new shares of the same security, which the IRS treats as the acquisition of substantially identical securities.

That automated purchase, which the investor may not even notice, triggers a wash sale and reduces the tax benefit they thought they had secured. Before executing a loss-harvesting sale, disabling DRIP for that specific position is a necessary precaution that many investors overlook.

You May Also Like

Tax-Loss Harvesting Without Triggering the Rule

The wash sale rule does not prevent tax-loss harvesting; it simply requires that the strategy be executed with structural precision. Several approaches allow investors to realize losses and maintain market exposure without crossing into wash sale territory.

First, waiting the full 31 days after a sale before repurchasing the original security ensures the transaction falls outside the post-sale window.

Second, swapping into a comparable but distinct investment preserves market exposure without triggering the rule. Selling an S&P 500 ETF at a loss and replacing it with one that tracks the Russell 1000 maintains broad large-cap exposure while the two securities track different indexes.

Third, selling an individual stock and replacing it with a sector ETF creates sufficient differentiation. Selling shares of a specific technology company and buying a broad technology sector ETF still provides industry exposure, but no reasonable interpretation would treat a diversified fund as substantially identical to a single company’s stock.

Year-End Planning Cautions

December is the most active month for tax-loss harvesting, which also makes it the most dangerous for triggering unintentional wash sales.

Selling a position on December 20 creates a 30-day post-sale window that extends to January 19. Any repurchase of an identical security before that date disallows the loss across tax years and any accounts the investor or their spouse controls.

  • Track the 61-day window across all accounts, not just the one where the sale occurred.
  • Disable automatic reinvestments on positions being considered for loss harvesting.
  • Avoid IRA repurchases of any security sold at a loss in a taxable account within the window.
  • Review spousal accounts for any purchases that might mirror recently harvested positions.
  • Document replacement securities and the index or benchmark differences that distinguish them from sold positions.

A Final Word on Strategic Positioning

The wash sale rule, understood at its full structural depth, reveals a pattern the IRS built deliberately: a rule that catches investors who maintain economic positions while claiming tax losses on paper. Navigating it effectively means treating all accounts (taxable, retirement, and spousal) as part of a single interconnected tax entity, not as isolated silos.

Forward-looking investors will pay particular attention to the cryptocurrency boundary, which is narrowing, and to the IRA trap, which permanently eliminates losses rather than deferring them. Both represent asymmetric risks: relatively easy to avoid with awareness, but quietly devastating without it.

The investors who consistently preserve their tax-loss benefits are the ones who understand that the tax code rewards structural discipline above all else.

Watch this video to better understand the wash sale rule and how to avoid losing valuable tax losses.

Frequently Asked Questions

What is the significance of the 61-day window in the wash sale rule?

The 61-day window includes the 30 days prior to the sale, the sale date itself, and the 30 days after, which means any repurchase within this period leads to loss disallowance.

How can dividend reinvestment plans trigger a wash sale?

If an investor sells a stock at a loss but has automatic dividend reinvestment enabled, any dividends paid could unintentionally reinvest in identical shares, triggering a wash sale.

What are the potential tax implications of a wash sale in an IRA?

When a wash sale occurs in an IRA, the loss is permanently lost as it cannot be added to the IRA’s cost basis, unlike in taxable accounts where it can be deferred.

How can investors avoid unintentional wash sales during year-end planning?

To avoid unintentional wash sales, investors should track the 61-day window across all accounts, disable automatic reinvestments, and contemplate spousal accounts when harvesting losses.

What concerns do investors have regarding cryptocurrency and the wash sale rule?

As regulatory pressures mount and reporting requirements evolve, the previously exempt cryptocurrency transactions may soon fall under the wash sale rule, adding complexity to loss-harvesting strategies.
Maria Eduarda

Maria Eduarda


Linguist with a postgraduate degree in UX Writing and currently pursuing a master's degree in Translation and Text Adaptation at the University of São Paulo (USP). She is skilled in SEO, copywriting, and text editing. She creates content about finance, culture, literature, and public exams. Passionate about words and user-centered communication, she focuses on optimizing texts for digital platforms.

Disclaimer Under no circumstances will Doloru require you to pay in order to release any type of product, including credit cards, loans, or any other offer. If this happens, please contact us immediately. Always read the terms and conditions of the service provider you are reaching out to. Doloru earns revenue through advertising and referral commissions for some, but not all, of the products displayed. All content published here is based on quantitative and qualitative research, and our team strives to be as impartial as possible when comparing different options.

Advertiser Disclosure Doloru is an independent, objective, advertising-supported website. To support our ability to provide free content to our users, the recommendations that appear on Doloru may come from companies from which we receive affiliate compensation. This compensation may impact how, where, and in what order offers appear on the site. Other factors, such as our proprietary algorithms and first-party data, may also affect the placement and prominence of products/offers. We do not include all financial or credit offers available on the market on our site.

Editorial Note The opinions expressed on Doloru are solely those of the author and do not represent the views of any bank, credit card issuer, hotel, airline, or other entity. This site is not part of any of the institutions mentioned and does not represent them, and its content has not been reviewed, approved, or endorsed by them. However, the compensation we receive from our affiliate partners does not influence the recommendations or advice our editorial team provides in our articles, nor does it affect the editorial content of this site. While we strive to provide accurate and up-to-date information that we believe is relevant to our users, we cannot guarantee that the information provided is complete and make no representations or warranties regarding its accuracy or applicability.

Loan terms: 12 to 60 months. APR: 0.99% to 9% based on the selected term (includes fees, per local law). Example: $10,000 loan at 0.99% APR for 36 months totals $11,957.15. Fees from 0.99%, up to $100,000.