Tax Planning14 min read

Wash Sale Rule 2026: Complete Guide to Avoiding Costly Tax Mistakes

Learn how the IRS wash sale rule works in 2026, the 30-day window that disallows losses, and smart strategies to stay compliant while still harvesting tax losses effectively.

Wash Sale Rule 2026: Complete Guide to Avoiding Costly Tax Mistakes
SM

Written by

Sarah Mitchell

Certified Public Accountant (CPA)

JP

Reviewed by

James Park

Enrolled Agent & Tax Researcher

Published on

July 4, 2026

What Is the Wash Sale Rule and Why Does It Matter?

The wash sale rule is an IRS provision that prevents investors from claiming a tax deduction on a loss if they buy back the same or substantially identical security within 30 days before or after the sale. It sounds simple enough on paper, but in practice this rule trips up thousands of investors every tax season — and the penalties for getting it wrong are not just a disallowed loss, but also a complicated adjustment to your cost basis that carries forward until you finally sell the replacement shares without triggering another wash sale.

Congress created the wash sale rule in 1921 specifically to stop investors from manufacturing artificial losses at year-end. Before the rule existed, an investor could sell a stock at a loss on December 30, claim the deduction on that year's return, and buy the same stock back on January 2. The wash sale rule closed that loophole by saying: if you repurchase the same security within the 61-day window (30 days before the sale through 30 days after), your loss is disallowed and added to the cost basis of your new shares. The deduction does not disappear forever — it gets deferred — but the deferral creates tracking headaches and can push the tax benefit into a year when you are in a lower bracket, reducing its value.

If you are working through how to report capital gains on your tax return, wash sale adjustments show up directly on Form 8949 and flow through to Schedule D. Each disallowed loss increases the basis of your replacement shares, which means you need to track these adjustments carefully or risk double-reporting the same economic loss.

How the 30-Day Window Actually Works

The wash sale window spans 61 days total: the day of the sale, plus 30 calendar days before and 30 calendar days after. Any purchase of a substantially identical security within that window triggers the rule. Notice that the window is symmetric — it looks backward and forward from the sale date. This catches investors who accidentally buy more shares a few days before selling at a loss, not realizing that the purchase they thought was unrelated actually triggers a wash sale.

Here is a concrete example. You sell 100 shares of Microsoft at a $2,000 loss on November 15. If you bought 100 shares of Microsoft anytime between October 16 and December 15, you have a wash sale and the $2,000 loss is disallowed. The date range includes weekends and holidays — there are no trading-day exceptions. The IRS counts calendar days, not market days, which means a Friday afternoon sale followed by a Monday morning repurchase is almost certainly a wash sale because only two calendar days have passed.

The disallowed loss does not vanish. Instead, it gets added to the cost basis of the replacement shares. So if you bought the replacement Microsoft shares at $300 each and had a $2,000 disallowed loss, your adjusted basis becomes $300 per share plus $20 per share (the $2,000 loss spread across 100 shares), giving you a basis of $320 per share. When you eventually sell those shares, the higher basis reduces your gain or increases your loss at that time. Use our short-term capital gains calculator to see how these basis adjustments change your tax liability when you hold replacement shares for less than a year.

Wash Sale Rule 30-Day Window Timeline

What Counts as "Substantially Identical"?

The IRS uses the term "substantially identical" rather than "identical," and that distinction creates enormous confusion. Here is what we know for certain, what is grey area, and what is clearly safe.

Clearly Triggers a Wash Sale

Buying the exact same stock you just sold at a loss always triggers a wash sale. If you sell Apple at a loss and buy Apple shares within 30 days, that is a wash sale. The rule also applies if you buy the same stock in a different account — your IRA, your spouse's account, or an account where you have power of attorney all count. The IRS looks at your total ownership, not just the account where the sale occurred. This is a trap for investors who sell in their taxable brokerage and repurchase in their IRA, thinking the separate accounts shield them. They do not.

Grey Area: ETFs and Options

Buying an S&P 500 index fund after selling a different S&P 500 index fund at a loss is a grey area. The IRS has never issued clear guidance on whether two different S&P 500 ETFs (like SPY and VOO) count as substantially identical. Most tax professionals take the conservative position that different ETFs tracking the same index are not substantially identical because they have different fund managers, expense ratios, and creation mechanisms. However, buying a Vanguard S&P 500 fund after selling a Vanguard S&P 500 fund in a different share class would likely be considered substantially identical because the economic exposure is identical.

Options and contracts on the same stock also trigger wash sales. If you sell Microsoft stock at a loss and buy a Microsoft call option within 30 days, that is a wash sale. The IRS treats options on the same security as substantially identical to the underlying stock. But selling a Microsoft call at a loss and buying a Microsoft put is not a wash sale, because calls and puts have opposite economic exposures.

Clearly Safe: Different Securities

Selling one tech stock and buying a completely different tech stock is always safe. If you sell NVIDIA at a loss and buy AMD, no wash sale. Selling an individual stock and buying a sector ETF that includes that stock is also safe — an ETF is never substantially identical to an individual stock it holds. This is why many tax-loss harvesting strategies involve selling an individual stock and buying a sector ETF as a temporary placeholder.

Wash Sale Rule and Cryptocurrency

Here is where things get really interesting. As of 2026, the IRS does not apply the wash sale rule to cryptocurrency. That means you can sell Bitcoin at a loss on December 30, claim the deduction on your tax return, and buy Bitcoin back on December 31 — and the loss is fully deductible. The wash sale rule, under Internal Revenue Code Section 1091, applies to "stocks and securities," and the IRS has not classified crypto as securities for wash sale purposes.

However, this loophole is closing. The Infrastructure Investment and Jobs Act of 2021 expanded IRS reporting requirements for crypto, and Congress has repeatedly proposed extending the wash sale rule to digital assets. Multiple bills have been introduced that would classify cryptocurrency as a security for wash sale purposes, and most tax professionals expect the rule to cover crypto by 2027 or 2028. If you are using our crypto capital gains calculator to plan your year-end tax strategy, keep in mind that the current wash sale exemption for crypto could change with future legislation. The safe approach is to track your crypto wash sales now, even though they are not currently disallowed, so you are prepared if the law changes retroactively.

How Wash Sales Affect Your Cost Basis Tracking

The biggest practical problem with wash sales is not the rule itself — it is the bookkeeping. Every time a wash sale occurs, your replacement shares get a higher cost basis, and you need to track that adjusted basis for when you eventually sell. If you have multiple wash sales on the same stock across different lots and purchase dates, the basis adjustments compound and your brokerage's tracking may not match your own records.

Here is a scenario that plays out constantly. You sell 50 shares of Tesla at a $3,000 loss on March 1. You buy 50 shares back on March 15. The $3,000 loss is disallowed and added to the basis of the March 15 shares. Then you sell those 50 shares at a $1,500 loss on April 10 and buy back 50 shares on April 25. The April 10 loss is also a wash sale, so the $1,500 disallowed loss gets added to the basis of the April 25 shares — on top of the $3,000 already added from the first wash sale. Your April 25 shares now carry $4,500 in deferred losses embedded in their basis. When you finally sell them without repurchasing, you recover the entire $4,500 deduction. But if you make a third wash sale, the compounding continues. Our long-term capital gains calculator can help you model the tax impact of selling these adjusted-basis shares after holding them for more than a year.

Smart Strategies to Avoid Wash Sales While Still Harvesting Losses

You do not have to choose between harvesting losses and staying compliant with the wash sale rule. Several strategies let you capture tax losses while maintaining your market exposure.

Strategy 1: Wait 31 Days

The simplest approach is to sell your losing position, wait 31 calendar days, and then repurchase. The downside is 31 days of market exposure risk — the stock could rally while you are on the sidelines. For investors with concentrated positions in stocks with significant gains, this timing risk is real. One way to partially hedge this risk is to buy a correlated but not substantially identical security during the waiting period. For example, sell an S&P 500 index fund and buy a total market index fund for 31 days.

Strategy 2: Double Up

Buy the replacement shares first, wait 31 days, and then sell the original losing shares. This keeps you invested the entire time, but requires additional capital to buy the second position. The risk here is that the stock continues to decline during the 31-day waiting period, increasing your total loss exposure.

Strategy 3: Switch to a Similar but Different Investment

Sell the specific ETF or stock at a loss and immediately buy a similar but not substantially identical replacement. Sell an iShares Russell 2000 ETF and buy a Vanguard Russell 2000 ETF. Sell NVIDIA and buy a semiconductor sector ETF. These swaps maintain similar market exposure without triggering wash sales because the investments are not substantially identical.

Strategy 4: Harvest Losses in Tax-Advantaged Accounts Carefully

Be extremely careful about harvesting losses across account types. Selling a stock at a loss in your taxable account and buying it back in your IRA within 30 days triggers a wash sale — and unlike wash sales within a taxable account, the disallowed loss from an IRA transaction cannot be added to any basis. The loss is gone permanently because IRAs do not track cost basis the same way taxable accounts do. This is the worst possible outcome: you lose the deduction entirely with no future recovery.

Reporting Wash Sales on Your Tax Return

Your brokerage is required to report wash sales on Form 1099-B, but only for transactions within the same account. If you trigger a wash sale across two different accounts, your brokerage will not catch it, but the IRS still expects you to report it correctly. You need to manually adjust your cost basis on Form 8949 for any wash sales not captured by your broker.

When you file, each wash sale appears as an adjustment on Form 8949 with code "W" in the adjustment column. The disallowed loss amount goes in the adjustment column, and the gain or loss column shows the adjusted amount (which will be zero for a disallowed loss). The total disallowed losses reduce your net capital loss for the year, which directly affects how much you can deduct against ordinary income.

For investors subject to the Net Investment Income Tax, wash sales are particularly painful because they can push your net investment income above the NIIT threshold by deferring losses into future years. A $10,000 disallowed loss in 2026 means $380 more in NIIT liability (3.8% of $10,000) if your investment income is near the threshold. That is a real cash cost, not just a deferral.

Key Takeaways

The wash sale rule disallows losses when you buy substantially identical securities within 30 days before or after selling at a loss. The 61-day window is broader than most investors realize, and it applies across all your accounts including IRAs and your spouse's accounts. Disallowed losses are not gone forever — they are added to the basis of your replacement shares — but the basis tracking can become complicated quickly, especially with multiple wash sales on the same security. The simplest way to stay compliant is to wait 31 days before repurchasing, but strategies like switching to a similar ETF or doubling up can keep you invested while avoiding the rule. Cryptocurrency is currently exempt from wash sale rules, but that exemption is likely temporary. Track your wash sales carefully, report them correctly on Form 8949, and consider the NIIT implications when planning your year-end tax-loss harvesting.

Fact-Checked & Reviewed

This article was written by Sarah Mitchell (CPA, MST (Master of Science in Taxation)) and reviewed for accuracy by James Park (EA, CFP (Certified Financial Planner)). All tax rates, thresholds, and rules referenced are based on IRS publications and current tax law as of the date published. Tax laws change frequently — always consult a qualified tax professional for advice specific to your situation.

wash sale ruletax loss harvestingIRS wash salecapital gains taxcost basis adjustmentsubstantially identical

Disclaimer: This article is for informational purposes only and does not constitute tax, legal, or financial advice. Tax laws and regulations change frequently, and the information presented here may not reflect the most current updates. You should consult with a qualified CPA, tax attorney, or financial advisor before making any tax-related decisions. TaxGainsCalc is not responsible for any actions taken based on the information provided in this article.