Quick Answer
The wash sale rule disallows your tax deduction when you sell an investment at a loss and repurchase the same or substantially identical security within 30 days before or after the sale (a 61-day window total). The disallowed loss is not permanently lost — it gets added to your cost basis — but cross-account wash sales into an IRA can permanently destroy the deduction.
What Is the Wash Sale Rule?
Every investor eventually sells a losing position — and correctly expects to deduct that loss on their taxes. The wash sale rule exists specifically to prevent one thing: harvesting a tax loss while maintaining the exact same market exposure by immediately buying the same security back.
Under IRS rules, if you sell a security at a loss and buy the same or a substantially identical security within 30 days before or after the sale, you cannot claim the tax deduction. The disallowed loss is instead added to the cost basis of the replacement shares — deferring rather than destroying the loss in most cases.
That "most cases" qualifier matters enormously. When wash sales cross into IRAs or your spouse's accounts, the loss can be permanently gone. Understanding the nuances of this rule before you tax-loss harvest in December can save you thousands of dollars in unexpected tax consequences.
The 61-Day Window: How the Timing Works
Most people understand the rule as "30 days" — but it's actually a 61-day window: 30 days before the loss sale, the day of the sale itself, and 30 days after. You can trigger the rule by purchasing shares before you even sell the losing position.
The 61-Day Window Visualized
Day +31 or later: You can freely repurchase the same security on Day 31 or beyond without triggering the wash sale rule. Set a calendar reminder — most tax-loss harvesting mistakes happen because investors forget to count back the 30 days before the sale.
The Pre-Sale Trap
You bought 100 shares of XYZ on November 15. On December 5 you buy another 100 shares of XYZ. On December 10 you sell the original 100 shares at a loss. The wash sale rule applies — because you bought "substantially identical" shares within 30 days before the sale. This surprises even experienced investors.
What Counts as "Substantially Identical"?
The IRS has never published a fully definitive list of what "substantially identical" means. However, the following is the general consensus based on IRS rulings, tax court cases, and standard tax advisor guidance:
| Transaction | Wash Sale? | Reason |
|---|---|---|
| Sell AAPL, buy AAPL within 30 days | YES | Exact same security |
| Sell SPY, buy IVV within 30 days | LIKELY YES | Both track S&P 500 — substantially identical per most tax advisors |
| Sell SPY, buy VOO within 30 days | LIKELY YES | Both track S&P 500 index exactly |
| Sell SPY, buy VTI within 30 days | PROBABLY NO | VTI tracks total market (3,500+ stocks), not just S&P 500 |
| Sell Ford, buy GM within 30 days | NO | Different companies, different securities |
| Sell XLK (tech ETF), buy QQQ within 30 days | GRAY AREA | Similar but different holdings and methodology |
| Sell stock, buy call option on same stock | YES | Options on the same stock are substantially identical |
| Sell a mutual fund, buy similar fund from different company | PROBABLY NO | Different securities even if similar strategy |
| Sell Bitcoin at a loss, buy Bitcoin within 30 days | NO (currently) | Crypto classified as property, not security — rule does not apply yet |
The S&P 500 ETF problem: The IRS has not issued a formal ruling on whether SPY/IVV/VOO are substantially identical to each other. Most tax professionals treat them as substantially identical because they track the exact same index with the same 500 stocks. When in doubt, swap into a clearly different index (total market vs. S&P 500) to eliminate any uncertainty.
What Happens to the Disallowed Loss?
When a wash sale is triggered, the disallowed loss is not gone — it is added to the cost basis of the replacement shares. This means you will eventually get the deduction when you sell the replacement shares, assuming you wait long enough before selling again.
Cost Basis Adjustment Example
Original purchase
Buy 100 shares of XYZ at $50 = $5,000 cost basis
Loss sale
Sell 100 shares at $40 = $4,000 proceeds. Loss = $1,000
Wash sale triggered
Buy 100 shares of XYZ at $42 within 30 days — wash sale rule applies
Cost basis adjusted
New cost basis = $42 + $10 (disallowed loss per share) = $52 per share
Future sale
When you sell the replacement shares, the $1,000 loss is embedded in the higher basis — you get it eventually
The IRA Cross-Account Trap — Loss Permanently Destroyed
If you sell a security at a loss in a taxable account and buy the same security in a traditional IRA or Roth IRA within the 61-day window, the wash sale rule applies — and the loss is permanently destroyed, not deferred.
Why? Because IRAs are tax-advantaged accounts with different cost-basis tracking rules. The IRA cannot receive the adjusted cost basis, so the disallowed loss cannot be transferred. It disappears completely. This is one of the most expensive tax mistakes active investors make in December.
How to Tax-Loss Harvest Without Triggering the Rule
Tax-loss harvesting — selling losing positions to offset capital gains — is one of the highest-value tax strategies available to investors. The wash sale rule doesn't prohibit it; it just requires you to swap into a genuinely different security, or wait 31 days before repurchasing.
Strategy 1: Wait 31 days
The simplest approach. Sell the losing position, hold cash or park in a money market fund, then repurchase the exact same security on Day 31. You capture the tax loss and eventually get the same exposure back. Risk: the market could move meaningfully in those 31 days.
Strategy 2: Swap to a similar-but-different ETF
Sell SPY and immediately buy VTI (total market instead of S&P 500). Sell an individual stock and buy a sector ETF covering that industry. You maintain market exposure during the 31-day window without triggering the rule. This is the approach robo-advisors use for automatic tax-loss harvesting.
Strategy 3: Swap to a different stock in the same sector
Sell Ford at a loss, buy GM. Sell JPMorgan, buy Bank of America. Different companies are not substantially identical under any current IRS interpretation. You maintain sector exposure without triggering the rule.
Strategy 4: Use tax-loss harvesting software
Robo-advisors like Betterment and Wealthfront offer automatic tax-loss harvesting that monitors for opportunities and automatically executes compliant swaps without triggering wash sales. For large portfolios, this can generate significant annual tax alpha.
Year-End Tax-Loss Harvesting Checklist
Check all taxable accounts for unrealized losses
Verify you have no existing purchases of the same security in the past 30 days across ALL accounts (including IRA and spouse's accounts)
Identify a replacement security that maintains similar exposure but is not substantially identical
Execute the swap — sell the loser, immediately buy the replacement
Set a calendar reminder for Day 31 to evaluate repurchasing the original security if desired
Inform your tax preparer of all wash sale transactions — brokers are required to report them on Form 1099-B
Does the Wash Sale Rule Apply to Crypto?
As of 2026, the wash sale rule does not apply to cryptocurrency under current IRS classification. Because the IRS classifies crypto as property rather than a security, the wash sale rule — which applies specifically to securities — technically does not cover it.
Current status (2026)
Crypto investors can sell Bitcoin at a loss and immediately repurchase it — capturing the tax loss while maintaining full exposure. This "crypto tax-loss harvesting" is currently legal and widely practiced.
Proposed legislation
Congress has repeatedly proposed extending the wash sale rule to crypto. The Digital Asset Anti-Money Laundering Act and other bills have included this provision. This could change with any tax reform bill — watch for updates.
Frequently Asked Questions
What is the wash sale rule?
The wash sale rule is an IRS rule that disallows a tax deduction when you sell a security at a loss and buy the same or a substantially identical security within 30 days before or after the sale. The disallowed loss is added to the cost basis of the replacement shares instead of being deducted immediately.
Does the wash sale rule apply to crypto?
As of 2026, cryptocurrency is classified as property, not a security, so the wash sale rule technically does not apply to crypto. However, Congress has proposed legislation to extend it to crypto — always check current IRS guidance.
Can the wash sale rule be triggered in a different account?
Yes. The wash sale rule applies across all accounts you own or control, including IRAs, 401(k)s, and your spouse's accounts. Cross-account wash sales into IRAs are particularly dangerous because the loss can be permanently destroyed rather than deferred.
What is substantially identical under the wash sale rule?
Substantially identical generally means the exact same security (same ticker, same bond, same option). Different stocks in the same sector are generally not substantially identical. Different ETFs tracking the exact same index may be substantially identical — the IRS has not issued definitive guidance.
How do I avoid the wash sale rule when tax-loss harvesting?
Wait 31 days before repurchasing the same security, or swap into a similar-but-not-identical security: sell SPY and buy VTI, sell an individual stock and buy a sector ETF. These maintain market exposure without triggering the rule.
Bottom Line
The wash sale rule is genuinely confusing — the 61-day window, the cross-account trap, the IRA permanence issue — but once you understand the mechanics, it's entirely avoidable. The key is to plan before you sell, not after.
Casual investors
Focus on the 31-day rule. Don't repurchase the same ETF or stock within 30 days after selling at a loss — or within 30 days before.
Active traders
Monitor all accounts simultaneously. The cross-account risk — especially into IRAs — is where experienced investors most commonly destroy losses permanently.
Tax-loss harvesters
Build a list of "swap pairs" in advance — SPY/VTI, AAPL/MSFT, etc. Execute the swap immediately rather than holding cash during the 31-day window.
Pattern Day Trader Rule — What Active Traders Also Need to Know
Active traders rushing to complete tax-loss harvesting swaps in late December often hit a second problem: day trade count limits. If your account is under $25,000, executing loss-harvest swaps in a margin account can trigger the PDT restriction — exactly when you need maximum flexibility. The PDT article covers cash account workarounds, the 5-business-day rolling window, and how to trade around it without the $25k minimum.
