On this page
Wash Sale Rule: How the 61-Day Window Works
The wash sale rule is a US tax provision that disallows a capital loss when you buy back a substantially identical security within 30 days before or after the sale. The disallowed loss is not lost forever. It is added to the cost basis of the replacement shares and deferred until you eventually sell them.
Key Takeaways
- The wash sale rule blocks a capital loss when you buy back a substantially identical security within a 61-day window centered on the sale date.
- The disallowed loss is deferred, not destroyed, it increases the cost basis of the replacement shares, so you recover it when those shares are eventually sold.
- The worst outcome is a purchase inside an IRA within the window: Revenue Ruling 2008-5 makes the loss permanently gone because IRA basis cannot be increased.
- The rule applies at the taxpayer level across all accounts, including a spouse's accounts, so cross-account buys can silently disallow a planned harvest.
Key Takeaways
- The wash sale rule blocks a capital loss when you buy back a substantially identical security within a 61-day window centered on the sale date.
- The disallowed loss is deferred, not destroyed, it increases the cost basis of the replacement shares, so you recover it when those shares are eventually sold.
- The worst outcome is a purchase inside an IRA within the window: Revenue Ruling 2008-5 makes the loss permanently gone because IRA basis cannot be increased.
- The rule applies at the taxpayer level across all accounts, including a spouse's accounts, so cross-account buys can silently disallow a planned harvest.
What It Is
The rule is codified in Internal Revenue Code Section 1091 and administered through IRS Publication 550. It applies whenever you realize a loss on stock, bonds, options, ETFs, or mutual funds and acquire substantially identical securities within a 61 day window that starts 30 days before the loss sale and ends 30 days after it.
The rule only affects losses. Gains are never subject to wash sale treatment. If you sell at a profit and buy back the next day, the gain is fully taxable and the rule does not enter the picture.
The Intuition
Congress wanted to stop investors from generating artificial tax losses without meaningfully changing their economic position. If you could sell a stock on December 30, claim the loss, and buy it back on January 2, you would keep the same exposure while pocketing a deduction. The wash sale rule blocks that maneuver. It says the loss is real only if you actually step away from the position for at least 30 days.
The key insight is that the loss is deferred, not eliminated. Your cost basis in the replacement shares is increased by the disallowed amount, so when you finally sell those shares, the deduction flows through. The rule changes the timing, not the economics, as long as you follow it.
How It Works
Three elements trigger the rule:
- You sell a security at a loss.
- You buy a substantially identical security within the 61 day window.
- The purchase can occur in any account you control, including IRAs and spouse accounts.
When triggered, the disallowed loss is added to the basis of the replacement shares. The holding period of the original shares carries over to the replacement lot. Brokers report wash sales on Form 1099-B and you note them on Form 8949 with code W in column (f), entering the disallowed amount as a positive number in column (g).
disallowed loss = original basis - sale proceeds (if negative)
new basis = purchase price of replacement + disallowed loss
The IRS has never published a bright-line definition of "substantially identical." Common stock of the same company clearly qualifies. Two S&P 500 index funds from different issuers are a gray area that most practitioners treat conservatively as identical. An S&P 500 fund and a total market fund are generally considered different enough to avoid the rule.
Worked Example
Suppose you bought 100 shares of XYZ at $80 for a basis of $8,000. On November 15 you sell all 100 shares at $60, realizing a $2,000 loss. On December 5, 20 days later, you buy 100 shares of XYZ at $62.
The November 15 loss is disallowed because the repurchase falls inside the 30 day post-sale window. The $2,000 loss is added to the new basis:
new basis = (100 * $62) + $2,000 = $8,200
Your holding period also dates back to the original purchase. When you eventually sell the replacement shares, the deferred $2,000 flows through as part of the gain or loss calculation. If you had waited until December 16, more than 30 days after the sale, the original $2,000 loss would have been fully deductible.
Common Mistakes
-
Triggering the rule through a spouse account. The IRS treats your spouse as the same taxpayer for wash sale purposes. Selling XYZ at a loss in your taxable account while your spouse buys XYZ in her IRA creates a wash sale. Many couples learn this only at tax time when the 1099-B arrives.
-
Forgetting that IRAs make the loss permanent. Revenue Ruling 2008-5 held that a loss in a taxable account followed by a purchase in your own IRA creates a wash sale, and the disallowed loss cannot be added to the IRA basis. The deferral mechanism breaks, so the loss is gone for good. This is the single worst wash sale outcome.
-
Assuming similar ETFs are safe. Swapping IVV for VOO, or SPY for SPLG, replaces one S&P 500 tracker with another. The IRS has never ruled on whether index funds of the same benchmark count as substantially identical, and most advisors recommend avoiding this swap. Moving to a different index entirely, such as a total market or equal-weight fund, is the safer path.
-
Dividend reinvestment triggering unintentional wash sales. If DRIP is turned on and a dividend reinvestment purchases shares within 30 days of a loss sale, even a fractional share, the rule applies to a proportional piece of the loss. Turn off DRIP in the 30 days surrounding planned harvesting.
-
Miscounting the 61 day window. The window extends both backward and forward from the loss sale. A purchase on October 15 followed by a loss sale on November 10 is still inside the 30 day pre-sale window. Traders often forget that a recent purchase can poison a later harvest.
Frequently Asked Questions
Q: What is the wash sale rule in simple terms? If you sell a stock at a loss and buy the same stock back within 30 days before or after the sale, the IRS disallows the loss for that year. The loss is not erased, it is tacked onto the cost basis of the shares you bought back and deducted later when you finally sell.
Q: How does the wash sale rule affect investment decisions? It forces investors to wait at least 31 days before buying back a sold security, or to substitute a similar but not substantially identical security during the window. Failure to plan around it can convert a deliberate harvest into a useless deferred deduction.
Q: What is a real-world example of the wash sale rule? You sell 100 shares of XYZ at a $2,000 loss on November 15. On December 5, you buy 100 shares of XYZ back. The $2,000 loss is disallowed. Your new shares get a $2,000 basis bump, so the deduction follows you to the eventual sale, unless that sale is inside an IRA, where it is lost permanently.
Q: How can investors avoid triggering the wash sale rule? Wait 31 or more days before repurchasing, substitute a fund tracking a different index, or buy shares in a sector ETF rather than the specific stock sold. Also turn off dividend reinvestment in the 30 days around any planned harvest to avoid fractional-share purchases inside the window.
Q: How is the wash sale rule different from capital loss limitations? Capital loss limitations cap how much net loss can offset ordinary income each year ($3,000), but the loss itself survives and carries forward. A wash sale disallows the loss timing and defers the deduction into replacement-share basis. In an IRA scenario, a wash sale makes the loss disappear entirely, far worse than a carryforward limit.
Sources
- Internal Revenue Service. "Publication 550 (2025), Investment Income and Expenses." https://www.irs.gov/publications/p550
- Cornell Legal Information Institute. "26 U.S. Code Section 1091: Loss from wash sales of stock or securities." https://www.law.cornell.edu/uscode/text/26/1091
- Internal Revenue Service. "Revenue Ruling 2008-5." https://www.irs.gov/pub/irs-drop/rr-08-05.pdf
- Charles Schwab. "A Primer on Wash Sales." https://www.schwab.com/learn/story/primer-on-wash-sales
- Fidelity. "Wash-Sale Rules: Avoid This Tax Pitfall." https://www.fidelity.com/learning-center/personal-finance/wash-sales-rules-tax
Disclaimer
This article is educational content only and is not financial or tax advice. Tax rules vary by jurisdiction and personal situation, and the treatment described here may not apply to you. Consult a licensed CPA or tax attorney before acting on any tax strategy.
Back to your knowledge path