Wash Sale Rules Complete Guide (2026): Every Scenario Explained with Examples
Last updated: February 7, 2026
You sell a stock at a loss. You plan to claim that loss on your taxes. Then your broker's year-end tax summary arrives, and half your losses are marked "disallowed." Welcome to the wash sale rule.
The wash sale rule is one of the most misunderstood tax rules in investing. It catches people off guard every year—not just through obvious repurchases, but through automatic reinvestment plans, RSU vesting, IRA activity, and even trades in a spouse's account.
This guide covers every scenario the IRS recognizes, with concrete examples and dollar amounts so you understand exactly what happens to your money.
Use the calculator: Before you execute any tax loss harvesting trade, run it through the Wash Sale Calculator to confirm your loss will be allowed. Enter your buys and sells to detect wash sales and see exactly how your cost basis adjusts.
What Is a Wash Sale? The 3 Conditions That Trigger It
A wash sale occurs when all three of the following conditions are met simultaneously:
- You sell a security at a loss
- You acquire a substantially identical security
- The acquisition occurs within 30 calendar days before or after the sale date
All three conditions must be true. If you sell at a gain, there is no wash sale. If you wait 31 days before rebuying, there is no wash sale. The rule exists to prevent investors from generating paper losses for tax purposes while maintaining their market position.
When a wash sale is triggered, the IRS disallows the loss deduction. The disallowed loss is not gone permanently—it gets added to the cost basis of the replacement shares, deferring the tax benefit until you eventually sell those shares. But the timing matters enormously, especially if you need those losses to offset gains this year.
The 61-day window (30 days before + the sale date + 30 days after) is the critical date range to track for every loss sale you make.
Scenario 1: Direct Repurchase (The Most Obvious Case)
The simplest wash sale is selling a stock at a loss and immediately buying it back.
Example:
You bought 100 shares of XYZ at $80 per share ($8,000 total). The stock drops to $60. You sell all 100 shares for $6,000, realizing a $2,000 loss. Then, 10 days later, XYZ reports strong earnings and you buy 100 shares back at $62.
Result: Wash sale triggered. Your $2,000 loss is disallowed. The disallowed loss is added to your new cost basis, so your 100 replacement shares now have a cost basis of $6,200 (62 x 100) + $2,000 = $8,200 total, or $82 per share.
You have not lost the loss forever. But instead of deducting $2,000 this year, you will not realize it until you eventually sell those 100 replacement shares.
The fix: Wait 31 days after your sale before rebuying. Mark the calendar and stick to it.
Scenario 2: Pre-Wash (The IRS Looks Backward Too)
Most investors know not to buy back after a loss sale. Fewer realize the window extends 30 days before the sale as well.
Example:
On March 1, you buy 50 shares of ABC at $100 ($5,000). On March 15, you sell 50 older shares of ABC that you bought years ago at $130 each, realizing a $1,500 loss (sold at $100, basis was $130).
Result: Wash sale triggered. You acquired substantially identical shares only 14 days before your loss sale. The $1,500 loss is disallowed.
This catches investors who try to add to a falling position and then sell their older, higher-basis shares. The purchase before the sale still counts.
Common trap: Buying a dip before deciding to harvest the loss on older shares. Check your purchase history going back 30 days before any planned loss sale.
Scenario 3: Partial Wash Sale (Not Always All-or-Nothing)
If you sell more shares than you repurchase, the wash sale only applies to the portion that was replaced.
Example:
You bought 100 shares of MSFT at $380 per share ($38,000 total). The stock falls to $320. You sell all 100 shares for $32,000, realizing a $6,000 loss. On day 20, you buy back 40 shares at $325.
Result: The wash sale applies to 40 out of 100 shares sold. That is 40% of your loss.
- Disallowed loss: $6,000 x (40/100) = $2,400
- Allowed loss: $6,000 x (60/100) = $3,600
Your 40 replacement shares get a cost basis of $325 + $60 per share (the per-share disallowed loss) = $385 per share.
You can deduct $3,600 now. The $2,400 is deferred into the new shares' basis.
Scenario 4: Multiple Purchases Across Days
If you make several purchases after a loss sale, the wash sale applies share-by-share until either the full loss is absorbed or the 30-day window closes.
Example:
You sell 200 shares of NVDA at a total loss of $4,000 (roughly $20 per share). Over the next 25 days, you buy back shares in three separate purchases:
- Day 5: 50 shares — washes 50/200 of the loss = $1,000 disallowed
- Day 15: 80 shares — washes another 80/200 = $1,600 disallowed
- Day 25: 30 shares — washes another 30/200 = $600 disallowed
Total shares repurchased: 160. Total loss disallowed: $3,200. The remaining 40 shares (40/200 of the loss = $800) were never replaced within the window, so that portion is deductible.
Each replacement purchase picks up a proportional slice of the disallowed loss into its cost basis.
Scenario 5: Options as Replacement (Calls, Puts, Exercises)
Buying options on the same stock counts as acquiring a substantially identical security if the options replicate economic ownership.
The IRS treats these as wash sale triggers:
- Buying call options on the same stock you just sold at a loss
- Selling put options on the same stock (which creates an obligation to buy)
- Exercising options that result in stock ownership within the 30-day window
Example: You sell 100 shares of AAPL at a $3,000 loss on November 1. On November 10, you buy deep in-the-money call options on AAPL expiring in January. The IRS views this as maintaining substantially identical exposure to AAPL. Wash sale triggered, $3,000 loss disallowed.
Options on indexes or different underlying assets are typically fine. But options on the exact same stock you just sold at a loss are a trap.
Scenario 6: Automatic Reinvestment Plans (DRIP)
Dividend reinvestment plans are one of the most common accidental wash sale triggers. If you sell a position at a loss and dividends are automatically reinvested in that same stock within the 30-day window, you have triggered a wash sale.
Example:
You own 500 shares of a dividend stock that pays quarterly dividends. In December, you sell all 500 shares at a $1,200 loss. Your account has DRIP enabled, and on December 28, a dividend reinvestment automatically purchases 3.5 shares.
Result: The wash sale rule applies to those 3.5 shares. The disallowed portion is tiny, but it counts. The IRS does not care that it was automatic.
The fix: Before selling a dividend-paying stock at a loss, turn off DRIP at least 31 days before or after the sale. Then re-enable it after the window closes. Also check for any upcoming dividend payment dates—reinvestments typically happen a day or two after the ex-dividend date.
Scenario 7: Different Accounts (Taxable, IRA, HSA, Joint)
The wash sale rule applies across all accounts you control, not just the one where the sale occurred. The IRS looks at you as an economic unit, not at individual accounts.
Accounts where replacement purchases trigger wash sales:
- Another taxable brokerage account
- Your traditional IRA or Roth IRA
- Your spouse's IRA
- Health Savings Account (HSA)
- Joint taxable account
- Any account where you have ownership or control
The IRA case is the worst outcome. If you sell a stock at a loss in your taxable account and buy the same stock in your IRA within 30 days, the loss is permanently disallowed. Unlike other wash sales where the loss gets added to the replacement shares' cost basis, the IRA basis rules do not allow that adjustment in a meaningful way. You effectively lose that tax deduction forever.
Example:
You sell 100 shares of VTI in your taxable account at a $2,500 loss. Four days later, your monthly automatic contribution to your Roth IRA purchases VTI shares.
Result: $2,500 loss is permanently disallowed. There is no cost basis recovery because the IRA operates under different tax rules.
The fix: Coordinate purchases across all your accounts. Before selling at a loss in a taxable account, check whether any scheduled purchases in your IRAs or HSAs will buy the same or substantially identical securities within the wash sale window.
Scenario 8: Spouse's Account
If you and your spouse file taxes jointly, the IRS treats you as one economic unit for wash sale purposes.
Example:
You sell 200 shares of SPY at a $3,500 loss in your taxable account. The next week, your spouse buys 200 shares of SPY in their separate brokerage account.
Result: Wash sale triggered. $3,500 loss disallowed. This applies whether the purchase is in your spouse's taxable account, IRA, or any other account they control.
The solution is simple: communicate. Before executing a tax loss harvest, make sure your spouse is not planning to buy the same securities in their accounts during the same 61-day window.
Scenario 9: Employer Stock Plans (ESPP, RSU Vesting, Stock Bonuses)
Any acquisition of company stock through employer plans counts as a purchase for wash sale purposes. This includes:
- RSU vesting (the IRS treats vesting as a purchase at fair market value)
- ESPP purchase dates (typically quarterly)
- Stock bonus or option exercise that results in ownership
This is one of the most common wash sale traps for tech workers and anyone with equity compensation.
Example:
You own 300 shares of your employer's stock with a $200 cost basis. The stock drops to $140. You sell 100 shares, realizing a $6,000 loss. Your next RSU vest date is in 18 days—100 shares scheduled to vest.
Result: When those RSUs vest, it triggers a wash sale on 100 shares of your loss sale. The full $6,000 loss is disallowed and gets added to the cost basis of the 100 vested shares.
For a complete breakdown of how to manage wash sales around RSU vesting, read How to Avoid Wash Sales with RSUs.
Scenario 10: Same ETF or Fund (VTI to VTI Is Always a Wash Sale)
Selling an ETF or mutual fund at a loss and then buying the exact same fund is a wash sale, full stop. There is no ambiguity here.
Example: You sell 500 shares of VTI at a $1,800 loss. On day 15, you buy 500 shares of VTI. Wash sale. $1,800 disallowed.
The gray area is "substantially identical" funds—different ticker symbols but nearly identical economic exposure:
| Likely wash sale | Rationale |
|---|---|
| SPY sold, IVV bought | Both track the S&P 500 |
| VTSAX sold, VTI bought | Same fund, different share class |
| VOO sold, IVV bought | Both track the S&P 500 |
| Generally safe to swap | Rationale |
|---|---|
| SPY sold, VTI bought | S&P 500 vs. total market (different index) |
| QQQ sold, SPY bought | Nasdaq 100 vs. S&P 500 |
| VTI sold, VXUS bought | US market vs. international |
The IRS has never issued definitive guidance on which fund swaps constitute "substantially identical." Tax professionals generally agree that switching from one broad index to a meaningfully different broad index (S&P 500 to total market, or US equity to international) is safe. But switching between two ETFs that track the exact same index is risky.
When in doubt, choose a replacement fund that tracks a demonstrably different index or covers a different market segment.
Scenario 11: Short Sales
Wash sale rules also apply to short positions. If you close a short sale at a loss (you shorted at a low price and the stock rose), and you open a new short on the same stock within 30 days, a wash sale can be triggered.
Similarly, closing a short at a loss and then buying the underlying stock long within 30 days can trigger the rule.
Example: You short 100 shares of XYZ at $50, expecting it to drop. The stock rises to $70, so you cover (close) your short at a $2,000 loss. Within 20 days, you short XYZ again at $68.
Result: Wash sale triggered on the new short position. The $2,000 loss from the first short is disallowed.
Scenario 12: Cryptocurrency (Currently Exempt)
As of 2026, cryptocurrency is not subject to wash sale rules under current law. Crypto is classified as property, not a security, and the wash sale rule applies only to securities under IRC Section 1091.
This means you can sell Bitcoin at a loss, immediately rebuy Bitcoin, and still claim the full loss. This is a significant tax advantage that stock investors do not have.
However, this could change. Congress has repeatedly introduced legislation to extend wash sale rules to crypto. Monitor tax law updates if this matters to your portfolio strategy.
What Does NOT Cause a Wash Sale
Understanding what does not trigger the rule is just as important as knowing what does.
These situations do NOT create wash sales:
- Selling at a gain — The wash sale rule only applies to losses
- Waiting 31 or more days before rebuying the same security
- Buying a different company in the same sector (selling Apple and buying Microsoft)
- Switching index families — Selling an S&P 500 fund and buying a total market fund covers enough different holdings that most practitioners consider it safe
- Selling crypto and immediately rebuying crypto (currently)
- Trading in a completely unrelated industry — Selling a bank stock and buying a tech stock
The rule is specifically designed to prevent you from maintaining substantially identical economic exposure while claiming a tax loss. If you genuinely change your investment, the IRS has no basis to disallow your loss.
What Happens to Disallowed Losses? Cost Basis Adjustment Explained
This is the part most investors miss: your disallowed loss is not destroyed. It gets added to the cost basis of the replacement shares.
How the adjustment works:
- You sell 100 shares of AAPL at $150 ($15,000). Your original cost basis was $180 ($18,000). You realize a $3,000 loss.
- On day 20, you buy 60 shares of AAPL at $155 ($9,300).
- The wash sale applies to 60 of your 100 sold shares.
- Disallowed loss: $3,000 x (60/100) = $1,800
- Allowed loss (40 shares worth): $3,000 x (40/100) = $1,200 — you can deduct this now.
- Your 60 replacement shares' cost basis: $9,300 + $1,800 = $11,100 total, or $185 per share
When you eventually sell those 60 shares, your higher basis means a smaller gain (or larger loss), and you effectively recover the deferred $1,800 at that time.
The holding period also transfers. The holding period of the sold shares adds to the holding period of the replacement shares. This matters for distinguishing long-term from short-term capital gains.
One critical exception: If the replacement purchase is inside a traditional IRA or Roth IRA, the cost basis adjustment cannot be applied in a way that gives you the tax benefit. The loss is permanently lost in IRA-triggered wash sales.
How to Calculate Wash Sales
Tracking wash sales manually across multiple accounts and transactions is error-prone. The math compounds quickly when you have partial wash sales, multiple replacement purchases at different prices, and different lot methods (FIFO, LIFO, specific identification).
Use the Wash Sale Calculator to:
- Enter your buy and sell transactions in chronological order
- Automatically detect which transactions trigger wash sales
- Calculate the exact disallowed loss per transaction
- See how each disallowed loss adjusts the replacement shares' cost basis
- Track the full 61-day window for every loss sale
For modeling hypothetical trades before you execute them, the Portfolio Simulator with Wash Sale Detection lets you test different timing scenarios and see the tax outcome before you commit.
Tax Loss Harvesting Without Triggering Wash Sales
Tax loss harvesting remains one of the most powerful legal tax reduction strategies available to investors. The key is doing it without accidentally triggering wash sales.
Core principles:
- Know your upcoming RSU vests, ESPP purchases, and automatic investments before selling at a loss
- Coordinate with your spouse if you file jointly
- Turn off DRIP before selling dividend stocks at a loss
- Use the "substantially different" fund swap technique for staying invested
- Track the 61-day window for every loss sale in every account you own
For a step-by-step process to use before year-end, see the Year-End Tax Loss Harvesting Checklist.
Frequently Asked Questions
Does the wash sale rule apply to mutual funds?
Yes. Mutual funds and ETFs are securities. Selling a mutual fund at a loss and buying the same or substantially identical fund within 30 days is a wash sale.
What if I accidentally triggered a wash sale? Can I fix it?
No. Once the wash sale window closes and a triggering purchase occurred, the loss is disallowed for that tax year. You cannot retroactively undo it. The cost basis adjustment to the replacement shares happens automatically. Going forward, make sure to track the 61-day window for every loss sale.
Does my broker track wash sales for me?
Brokers are required to report wash sales on Form 1099-B for same-account transactions. But they are not required to track wash sales across different accounts. If you triggered a wash sale by buying in a different account or your spouse's account, your broker will not catch it. That is your responsibility.
Can I deduct a wash sale loss in the next year?
Not automatically. The loss is deferred into the replacement shares' cost basis. You realize it when you sell those replacement shares. If you sell them in the following tax year, that is when the loss becomes usable—provided you do not trigger another wash sale.
How long do I need to wait?
Wait at least 31 calendar days after your sale date before rebuying the same security. Counting 31 days from the sale date (not 30) ensures you are safely outside the window.
Related Resources
Wash Sale Guides:
- How to Avoid Wash Sales with RSUs - Specifically for equity compensation holders
- Year-End Tax Loss Harvesting Checklist - Pre-filing action steps
RSU and Equity Compensation:
- RSU Cost Basis and Capital Gains: How to Report
- RSU Vesting and Sale Planning: Avoid Wash Sales and Tax Surprises
Calculators:
- Wash Sale Calculator - Detect wash sales and calculate cost basis adjustments
- Portfolio Simulator - Model trade timing before executing
- Federal Tax Calculator - Estimate how capital losses reduce your tax bill
This content is for educational purposes only and does not constitute tax advice. Consult a qualified tax professional for guidance specific to your situation.