Home

Learn › Taxes & Rules › Stock & Investment Taxes

The Wash-Sale Rule for Stocks

Spot the edge. Swoop in.

Tax-loss harvesting is one of the few reliable ways to reduce your tax bill while staying invested — but the wash-sale rule under IRC §1091 can quietly erase the deduction if you're not paying attention. The rule disallows a loss whenever you acquire substantially identical stock or securities within 30 days before or after the sale, creating a 61-day window that trips up active traders and passive investors alike. The loss isn't permanently gone in most cases, but figuring out where it went — and making sure your broker's 1099-B caught all the relevant transactions — is more complicated than most guides let on. This page covers the full mechanics: what "substantially identical" actually means under case law and IRS guidance, how the disallowed loss shifts to your cost basis, the one scenario where the loss really is permanently eliminated (IRA wash sales), the year-end timing trap, how short sales and bonds fit in, and where cryptocurrency stands as of mid-2026.

By Swoopr Editorial Team

Published · Updated

AI-assisted content · Swoopr is responsible for the final published article.

Key Takeaways

The wash-sale rule is one of the most frequently misunderstood provisions in individual tax law — not because the core idea is hard, but because the edges are much wider than most traders realize. The 61-day window, the cross-account tracking gap, and the IRA carve-out all create situations where you think you've locked in a deduction and actually haven't. This guide is built around closing those gaps.

Direct answer: IRC §1091 disallows a capital loss on a stock or securities sale if you buy or otherwise acquire substantially identical stock or securities within 30 days before or after that sale — a 61-day total window. The disallowed loss is added to the cost basis of your replacement shares (deferring, not permanently eliminating, the deduction), with one critical exception: wash sales that move into an IRA or Roth IRA permanently destroy the loss because there is no mechanism to recover it through a basis adjustment in a tax-advantaged account. Cryptocurrency is not currently subject to the rule, but active legislative proposals exist as of mid-2026.

The 61-Day Window: How the Rule Actually Works

IRC §1091 is titled "Loss from wash sales of stock or securities." Its core rule is straightforward: if you sell stock or securities at a loss and within a period beginning 30 days before the sale date and ending 30 days after the sale date you acquire substantially identical stock or securities (or a contract or option to do so), the loss is disallowed for the year of sale.

The 61-day count includes the day of the sale itself. A sale on November 1 produces a window from October 2 through December 1. Any substantially identical acquisition anywhere in that span — before or after the sale — blocks the loss. The pre-sale window matters because the rule is designed to prevent "round-tripping": buying shares, watching them drop, pre-positioning a purchase to ensure you stay invested, and then selling to claim the loss while never genuinely exiting the position.

What "acquire" means

The trigger is acquiring substantially identical stock or securities, not just buying them. Acquiring a call option on the same stock, receiving shares through an employee stock plan, having an automatic dividend reinvestment plan (DRIP) buy shares, or exercising options can all constitute an acquisition that triggers the rule — even if the transaction was automatic or you weren't thinking about the wash-sale window. Some traders are surprised to discover their DRIP purchases in December triggered a wash sale on a voluntary loss harvest they made that same month.

Calendar timeline example

Imagine selling 200 shares of Acme Corp (ACM) on September 15 at a loss. Your wash-sale window runs from August 16 through October 15 — 61 days centered on September 15. Any of the following would disallow the loss: buying 200 shares of ACM on August 25 (pre-sale); buying 200 shares of ACM on September 20 (post-sale); buying a call option on ACM for October expiry on September 16; having a DRIP purchase of ACM execute on October 1. Buying 200 shares of a different company in the same sector on October 1 would not trigger the rule. Buying 200 shares of ACM on October 16 — one day past the window — would not trigger it either, and the original September 15 loss would be fully deductible.

Practical checklist

What "Substantially Identical" Actually Means

The IRS has deliberately not defined "substantially identical" with a bright line, and the courts have developed the concept through cases rather than a single test. The practical guidance that has emerged distinguishes a small set of clear cases from a much larger gray zone.

Clear cases: substantially identical

Clear cases: not substantially identical

The gray zone

Two situations draw the most practical uncertainty. First, swapping between two ETFs that track the same index from different providers — such as moving from one S&P 500 ETF to another — is widely treated by practitioners as not substantially identical, but the IRS has not ruled definitively. Second, selling a stock and buying a single-stock ETF on that same stock would almost certainly be substantially identical, since the wrapper holds only the security you sold. When in doubt, consult a tax professional rather than relying on general guidance that may not apply to your specific instruments.

Practical checklist

How the Disallowed Loss Affects Your Cost Basis

A disallowed wash-sale loss is not gone — in most cases it is deferred. The mechanics of the deferral run through the cost basis of the replacement shares you acquired during the wash-sale window.

The basis-adjustment rule

Under IRC §1091(d), the amount of the disallowed loss is added to the adjusted cost basis of the replacement shares. When you eventually sell those replacement shares — assuming you do not trigger another wash sale at that point — the higher basis reduces the gain (or increases the loss) you recognize on the new sale, effectively recovering the deferred amount.

The holding period also transfers: the period during which you held the original shares is added to the holding period of the replacement shares. This can matter significantly for long-term vs. short-term capital gains treatment.

Worked Example 1: Basic wash sale

You buy 100 shares of ABC Corp at $50 per share ($5,000 basis). The stock drops to $40 per share. You sell all 100 shares for $4,000, realizing a $1,000 loss. Ten days later you buy 100 shares of ABC Corp again at $38 per share ($3,800).

Worked Example 2: Partial wash sale

You sell 200 shares of DEF Corp at a $2,000 total loss. Within the window you buy back only 100 shares (half the quantity). The wash sale applies proportionally: $1,000 of the loss is disallowed (the half corresponding to the repurchased shares) and $1,000 is deductible. The 100 replacement shares receive a $1,000 basis adjustment, bringing their adjusted basis to purchase price plus $1,000.

Practical checklist

Wash Sales Across Accounts — Including the IRA Trap

The wash-sale rule does not care which account you use for the repurchase. It applies across all accounts you own and, by IRS interpretation, extends to accounts controlled by your spouse.

Spouse's accounts

If you sell stock at a loss and your spouse buys substantially identical stock in their individual brokerage account within the 61-day window, the wash sale rule disallows your loss — even though the accounts are legally separate. The IRS treats the two spouses as one taxpayer for wash-sale purposes on their joint return. This cross-spousal tracking is entirely invisible to both brokers, which means neither 1099-B will flag the problem, and the combined error does not surface until — or unless — you or a tax preparer reconcile the accounts manually.

The IRA permanent-loss scenario

The most severe version of the cross-account problem involves retirement accounts. Under IRC §1091(d), when a wash sale disallows a loss, the disallowed amount is added to the basis of the replacement shares "in the hands of the taxpayer." An IRA is not taxed in the same hands as a taxpayer's ordinary account — gains inside a traditional IRA are not taxed until withdrawal, and Roth IRA gains are never taxed. Because there is no tax-basis tracking mechanism inside an IRA that corresponds to the taxpayer's personal cost basis, there is no way to recover the disallowed loss through a future IRA sale.

The result: if you sell shares at a $3,000 loss in your taxable account and your traditional IRA or Roth IRA buys substantially identical shares within 30 days, the $3,000 loss is disallowed — and permanently gone. No basis adjustment is available. No future deduction recovers it. The IRA wash sale is widely considered one of the most costly and least understood traps in individual tax law.

The same analysis applies in reverse direction: if your IRA sells and your taxable account buys, or if your Roth IRA buys and your taxable account had previously sold. Retirement accounts on either side of the window create the permanent-loss problem.

Practical checklist

Year-End Timing Issues

Tax-loss harvesting is most commonly attempted in November and December, which is exactly when the year-end wash-sale timing trap is most dangerous. The rule creates a disconnect between the calendar year and the wash-sale window that catches many traders in January.

The December-January problem

Consider a sale on December 15. The 30-day post-sale window extends through January 14 of the following year. Any substantially identical purchase made in any covered account between December 15 and January 14 will disallow the December loss. The disallowed loss does not appear on the current year's tax return; instead, it becomes a basis adjustment to the January replacement shares, carrying into the new tax year.

The timing mismatch is compounded by the fact that many investors mentally reset at January 1 — they assume a December loss sale is complete and settled when the new year begins, and they feel free to repurchase their desired position. The IRS does not reset at January 1.

The pre-sale window in late November

The 30-day pre-sale window is equally relevant at year-end. A purchase of a stock on November 28 starts a pre-sale window that, if followed by a loss sale of the same stock before December 28, retroactively triggers a wash sale on that purchase. If your November purchase was meant to add to a position and you then decide to harvest a loss before year-end, you may find the pre-sale window has already closed the opportunity.

Practical checklist

How Brokers Report Wash Sales on Form 1099-B

Brokers are required by IRS regulations to track wash sales within a single account and report them on Form 1099-B, the annual statement that covers proceeds from broker transactions. Understanding what brokers do — and do not — report is essential for anyone trading in more than one account.

What appears on the 1099-B

When a broker detects a wash sale within the same account, it reports the disallowed loss amount in Box 1g of Form 1099-B ("Wash sale loss disallowed") and adjusts the cost basis of the replacement shares to include the disallowed amount. Those adjusted transactions flow to Form 8949 on your tax return, identified with adjustment code "W." If you use tax software that imports 1099-B data directly, the wash-sale adjustment should carry through automatically — but only for transactions your broker actually tracked.

The critical tracking gap

Brokers are required to track wash sales only within a single account at their own firm. They are not required to detect wash sales across:

If you sell at a loss at Broker A on November 5 and buy the same stock at Broker B on November 10, you have a wash sale — but both 1099-Bs will show the transactions without any wash-sale flag. The adjustment must be made manually on Form 8949, and failing to make it is a real tax reporting error even if neither broker flagged it.

Practical checklist

Short Sales, Bonds, and Less Common Securities

The wash-sale rule extends beyond simple buy-sell-repurchase transactions with common stock. Several less common trading patterns interact with §1091 in ways worth understanding.

Short sales

IRC §1091(e) extends wash-sale rules to short sales. If you close a short sale at a loss and within the 61-day window you open another short sale in the same substantially identical security, the loss on the closed short is disallowed. Similarly, if you already hold the substantially identical security long before closing the short at a loss, the pre-existing long position can trigger the wash sale. Short sellers doing tax-loss management at year-end face the same window considerations as long sellers, applied to both the timing of closing shorts and the timing of opening new ones.

Bonds

The wash-sale rule applies to bonds as well as stocks — they are "securities" for §1091 purposes. However, two bonds from the same issuer are generally not substantially identical if they differ materially in maturity date, coupon rate, or face value. A 5-year corporate bond and a 10-year corporate bond from the same company are typically treated as different securities, making a bond swap between different maturities a viable tax-loss harvesting technique for fixed-income portfolios. Bonds that are identical in all material terms (same issuer, same maturity, same coupon) would be substantially identical and a wash sale.

Convertible bonds and preferred stock

Convertible bonds or convertible preferred stock of the same company can be substantially identical to the common stock, particularly when the conversion is at or in the money and economically equivalent to holding the common. The IRS evaluates the specific terms; positions that are deeply out of the money on their conversion feature are less likely to be treated as substantially identical to the common stock they could theoretically convert into.

Practical checklist

Cryptocurrency and the Wash-Sale Rule: Current Law and Legislative Risk

As of mid-2026, cryptocurrency is not subject to the wash-sale rule. The reason is definitional: IRC §1091 applies to "stock or securities" as defined under the Securities Exchange Act and the Internal Revenue Code, and the IRS classifies digital assets — including Bitcoin, Ethereum, and altcoins — as property rather than securities. Property falls outside §1091's scope.

The current crypto exemption in practice

This means crypto investors can sell a Bitcoin position at a loss on Monday and repurchase the identical amount of Bitcoin on Tuesday, recognizing the full tax loss while never actually leaving the position — a strategy called "bed and breakfast" trading in some jurisdictions and simply "tax-loss harvesting without the wait" in the crypto community. No 61-day wait, no substantially-identical analysis, no wash-sale disallowance. The same flexibility applies to all tokens and coins currently treated as property.

Legislative risk

Congress has introduced multiple bills that would close the crypto wash-sale loophole by extending §1091 to digital assets. The Digital Asset Market Structure and Investor Protection Act, introduced in 2021, was one of the earliest proposals. The 2022 Inflation Reduction Act included a crypto wash-sale provision that was ultimately removed before passage. As of mid-2026, the push has renewed: multiple bipartisan proposals are in the legislative pipeline, including measures that would apply wash-sale rules to crypto while also providing stablecoin and staking relief. No bill has cleared both chambers. But the direction of legislative intent has been consistently toward extension — the current exemption exists because Congress hasn't acted yet, not because Congress intends the exemption to be permanent.

For a detailed breakdown of the legislative proposals and how they would affect specific crypto tax strategies, see our companion page: The Wash-Sale Rule and Crypto.

Practical checklist

Misconceptions vs. Reality

MisconceptionReality
The wash-sale rule only applies if you buy the exact same shares you soldIt applies to any substantially identical securities — same ticker from any purchase, options on the same stock, convertible instruments — not just a rebuy of the identical lot
If my 1099-B shows no wash-sale adjustment, I don't have oneBrokers only track wash sales within a single account at their firm; cross-account, cross-broker, and IRA wash sales never appear on any 1099-B
The disallowed loss is gone foreverIn most cases the loss is deferred, not eliminated — it moves to the replacement shares' cost basis and is recovered when those shares are eventually sold. The exception is IRA wash sales, where the loss is permanently gone
The wash-sale window resets on January 1A December loss sale produces a window extending into January; purchases in January within 30 days of the December sale date will still disallow the December loss
The rule only applies to sales in my own accountWash sales between your account and your spouse's account, and between your taxable account and any IRA or Roth IRA you control, are all covered
Buying a different ETF that tracks the same index avoids a wash saleGenerally true, but the IRS has not ruled definitively on ETF swaps tracking the same index from different providers — most practitioners treat it as safe, but it is a gray area
Crypto wash-sale harvesting is a permanent feature of the tax codeCrypto is currently exempt because it's property not a security, but multiple active legislative proposals would extend §1091 to digital assets — the exemption is not guaranteed to persist
My broker's tax report will catch any wash-sale issues I need to know aboutBrokers report what they can see within a single account; multi-account and multi-broker reconciliation falls on the taxpayer and their tax preparer

Common Mistakes

The most consequential wash-sale errors cluster around three patterns.

Harvesting a loss and buying back too soon. The most common mistake is simply miscounting the window. Traders who think "I'll wait a month" and repurchase on day 28 or 29 have made a wash sale and don't realize it until their 1099-B arrives. Day 31 is the first safe repurchase date after a loss sale; day 30 is still inside the window.

Ignoring IRA and spouse purchases. Most tax-loss harvesting guides focus on the same taxable account. The more experienced and diversified a household's accounts become, the more likely a repurchase somewhere in the family's combined account structure will inadvertently trigger a wash sale — especially with IRAs, where the result is a permanent loss with no recovery.

Trusting the 1099-B as the final word on wash sales. The 1099-B reporting requirement creates a false sense of completeness. If your broker flagged some wash sales and not others, you could interpret the flagged ones as the full picture. In reality, any cross-account transaction in the same security during the window is a real wash sale whether or not it shows on any tax form. The obligation to report correctly falls on the taxpayer regardless of broker reporting.

Pre-Sale Wash-Sale Checklist

Before executing any tax-loss sale, work through this list:

  1. Check the pre-sale window (past 30 days). Have you purchased or received substantially identical shares in any account in the last 30 days? If yes, a wash sale for those lots is already locked in — you can still sell, but the loss corresponding to recently acquired lots will be disallowed.
  2. Check all accounts in the household. Include your own taxable and IRA accounts and your spouse's taxable and IRA accounts. A purchase in any of these within the window triggers the rule.
  3. Check for DRIP or automatic purchases. If any account has dividend reinvestment or automatic periodic purchases of the same security enabled, verify the next scheduled purchase falls outside the post-sale window, or pause it temporarily.
  4. Identify your replacement position. Choose a non-substantially-identical security that provides similar market exposure — a different company, or a broader index ETF if you want sector exposure — and be ready to buy it immediately after the loss sale to avoid losing market exposure during the wait.
  5. Calendar the repurchase date. Mark day 31 on your calendar. A sale on the 15th means the earliest clean repurchase is the 16th of the following month.
  6. If year-end, plan into January. For December sales, the post-sale window crosses into January. Plan your calendar accordingly — "year-end" does not mean the rule ends at December 31.
  7. Document the basis adjustment. Record the disallowed loss amount and the adjusted basis of your replacement shares in a spreadsheet outside your broker's system, so the adjustment is available at tax time regardless of what any 1099-B shows.

Frequently Asked Questions

What is the wash-sale rule?

The wash-sale rule, codified in IRC §1091, disallows a tax loss on a sale of stock or securities if you acquire substantially identical stock or securities within 30 days before or after that sale — a total window of 61 days. The disallowed loss is not permanently eliminated: it is added to the cost basis of your replacement shares and deferred until you sell those shares without triggering another wash sale. The rule applies to stocks, bonds, options, and other securities; cryptocurrency is not currently covered under existing law.

What counts as 'substantially identical' under the wash-sale rule?

The IRS has not issued a precise definition, but the same company's stock bought and sold at any price is the clearest case. Options on the same underlying stock can also be substantially identical to the stock itself. Preferred stock or bonds convertible into the same company's common stock may qualify depending on their terms. What is generally not substantially identical: a different company's stock in the same sector, an ETF tracking the same index (even if the sold stock is a major constituent), or bonds from the same issuer that carry meaningfully different terms such as maturity date or coupon rate.

Does the wash-sale rule apply if I buy replacement shares in an IRA or Roth IRA?

Yes, and IRA wash sales are the most costly version of the rule. If you sell shares at a loss in a taxable brokerage account and repurchase substantially identical shares in a traditional IRA or Roth IRA within the 61-day window, the loss is disallowed permanently — it is not added to the IRA's cost basis because of the tax-advantaged nature of retirement accounts. Unlike a repurchase in a taxable account (where the disallowed loss shifts forward as a basis adjustment), the IRA wash sale provides no future recovery. The same outcome applies to wash sales between your taxable account and your spouse's IRA.

How does a wash-sale disallowance affect my cost basis?

The disallowed loss amount is added to the cost basis of the replacement shares. Example: you sell 100 shares of XYZ at a $500 loss, then buy 100 shares of XYZ back within 30 days for $3,000. The wash sale disallows the $500 loss and your replacement shares' adjusted basis becomes $3,500 ($3,000 purchase price plus $500 disallowed loss). When you eventually sell those replacement shares without triggering another wash sale, you will recognize the extra $500 basis — recovering the deferred loss at that time. The holding period of the disallowed shares also transfers to the replacement shares.

Do I need to track wash sales across multiple brokerage accounts myself?

Yes. Brokers are required to detect and report wash sales on Form 1099-B only for transactions within a single account at their own firm. They are not required to track wash sales across multiple accounts at the same broker, between accounts at different brokers, or between taxable accounts and IRAs. If you sell a stock at a loss at Broker A and repurchase it at Broker B within the 61-day window, that is a real wash sale under §1091 that will not appear on either 1099-B — you are responsible for identifying it, making the adjustment on Form 8949, and reporting it correctly.

What is the year-end wash-sale trap and how do I avoid it?

The year-end trap occurs because the 30-day window following a sale runs into the next calendar year. If you sell a losing stock position on December 15 to harvest the loss, the post-sale window extends through January 14 — any substantially identical shares purchased by January 14 in any covered account will disallow the December loss. That loss then does not appear on the current year's return and carries forward as a basis adjustment into the new year. To avoid it, ensure you either wait 31 days after the sale before repurchasing, or purchase a non-substantially-identical replacement (such as a different company or a different sector ETF) to maintain market exposure during the wait.

Does the wash-sale rule apply to cryptocurrency?

No, not under current law. IRC §1091 applies to 'stock or securities,' and the IRS classifies cryptocurrency as property rather than a security. This means crypto investors can sell a position at a loss and immediately repurchase the same asset without triggering a wash sale — an option unavailable with stocks. However, Congress has introduced multiple bills since 2021 that would extend the rule to digital assets. As of mid-2026, new legislation is actively being proposed and has bipartisan support in some quarters, but no bill has cleared Congress. The current crypto exemption should not be treated as permanent; see our companion page on the wash-sale rule and crypto for the latest legislative status.

How does my broker report wash sales on Form 1099-B?

When a broker detects a wash sale within a single account, it reports the disallowed loss amount in Box 1g of Form 1099-B and adjusts the reported cost basis of the replacement shares to include the disallowed amount. The adjusted transactions appear on Form 8949 with adjustment code 'W.' Critical limitation: brokers track wash sales only within the same account at their firm. Cross-account and cross-broker wash sales do not appear on any 1099-B, placing the tracking and reporting burden squarely on the taxpayer. If multiple accounts are involved, reconcile all accounts together before trusting that your 1099-B totals are complete.

Sources and Methodology

This guide describes the wash-sale rule as codified in IRC §1091 and as interpreted under publicly available IRS guidance and related case law, reviewed as of August 2026. Key sources include:

This content was reviewed by the Swoopr Editorial Team in August 2026 and reflects publicly available information at that time. Tax law can change; verify current rules with a qualified tax professional or the IRS before making tax-related decisions. This guide is for educational purposes only and does not constitute personalized tax or investment advice.

Conclusion

The wash-sale rule does exactly what it was designed to do: prevent the recognition of a tax loss from a sale that isn't a real economic exit from a position. Understanding it requires going beyond the basic "don't buy back for 30 days" summary — the window is 61 days not 30, it applies across all accounts in the household (including IRAs, where the consequence is a permanent loss), it extends into the new year regardless of calendar-year accounting, and the broker's 1099-B only captures a subset of the wash sales that legally exist. For active traders and year-end tax-loss harvesters, the details here are the difference between a real deduction and a disallowed one that won't show up until tax season. Keep records across all accounts, plan the window with a calendar, and treat the IRA scenario as a hard stop rather than something to think about after the fact.

Related Reading