Wash Sale Rule Explained: How the IRS Disallows Losses
The IRS wash sale rule blocks stock loss deductions if you rebuy within 61 days. Learn the rule, see examples, and use our calculator to check your trades.
You sold a stock at a loss to lower your tax bill. Then you bought it back a few weeks later because you still liked the company. The IRS just blocked your deduction.
That is the wash sale rule in action. It is one of the most common and costly tax mistakes investors make, especially during tax-loss harvesting season. In 2026, with markets volatile and tariff uncertainty driving big swings, more investors than ever are triggering wash sales without realizing it.
Here is everything you need to know to stay on the right side of the rule.
What Is the Wash Sale Rule?
The wash sale rule is an IRS regulation under Section 1091 of the Internal Revenue Code. It prevents you from claiming a tax deduction on a security sold at a loss if you purchase a substantially identical security within a specific time window.[1]
The rule exists because without it, investors could sell a stock on December 30, claim the loss on their taxes, and buy the same stock back on January 2. They would get a tax break without actually changing their investment position.
Congress decided that was not a real economic loss, so they created the wash sale rule to close the loophole.
The 61-Day Window
The wash sale window is 61 days total:
- 30 days before the sale at a loss
- The day of the sale itself
- 30 days after the sale
If you purchase substantially identical securities anywhere within this 61-day window, your loss is disallowed.[2]
This means the rule can be triggered by a purchase you made before the loss sale. If you bought shares on March 1 and sold your original shares at a loss on March 25, that March 1 purchase is within 30 days before the sale and triggers a wash sale.
The 61-Day Wash Sale Window
Example: How a Wash Sale Works
Here is a step-by-step example:
- You own 100 shares of XYZ Corp, purchased at $50 per share ($5,000 total cost)
- On March 10, you sell all 100 shares at $35 per share ($3,500 proceeds)
- Your loss is $1,500
- On March 28, you buy 100 shares of XYZ Corp at $37 per share ($3,700)
- Because you repurchased within 30 days, the $1,500 loss is disallowed
- Your cost basis in the new shares becomes $37 + $15 = $52 per share ($3,700 + $1,500 = $5,200)
The loss is not gone forever. It gets added to the cost basis of the new shares. When you eventually sell those shares, you will get the benefit of the higher cost basis.
Recommended read: The Bogleheads’ Guide to Investing by Taylor Larimore, Mel Lindauer, and Michael LeBoeuf. A practical investing guide that covers tax-efficient strategies including how to handle capital losses correctly.
What Are Substantially Identical Securities?
The IRS does not provide a precise legal definition of “substantially identical,” which creates a gray area that trips up many investors.[3]
Clearly substantially identical:
- Buying the same stock you just sold
- Buying a contract or option to acquire the same stock
- Buying the same bond from the same issuer with similar terms
Generally NOT substantially identical:
- Selling one company’s stock and buying a competitor’s stock (selling Apple and buying Microsoft)
- Selling an S&P 500 index fund from Vanguard and buying a total stock market fund from Fidelity
- Selling a stock and buying a broader ETF that holds that stock as one of many holdings
The gray area:
- Two ETFs tracking the exact same index (e.g., SPY and IVV both track the S&P 500). The IRS has not ruled definitively, but most tax professionals consider these substantially identical.
- Preferred vs common stock of the same company. Generally considered different, but circumstances matter.
- Mutual fund shares vs ETF shares of the same fund family tracking the same index. This is risky territory.
When in doubt, choose a clearly different investment. Switching from an S&P 500 fund to a total stock market fund is widely considered safe.
Wash Sales Across Accounts
One of the biggest mistakes investors make is thinking the wash sale rule only applies within a single brokerage account. It applies across all your accounts.[4]
This includes:
- Multiple brokerage accounts. Selling at a loss in your Fidelity account and buying in your Schwab account triggers a wash sale.
- IRA accounts. Selling at a loss in a taxable account and buying in your IRA within 61 days triggers a wash sale. This is actually worse than a normal wash sale because the disallowed loss cannot be added to the IRA’s cost basis. The loss may be permanently lost.
- Your spouse’s accounts. The IRS treats spouses as one entity for wash sale purposes if you file jointly.
- Automatic reinvestment. If you have dividend reinvestment (DRIP) enabled and it buys shares within the 61-day window, that counts.
Common Wash Sale Triggers by Account Type
Turn off automatic dividend reinvestment (DRIP) for any stock you plan to sell at a loss. A $50 dividend reinvestment during the 61-day window can disallow a $5,000 loss deduction.
Wash Sales and Options
The wash sale rule extends to options contracts as well. If you sell stock at a loss and then buy a call option on the same stock within the 61-day window, that triggers a wash sale.[5]
Scenarios that trigger wash sales with options:
- Selling stock at a loss and buying a call option on the same stock
- Selling stock at a loss and selling a deep in-the-money put on the same stock
- Closing an option at a loss and opening a substantially identical option
Scenarios that generally do NOT trigger wash sales:
- Selling stock at a loss and buying a put option (you are betting against the stock)
- Selling an out-of-the-money option at a loss when the underlying stock position is unrelated
Options make wash sale tracking significantly more complex. If you trade options actively, use a tax software that tracks wash sales automatically.
Helpful Calculators for This Guide
Tax-Loss Harvesting Without Triggering Wash Sales
Tax-loss harvesting is the strategy of selling investments at a loss to offset capital gains and reduce your tax bill. It is one of the most effective tax optimization strategies available, but the wash sale rule is the main obstacle.
Here is how to harvest losses cleanly:
Strategy 1: Wait 31 Days
The simplest approach. Sell the losing position and wait 31 full calendar days before repurchasing. The risk is that the stock could rise significantly during your waiting period.
Strategy 2: Substitute a Similar but Not Identical Investment
Sell the losing stock and immediately buy something similar but not substantially identical:
- Sell the Vanguard S&P 500 ETF (VOO), buy the Vanguard Total Stock Market ETF (VTI)
- Sell an individual stock, buy a sector ETF that includes that stock
- Sell one tech company, buy a different tech company
This maintains your market exposure while sidestepping the wash sale rule.
Strategy 3: Double Up Before Selling
Buy a second lot of the same stock, wait 31 days, then sell the original loss shares. Since the purchase happened more than 30 days before the sale, no wash sale is triggered. However, this requires extra capital and carries the risk of the stock dropping further.
Strategy 4: Harvest in Taxable Accounts Only
Never buy a recently sold-at-a-loss security in your IRA. The loss becomes permanently disallowed because IRA cost basis adjustments are not tracked the same way.
Recommended read: Tax-Free Wealth by Tom Wheelwright. A CPA’s guide to building wealth through tax planning, with strategies that legally minimize your investment taxes.
How Wash Sales Affect Cost Basis
When a wash sale occurs, two things happen to the replacement shares:
-
The disallowed loss is added to the cost basis. If you lost $1,500 and your new shares cost $3,700, your adjusted basis becomes $5,200.
-
The holding period carries over. If you held the original shares for 8 months before selling, those 8 months are added to the holding period of the replacement shares. This matters for qualifying for long-term capital gains rates.
| Scenario | Original Shares | Loss | New Shares Cost | Adjusted Basis |
|---|---|---|---|---|
| Example 1 | $5,000 | $1,500 | $3,700 | $5,200 |
| Example 2 | $10,000 | $3,000 | $8,200 | $11,200 |
| Example 3 | $25,000 | $7,500 | $20,000 | $27,500 |
The tax benefit is not lost. It is deferred. Your eventual gain will be smaller (or your eventual loss will be larger) because of the higher cost basis.
Wash Sale Cost Basis Adjustment Examples
Common Wash Sale Mistakes
Mistake 1: Forgetting About DRIP
Automatic dividend reinvestment buys new shares without you thinking about it. If you sell a stock at a loss and a dividend reinvests $50 into that same stock during the 61-day window, your entire loss is disallowed.
Mistake 2: Year-End Selling Without Checking the Calendar
If you sell at a loss on December 15 and buy back on January 5, you have a wash sale. The 61-day window crosses tax years. The rule is not confined to a single calendar year.
Mistake 3: Buying in an IRA
Selling at a loss in a taxable account and buying in an IRA is the worst type of wash sale. The loss cannot be added to the IRA cost basis and may be permanently lost.
Mistake 4: Ignoring Spouse Accounts
If you sell a stock at a loss and your spouse buys the same stock within 61 days, it triggers a wash sale on joint returns.
Mistake 5: Assuming ETFs Are Always Different
Two ETFs tracking the S&P 500 (like SPY and IVV) may be considered substantially identical by the IRS even though they have different tickers.
Wash sales in IRA accounts are especially dangerous. Unlike taxable accounts, the disallowed loss cannot be added to the IRA’s cost basis. The tax benefit may be permanently lost. Never buy a recently sold stock in your IRA during the 61-day window.
Does the Wash Sale Rule Apply to Crypto?
As of 2026, the wash sale rule does not apply to cryptocurrency. The IRS classifies crypto as property, not securities, and Section 1091 specifically applies to securities and stocks.
This means you can sell Bitcoin at a loss, immediately buy it back, and still claim the loss on your taxes. However, proposed legislation to extend the wash sale rule to crypto has been introduced multiple times, so this loophole may not last forever.
Recommended read: The Intelligent Investor by Benjamin Graham. The classic on value investing and disciplined decision-making that helps investors avoid emotional trades, including the panic selling and quick rebuying that triggers wash sales.
Helpful Calculators for This Guide
Sources
1. IRS, “Publication 550: Investment Income and Expenses,” 2026. irs.gov
2. Fidelity, “Wash-Sales Rules: Avoid This Tax Pitfall,” 2026. fidelity.com
3. Charles Schwab, “A Primer on Wash Sales,” 2026. schwab.com
4. TurboTax, “Wash Sale Rule: What Is It, How Does It Work,” 2026. turbotax.intuit.com
5. Kiplinger, “The Wash Sale Rule: What It Is and How to Avoid It,” 2026. kiplinger.com
Related Articles
Best Places to Invest During High Interest Rates in 2026
Interest rates are still elevated in 2026. Compare treasury bonds, CDs, high-yield savings, and dividend stocks to find where your money works hardest right now.
CD Ladder Strategy Guide: Maximize Returns
Learn how to build a CD ladder in 2026 with current rates up to 4.30% APY. Step-by-step instructions for 3-month, 6-month, and 12-month ladders with comparisons.
Dividend Growth Investing, How DRIP Builds Real Wealth
Learn how dividend reinvestment plans turn small investments into serious wealth. See real compound growth examples and strategies for building a DRIP portfolio.
FIRE Movement in 2026, What Changed and How to Plan
The FIRE movement looks different in 2026. Learn updated FIRE numbers, the 3.9% withdrawal rule, and how Coast, Barista, and Lean FIRE strategies work today.
Gold Prices Through History, Why Gold Hit Record Highs
Explore gold's price history from $35 per ounce to 2026's $5,589 record high. See how gold performs during inflation, recessions, and uncertainty with charts and data.
How to Avoid the Net Investment Income Tax in 2026
The 3.8% NIIT surtax hits investment income above $200K (single) or $250K (married). Learn what triggers it and legal strategies to reduce or avoid it.
As an Amazon Associate, Calcmatic earns from qualifying purchases.