Wash sale rule Explained: Avoid Costly Tax Mistakes

The wash sale rule prevents investors from claiming tax deductions on losses if they repurchase the same security within 61 days. Understanding its nuances helps avoid costly mistakes.

,

Imagine selling a stock at a loss, feeling clever about locking in a tax deduction — then buying it back a week later, only to discover the IRS won’t honor that loss. This frustrating situation catches thousands of American investors off guard every year, and it all comes down to the wash sale rule.

After all, the stakes are real: losing a deduction you counted on can mean a surprise tax bill at the worst possible time. Worse yet, many investors don’t even realize they triggered a violation until they’re sitting across from a tax preparer in April.

With that in mind, this piece breaks down exactly how the wash sale rule works, what triggers it, how it affects retirement accounts, and — most importantly — how to legally work around it.

A brass balance scale holds torn price tags and a crumpled receipt, a yellow sticky note nearby reads "Wash sale rule".

What Is the Wash Sale Rule?

The wash sale rule is an IRS regulation under Internal Revenue Code Section 1091 that prevents investors from claiming artificial tax losses. Its core purpose is to stop people from selling a security just to book a loss — then immediately jumping back into the same position as if nothing changed.

In plain terms, you cannot sell a security at a loss and repurchase the same or substantially identical security within a specific time window and still deduct that loss on your taxes.

Critically, the disallowed loss doesn’t simply vanish. Instead, it gets added to the cost basis of the newly purchased security, which may reduce your taxable gain when you eventually sell — but that benefit is deferred, not immediate.

The rule has existed for decades, and the IRS enforces it strictly. Many investors assume it only applies to stocks, but it covers a broader range of securities than most people expect.

How the 61-Day Window Actually Works

The most misunderstood part of this regulation is its timing. To be specific, the wash sale window spans 61 days total — 30 days before the sale, the day of the sale itself, and 30 days after the sale.

That detail trips people up constantly. And here’s the kicker: the clock doesn’t start when you sell — it actually started 30 days earlier. So even a purchase you made a month ago can disallow a loss you try to claim today.

The Three Conditions That Trigger a Wash Sale Violation

A wash sale violation occurs when all three of the following conditions are met at the same time:

  1. You sell a stock or security at a loss
  2. You buy back a “substantially identical” security within the 61-day window
  3. The transaction occurs in any account you own — including IRAs and spousal accounts

Notably, that third point surprises many investors. Even if you sell in a taxable brokerage account and repurchase in a separate IRA, the wash sale rule still applies. Fidelity notes that wash sales across different accounts are a common and costly oversight.

What Counts as “Substantially Identical”?

While the IRS doesn’t provide an exhaustive list, the term “substantially identical” generally covers securities that are so similar they represent the same economic exposure. Here are the most common examples:

  • Selling shares of Company A and buying them back within 30 days
  • Selling a stock and buying call options on the same stock
  • Selling one share class of a fund and buying another share class of the same fund
  • Selling a mutual fund and buying an ETF that tracks the exact same index

On the other hand, selling an S&P 500 ETF and replacing it with a total market ETF typically does not trigger a wash sale, since those funds track different indexes. This distinction is central to legal tax-loss harvesting strategies.

The Cost Basis Adjustment: Your Deferred Silver Lining

Now, when the IRS disallows a loss, that amount isn’t truly erased — it gets rolled into the cost basis of your replacement security. This mechanism is worth understanding because it affects your future tax liability.

For example, suppose you buy 100 shares at $50 each, sell them at $40 (a $1,000 loss), and then repurchase within the window at $42. Your disallowed $1,000 loss gets added to the $4,200 repurchase cost, giving you an adjusted cost basis of $5,200.

So, when you eventually sell those shares, that higher cost basis reduces your taxable gain — or increases your deductible loss. The tax benefit isn’t lost; it’s postponed.

Wash Sale Rule and Retirement Accounts: A Hidden Trap

Many investors believe their IRA or Roth IRA is a safe workaround. Unfortunately, that belief leads to one of the most common — and expensive — wash sale mistakes.

If you sell a stock at a loss in your taxable account and repurchase the same security inside an IRA within the 61-day window, the loss is permanently disallowed. Unlike in a taxable account, where the loss gets added to your cost basis, there is no cost basis adjustment mechanism inside an IRA.

TurboTax confirms that this is one of the most permanent consequences of a wash sale violation.

Below is a quick comparison of how wash sale outcomes differ across account types:

Account TypeWash Sale Triggered?Loss Outcome
Taxable Brokerage → Taxable BrokerageYesLoss added to cost basis of replacement security
Taxable Brokerage → Traditional IRAYesLoss permanently disallowed — no basis adjustment
Taxable Brokerage → Roth IRAYesLoss permanently disallowed — no basis adjustment
IRA → IRA (same security)YesLoss permanently disallowed inside tax-advantaged account

As the table shows, any cross-account repurchase within the wash sale window carries real risk. Spousal accounts also count — if your spouse repurchases a security you just sold at a loss, that can trigger a violation too.

What About Cryptocurrency?

Here’s where things get interesting. As of 2025, the IRS classifies cryptocurrency as property, not a security. That means the wash sale rule technically does not apply to crypto transactions under current law.

Consequently, investors can sell Bitcoin or Ethereum at a loss, immediately repurchase the same asset, and still claim the tax deduction. This is a legitimate advantage that many crypto traders use for tax-loss harvesting.

However, this gap may not last long. AdvisorFinder’s 2025 guide notes that Congress has repeatedly discussed expanding wash sale rules to include digital assets, so investors should monitor potential legislative changes closely.

Fortunately, investors have several legitimate options to harvest losses without triggering the rule. These strategies preserve your tax deduction while keeping your portfolio positioned for recovery.

Wait Out the 31-Day Period

The simplest approach is to wait at least 31 days after the sale before repurchasing the same security. This clears the post-sale portion of the wash sale window entirely, though it does expose you to market movement during that period.

Replace With a Similar — But Not Identical — Security

Alternatively, consider swapping into a comparable but legally distinct investment. Some practical examples include:

  • Sell an S&P 500 ETF, buy a total market or equal-weight ETF instead
  • Sell shares in one technology fund, replace with a different sector ETF tracking similar — but not identical — holdings
  • Sell an individual stock, replace with a broad sector ETF that includes similar exposure

These swaps let you stay invested in the same general market area while legally sidestepping the wash sale trigger. The key is ensuring the replacement security tracks a different index or represents a genuinely different basket of holdings.

Track Across All Your Accounts

Many brokerage platforms report wash sales on Form 1099-B, but they only track activity within their own system. If you hold accounts at multiple brokers, monitor your trades manually or use tax-tracking software to catch cross-account violations before they happen.

Wrapping It All Up

Ultimately, the wash sale rule exists to close a loophole — but it frequently catches well-intentioned investors who are simply trying to manage their portfolios tax-efficiently.

The 61-day window, the broadly defined “substantially identical” standard, and the cross-account reach of the rule all create real complexity.

Clearly, the disallowed loss, the permanent consequences of IRA-involved violations, and the current crypto exemption are all details that can meaningfully affect your tax bill. Investor.gov provides a useful quick reference for the core definition if you want a concise government source to revisit.

In short, with careful timing, smart security substitution, and consistent cross-account tracking, you can still harvest tax losses effectively — without accidentally handing your deduction back to the IRS.

Watch this short video to quickly understand the **wash sale rule** and avoid costly tax mistakes.

Frequently Asked Questions

Do dividends and reinvested dividends create wash sales?

Yes, an automatic dividend reinvestment that buys shares inside the 61-day window can disallow part or all of a loss from a sale. Turning off reinvestment before harvesting losses can help prevent accidental triggers.

If I sell only part of my position at a loss, can only part of the loss be disallowed?

Yes, wash sales are calculated share-by-share, so the disallowed amount is limited to the number of replacement shares bought within the window. Any remaining shares sold at a loss without a matching replacement may still produce a deductible loss.

How do I report a wash sale on my tax return if my broker does not catch it?

You typically adjust the sale on Form 8949 by entering the disallowed loss as an adjustment and carrying the corrected totals to Schedule D. Keeping trade confirmations across all accounts makes it easier to document the correct basis and dates.

Can employee stock purchase plans and company stock grants trigger wash sales?

They can, because scheduled purchases or share deliveries may count as acquisitions that fall within the wash sale window. If you plan to harvest a loss, consider the timing of payroll-based buys or vesting events to avoid overlap.

Do tax lots matter when avoiding wash sales?

Yes, specific-lot identification can change which shares are treated as sold at a loss and how much loss is exposed to disallowance. Confirm your broker’s lot method before trading and save the lot selection confirmation for your records.

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 Funiru 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. Funiru 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 Funiru is an independent, objective, advertising-supported website. To support our ability to provide free content to our users, the recommendations that appear on Funiru 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 Funiru are solely those of the author and not of any bank, credit card issuer, hotel, airline, or other entity. This content has not been reviewed, approved, or otherwise endorsed by any of the entities mentioned. That said, the compensation we receive from our affiliate partners does not influence the recommendations or advice our writing team provides in our articles, nor does it impact any of the content on this site. While we work hard 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.