Wash Sale Rule 2026: How It Works and How to Avoid It

Wash Sale Rule 2026: How It Works and How to Avoid It

The wash sale rule disallows a tax loss when you sell a security at a loss and buy the same or a substantially identical security within 30 days before or after that sale. The loss is not erased; it is deferred by adding it to the cost basis of the replacement shares, with one exception when the replacement lands in an IRA, where the loss is not preserved (Source: IRS Publication 550 (2025); IRC Section 1091; Rev. Rul. 2008-5).

Last reviewed: July 2026 | Written and reviewed by Craig Wear, CFP®, Q3 Advisors

Under the wash sale rule, a loss is disallowed if you buy substantially identical stock or securities within a 61-day window (30 days before the sale, the day of the sale, and 30 days after). The disallowed loss is added to the basis of the replacement shares in a taxable account, but a loss triggered by an IRA repurchase is permanently lost (Source: IRC Section 1091; IRS Pub 550 (2025); Rev. Rul. 2008-5).

What is the wash sale rule?

The wash sale rule is a provision in Internal Revenue Code Section 1091 that prevents an investor from claiming a tax loss while effectively keeping the same investment position. It applies when you sell or trade stock or securities at a loss and, within 30 days before or after the sale, acquire substantially identical stock or securities (Source: IRC Section 1091; IRS Pub 550 (2025)).

Talk With Craig Wear's Team

Craig has helped IRA millionaires save over $1 million each in unnecessary taxes. Find out if a Roth conversion strategy fits your retirement, with no sales pressure and no product pitch.

The IRS states the standard directly: “You cannot deduct losses from sales or trades of stock or securities in a wash sale unless the loss was incurred in the ordinary course of your business as a dealer in stock or securities” (Source: IRS Pub 550 (2025), Chapter 4).

The rule exists to constrain tax-loss harvesting, the practice of realizing losses to offset gains or up to $3,000 of ordinary income per year ($1,500 if married filing separately) while staying invested (Source: IRC Section 1211(b)). The strategy is legal; the wash sale rule simply blocks the deduction when you repurchase too quickly (Source: IRC Section 1091; IRS Pub 550 (2025)). For how those losses interact with rate brackets, see the Q3 Advisors research on the 2026 capital gains tax rates.

How the 61-day window works

The window is often called the 30-day rule, but it spans 61 calendar days: the 30 days before the sale, the day of the sale itself, and the 30 days after. A repurchase of a substantially identical security anywhere inside that span can trigger a wash sale (Source: IRC Section 1091(a); IRS Pub 550 (2025)).

Section 1091 defines the period as “beginning 30 days before the date of such sale or disposition and ending 30 days after such date” (Source: IRC Section 1091(a)). Both directions count, so buying shares shortly before you sell an existing lot at a loss can create a wash sale just as a post-sale repurchase can.

Because the window ends 30 days after the sale, a repurchase of a substantially identical security made after that 30-day period has passed falls outside the span defined by the statute. The 61-day count runs 30 days before the sale, the sale date, and 30 days after (Source: IRC Section 1091(a); IRS Pub 550 (2025)).

What “substantially identical” actually means

“Substantially identical” is the phrase the whole rule turns on, and the IRS never defines it with a bright line. Pub 550 says you “must consider all the facts and circumstances in your particular case,” then gives one workable anchor: “Ordinarily, stocks or securities of one corporation are not considered substantially identical to stocks or securities of another corporation” (Source: IRS Pub 550 (2025)).

From the statute, regulation, and Pub 550, a set of rules of thumb emerges. The table below summarizes how the IRS-published examples generally treat common pairings. It is a general guide, not a determination for any specific holding.

Comparison Generally substantially identical? Basis (IRS Pub 550 (2025))
Same stock, same class, same issuer Yes The core wash sale case
Stock of Corporation A vs. stock of Corporation B Ordinarily no “Stocks of one corporation are not considered substantially identical to stocks of another corporation”
Common stock vs. bonds or preferred stock of the same corporation Ordinarily no Not ordinarily substantially identical
Convertible preferred vs. common of same corporation Can be yes May be substantially identical depending on facts and circumstances such as relative values, price changes, and convertibility
Predecessor vs. successor stock in a reorganization Can be yes “May be substantially identical”
Common stock vs. warrants for that same stock Case by case Rules apply if the two are considered substantially identical

Pub 550 does not resolve the frequently asked question of whether two S&P 500 index funds from different providers are substantially identical, so that comparison sits in the facts-and-circumstances gray zone rather than in a rule you can cite. What Pub 550 does establish is that securities of different corporations are ordinarily not identical, which is why a sector or index fund from a different fund family is a common substitution approach during the 61-day window (Source: IRS Pub 550 (2025)).

What securities and transactions are covered

The rule reaches stock and “securities” broadly, including transactions in contracts and options. Pub 550 states the wash sale rules “apply to losses from sales or trades of contracts and options to acquire or sell stock or securities” (Source: IRS Pub 550 (2025)).

Several less obvious situations are covered as well:

  • Options and warrants. A loss on stock plus a purchase of options or, in some cases, warrants for the same stock can trigger the rule (Source: IRS Pub 550 (2025)).
  • Short sales. The rules apply to a loss on a short sale if you sell, or enter another short sale of, substantially identical securities within 30 days before or after the short sale is complete (Source: IRS Pub 550 (2025)).
  • Compensatory shares. Pub 550 Example 2 shows an incentive-pay bonus award of substantially identical stock received within 30 days of a loss sale triggering the rule, which is relevant to RSU vesting and similar grants (Source: IRS Pub 550 (2025)).
  • Dividend reinvestment. An automatic DRIP purchase inside the 61-day window is still a purchase and can create a partial wash sale (Source: IRS Pub 550 (2025), applying the general rule to reinvested purchases).

Two categories fall outside the rule as written. Pub 550 states the rules “do not apply to losses from sales or trades of commodity futures contracts and foreign currencies,” and dealers are exempt for losses in the ordinary course of business (Source: IRS Pub 550 (2025)).

What happens when you trigger a wash sale

There is no fine or monetary penalty. The consequence is that the loss is disallowed for the current year, then generally preserved by shifting it into the cost basis of the replacement shares, which defers the deduction until you sell those shares (Source: IRC Section 1091(d); IRS Pub 550 (2025)).

Pub 550 explains: “If your loss was disallowed because of the wash sale rules, add the disallowed loss to the cost of the new stock or securities… This adjustment postpones the loss deduction until the disposition of the new stock or securities. Your holding period for the new stock or securities includes the holding period of the stock or securities sold” (Source: IRS Pub 550 (2025)). The carried-over holding period matters because it can affect whether a later gain or loss is short-term or long-term.

Worked example: the loss is deferred, not lost (taxable account)

This walkthrough follows IRS Pub 550 Example 1 and then adds the eventual sale of the replacement shares so the full mechanics are visible. It shows how a disallowed loss is not erased but shifted into the basis of the new shares, where it is recognized later when those shares are sold in a transaction that is not itself a wash sale (Source: IRS Pub 550 (2025), Example 1; IRC Section 1091(d)).

  1. You buy 100 shares of X stock for $1,000 (Source: IRS Pub 550 (2025), Example 1).
  2. You sell those shares for $750, a $250 loss.
  3. Within 30 days you buy 100 replacement shares for $800. Because they are substantially identical, the $250 loss is disallowed now.
  4. You add the $250 disallowed loss to the $800 cost, giving a new basis of $1,050 in the replacement shares (Source: IRS Pub 550 (2025)).
  5. Later, in a non-wash transaction, you sell the replacement shares for $900. Your loss is $1,050 minus $900, or $150, and the earlier $250 is now reflected in your basis, so the economic loss is ultimately recognized.

Partial wash sales when share counts differ

If you replace fewer shares than you sold, only the matched portion is a wash sale. In Pub 550’s example, an investor with a $1,000 loss on 100 shares who bought 75 substantially identical shares in the window could not deduct $750 (the 75-share portion) but could deduct $250 on the remaining 25 shares, with the disallowed loss allocated across the replacement lots (Source: IRS Pub 550 (2025)).

The IRA rule: when the loss is not deferred

A wash sale involving a retirement account is treated differently because the deferral mechanism does not apply. If you sell a security at a loss in a taxable account and buy substantially identical shares in your IRA or Roth IRA within the window, the loss is disallowed and the IRA basis is not increased, so the loss is permanently gone (Source: Rev. Rul. 2008-5; IRC Section 1091).

Pub 550 makes the same point through its basis rule, which adds the disallowed loss to the new shares “except in (4) above,” item (4) being an IRA or Roth IRA acquisition (Source: IRS Pub 550 (2025)). Rev. Rul. 2008-5 holds directly: “The loss on the Sale of stock is disallowed under Section 1091. A’s basis in the individual retirement account or Roth IRA is not increased by virtue of Section 1091(d)” (Source: Rev. Rul. 2008-5). In its facts, a $400 loss was disallowed with no basis step-up, so it was never recovered.

Investors who hold the same funds across taxable and retirement accounts often keep loss-harvesting activity walled off from their IRAs for this reason. This coordination question overlaps with broader retirement-tax sequencing, including Roth conversion timing and required minimum distributions.

Spouses, controlled entities, and cross-account tracking

The rule looks past a single account and even past a single person. Pub 550 states: “If you sell stock and your spouse or a corporation you control buys substantially identical stock, you also have a wash sale” (Source: IRS Pub 550 (2025)). This can apply even when spouses file separately (Source: IRS Pub 550 (2025)).

One practical consequence follows from that reach across accounts and taxpayers. A broker’s wash sale tracking is generally limited to activity within the account it administers, so a wash sale that spans a spouse’s brokerage, an IRA, or a second custodian may not be reflected on a single broker statement. Reconciling wash sales across all of those accounts is the taxpayer’s responsibility (Source: IRS Pub 550 (2025), spouse and controlled-corporation rule).

Does the wash sale rule apply to cryptocurrency?

Section 1091 applies to “stock or securities,” and neither IRC Section 1091 nor IRS Pub 550 (2025) lists cryptocurrency as a covered asset. Because the statute is written around stock and securities, many tax practitioners have treated digital assets as outside the rule, but this is a contested, fast-moving area rather than a settled IRS position stated in these primary sources (Source: IRC Section 1091; IRS Pub 550 (2025)).

This guide does not assert that cryptocurrency is exempt as a matter of settled law. It reports only that the reviewed primary sources, IRC Section 1091 and IRS Pub 550 (2025), address stock and securities and do not list digital assets. Because tax rules in this area can change through legislation or new IRS guidance, the current treatment of a digital-asset transaction should be confirmed against the law in effect at the time (Source: IRC Section 1091; IRS Pub 550 (2025)).

How to report a wash sale on your taxes

Wash sales are reported on Form 8949 and carried to Schedule D. The disallowed loss is entered as an adjustment so your deductible loss reflects the disallowance rather than the raw sale figures (Source: IRS Pub 550 (2025); IRS Form 8949 Instructions (2025)).

  1. List the sale on Form 8949 with proceeds and cost basis as reported.
  2. Use adjustment code “W,” the standard wash sale adjustment code, to flag the transaction (Source: IRS Form 8949 Instructions (2025)).
  3. Report the disallowed loss as an adjustment so the deductible amount reflects the disallowance rather than the raw sale figures (Source: IRS Pub 550 (2025)).
  4. Carry the totals to Schedule D.
  5. Track the increased basis (and carried-over holding period) on the replacement shares so the deferred loss is captured when you eventually sell them (Source: IRS Pub 550 (2025)).

How to avoid a wash sale

Under the statute, a loss is generally realized without disallowance in two situations: when no substantially identical security is acquired inside the 61-day window, or when the position is replaced with a security that is not substantially identical. Both fall within Section 1091 rather than outside it (Source: IRC Section 1091; IRS Pub 550 (2025)).

  • Time outside the window. A repurchase of the same security made after the 30-day post-sale period has elapsed generally falls outside the 61-day window described in the statute (Source: IRC Section 1091(a)).
  • A non-identical replacement. Because securities of different corporations are ordinarily not substantially identical, a position in a different issuer or a comparable fund from another provider is not ordinarily treated as substantially identical to the sold security (Source: IRS Pub 550 (2025)).
  • Cross-account activity. The rule reaches automatic DRIP purchases inside the window and purchases in a spouse’s account or an IRA, which are among the more commonly missed triggers (Source: IRS Pub 550 (2025); Rev. Rul. 2008-5).

Loss harvesting also interacts with other retirement-tax thresholds, including the net investment income tax and Medicare IRMAA brackets, so the timing of a realized loss can matter beyond the loss itself.

Work with Q3 Advisors

Q3 Advisors is a registered investment adviser focused on retirement tax planning. Wash sale timing, cross-account coordination, and loss harvesting are factors to weigh with a qualified professional alongside your full tax picture. This article is educational and is not advice or a recommendation; for guidance on your own circumstances, consult a qualified tax or financial professional before acting.

Contact us

Frequently asked questions

What is the wash sale rule?

The wash sale rule, in IRC Section 1091, disallows a tax loss when you sell stock or securities at a loss and buy substantially identical stock or securities within 30 days before or after the sale. The loss is generally added to the basis of the replacement shares rather than deducted currently (Source: IRC Section 1091; IRS Pub 550 (2025)).

How long do you have to wait to avoid a wash sale?

The disallowance window runs 30 days before through 30 days after the sale, a 61-day span including the sale date. A repurchase of substantially identical securities made after the 30-day post-sale period has elapsed generally falls outside the window defined by the statute (Source: IRC Section 1091(a); IRS Pub 550 (2025)).

What happens if you accidentally trigger a wash sale?

There is no penalty. The loss is disallowed for now, and in a taxable account it is added to the cost basis of the replacement shares, deferring the deduction until you sell those shares. The holding period of the sold security carries over to the replacement (Source: IRC Section 1091(d); IRS Pub 550 (2025)).

Does the wash sale rule apply to cryptocurrency?

Section 1091 applies to “stock or securities,” and neither IRC Section 1091 nor IRS Pub 550 (2025) lists cryptocurrency. Practitioners have often treated crypto as outside the rule, but the reviewed primary sources do not address digital assets, and tax rules in this area can change, so the current treatment should be confirmed against the law in effect (Source: IRC Section 1091; IRS Pub 550 (2025)).

Does the wash sale rule apply to my IRA?

Yes, and the result is harsher. If a sale at a loss in a taxable account is matched by an IRA or Roth IRA purchase of substantially identical securities in the window, the loss is disallowed and the IRA basis is not increased, so the loss is permanently lost (Source: Rev. Rul. 2008-5; IRS Pub 550 (2025)).

Does the wash sale rule apply to my spouse’s account?

Yes. Pub 550 states that if you sell stock and your spouse or a corporation you control buys substantially identical stock, you also have a wash sale. This can apply even when spouses file separately, and brokers generally do not net wash sales across separate accounts (Source: IRS Pub 550 (2025)).

Does the wash sale rule apply to options?

Yes. Pub 550 states the rules apply to losses from sales or trades of contracts and options to acquire or sell stock or securities, and can apply to warrants and short sales. They do not apply to commodity futures contracts or foreign currencies (Source: IRS Pub 550 (2025)).

How do I report a wash sale on my taxes?

Report the sale on Form 8949 using adjustment code “W,” the standard wash sale adjustment code, report the disallowed loss as an adjustment, and carry the totals to Schedule D. Then track the increased basis on the replacement shares (Source: IRS Form 8949 Instructions (2025); IRS Pub 550 (2025)).

Sources

IRS Publication 550 (2025), “Wash Sales,” Chapter 4, p.86 (https://www.irs.gov/publications/p550; PDF https://www.irs.gov/pub/irs-pdf/p550.pdf).
Internal Revenue Code Section 1091, Loss from Wash Sales of Stock or Securities (https://www.law.cornell.edu/uscode/text/26/1091); 26 CFR 1.1091-1.
Internal Revenue Code Section 1211(b), Limitation on Capital Losses (https://www.law.cornell.edu/uscode/text/26/1211).
IRS Revenue Ruling 2008-5 (https://www.irs.gov/pub/irs-drop/rr-08-05.pdf).
IRS Instructions for Form 8949 (2025) (https://www.irs.gov/instructions/i8949).

About the author

Craig Wear, CFP®, is the founder of Q3 Advisors, a registered investment adviser focused on retirement tax planning. His work centers on tax-efficient withdrawal sequencing, Roth strategy, and coordinating investment decisions with retirement income. Learn more about the Q3 Advisors team at our team page.

Disclaimer

This article is provided by Q3 Advisors for educational and informational purposes only. It is not tax, legal, or investment advice and is not a recommendation to buy, sell, or hold any security or to pursue any strategy. Tax outcomes depend on your specific circumstances and on current law, which can change. Consult a qualified tax or financial professional before acting. Q3 Advisors is a registered investment adviser; additional information is available in our Form ADV.

Craig Wear Craig Wear
Helping IRA Millionaires save $1 million (or more) in unnecessary taxes

Is a Roth Conversion Right for You?

Get a personalized strategy from the firm that’s saved clients $9 billion in projected taxes

  • 2,400+ families guided through conversions
  • $9B in tax avoidance
  • Built for $1M+ IRAs

no obligation. 45-minute consultation