Wash Sale Rule Explained: Avoid This Costly Tax Mistake
The wash sale rule disallows tax losses when you repurchase the same security within 30 days. Learn what counts as a wash sale, how it affects active traders, and how to avoid unintentional violations.
Want to put this into practice?
Tradewink uses AI to scan markets, generate signals with full analysis, and execute trades automatically through your broker.
What Is the Wash Sale Rule?
The wash sale rule is an IRS tax regulation that prevents traders from claiming a tax loss on a security if they buy a "substantially identical" security within 30 days before or after the sale at a loss.
In plain terms: if you sell a stock at a loss and then rebuy the same stock within 30 days on either side of that sale, the IRS disallows the tax deduction. The disallowed loss is not gone forever — it is added to the cost basis of the repurchased shares — but it cannot be used to offset gains in the current tax year.
Why the Wash Sale Rule Exists
The rule was designed to prevent artificial tax losses. Without it, traders could sell a losing position to capture the tax deduction, immediately rebuy the same position to maintain market exposure, and pocket the tax benefit with no genuine economic change in their portfolio. The IRS determined this constitutes tax avoidance rather than a real realization of a loss.
Higher trading frequency means higher wash sale risk: With algorithmic trading driving 60-70% of U.S. equity volume and retail investors averaging $1.3 billion in daily flows in H1 2025, trade frequency has never been higher. Automated trading bots and active day traders can trigger dozens of wash sales per week without realizing it — especially when re-entering the same tickers across multiple strategies. Wash sale tracking software is no longer optional for frequent traders.
The 61-Day Window
The wash sale rule applies across a 61-day window:
- 30 days before the sale at a loss
- The day of the sale
- 30 days after the sale at a loss
If you buy shares of ABC, sell them at a loss, and then buy ABC again within 30 days after the sale, the loss is disallowed. If you bought additional shares of ABC 15 days before selling at a loss, those earlier purchases can also trigger the rule.
What Counts as "Substantially Identical"?
This is where the rule becomes complicated for active traders. The IRS considers the following substantially identical:
- The same stock — rebuying shares of the exact same company
- Options on the same stock — a call option can trigger a wash sale on the underlying shares
- Convertible bonds for the same company
What is generally not considered substantially identical:
- A different company in the same sector (e.g., selling JPM at a loss and buying GS)
- An ETF that holds the stock as one component among many (e.g., SPY is generally not a wash sale substitute for an individual S&P 500 stock)
- Futures contracts on different underlying assets
Important: The IRS has not issued definitive guidance on all edge cases — particularly ETFs and options combinations. Consult a tax professional for complex situations.
How Wash Sales Affect Day Traders
For active traders who trade the same tickers repeatedly, wash sales are a constant concern. A trader who day-trades NVDA daily — buying and selling multiple times — will continuously trigger the wash sale rule on any losing trades if they rebuy within 30 days.
The wash sale rule does not prevent you from trading the security. It only disallows the tax loss. The disallowed loss is added to the cost basis of your new position, meaning you will eventually realize the tax benefit when you close the final position without rebuying within 31+ days.
Year-end trap: A common mistake is selling losing positions in December to harvest tax losses, then rebuying in January. If the repurchase happens within 30 days of the December sale, the year-end loss is disallowed — and the deferred loss gets pushed to the new year.
Cryptocurrency and the Wash Sale Rule
As of 2025, crypto assets are not subject to the wash sale rule. The IRS classifies cryptocurrency as property, not securities — and the wash sale rule applies only to securities. Crypto traders can currently sell Bitcoin at a loss, immediately rebuy, and still claim the tax deduction.
This remains an active area of legislation — Congress has proposed extending wash sale rules to crypto in multiple bills. Always check current IRS guidance before relying on crypto's wash sale exemption.
Wash Sale Examples
Example 1 — Simple violation:
- Day 1: Buy 100 shares of XYZ at $50
- Day 10: Sell 100 shares of XYZ at $45 (–$500 loss)
- Day 20: Buy 100 shares of XYZ at $44
- Result: The –$500 loss is disallowed. The $500 is added to the cost basis of the new shares, making the adjusted cost basis $49 per share (not $44).
Example 2 — Year-end trap:
- Dec 20: Sell stock at a $3,000 loss (to harvest the tax deduction)
- Jan 8 (next year): Buy the same stock
- Result: The $3,000 loss cannot be claimed on this year's taxes because the repurchase falls within 30 days after the sale. The deferred loss pushes into the new tax year.
How to Avoid Accidental Wash Sales
- Wait 31 days: After selling at a loss, wait at least 31 days before rebuying the same security
- Use substantially different substitutes: After selling for a loss, buy a related but non-identical security to maintain sector exposure (e.g., sell one semiconductor stock, buy a different one)
- Track trades proactively: Most brokers report wash sales on your 1099-B, but by then it's too late to fix them. Use trade-tracking software or maintain a spreadsheet to flag potential violations in real time
- Mark-to-market election (Section 475(f)): Active traders can elect to treat all trading gains and losses as ordinary income, which eliminates wash sale rules entirely for trading positions. This is a significant election with broad tax consequences — consult a CPA before electing
Wash Sales and Trading Discipline
The wash sale rule is one reason systematic exit discipline matters in risk management. Getting out of a losing trade cleanly — and staying out if you want the tax benefit — requires the discipline to not impulsively re-enter the same position. Trailing stops help enforce clean exits and prevent the emotional re-entry that often triggers wash sales.
Active traders who use Tradewink's trade journal can track each closed position by ticker across time, making it straightforward to identify when a planned re-entry would fall within a wash sale window.
Frequently Asked Questions
What is the wash sale rule in simple terms?
The wash sale rule says you cannot claim a tax loss on a stock if you rebuy the same (or substantially identical) security within 30 days before or after the sale at a loss. If you do, the IRS disallows the tax deduction. The disallowed loss is not erased — it gets added to the cost basis of your new shares, so you will eventually get the tax benefit when you sell the replacement shares. The rule exists to prevent traders from selling just to claim a paper tax loss while maintaining the same market position.
Does the wash sale rule apply to day traders?
Yes, the wash sale rule applies to all U.S. taxpayers trading securities, including day traders. Active traders who trade the same ticker repeatedly are especially vulnerable because they may sell at a loss one day and automatically rebuy the same stock the next day, triggering wash sales across dozens of positions. The solution is either to wait 31+ days before rebuying the same security after a loss, use substantially different alternative securities to maintain exposure, or elect Section 475(f) mark-to-market accounting which exempts trading positions from wash sale rules.
Does the wash sale rule apply to crypto?
As of 2025, cryptocurrency is not subject to the wash sale rule. The IRS classifies crypto as property rather than a security, and the wash sale rule only applies to securities. This means crypto traders can sell Bitcoin or Ethereum at a loss, immediately repurchase, and still claim the full tax deduction. However, this tax treatment may change — Congress has introduced bills to extend wash sale rules to crypto multiple times. Always verify current IRS guidance before relying on this exemption.
What happens to a disallowed wash sale loss?
A disallowed wash sale loss is not permanently lost. Instead, the loss amount is added to the cost basis of the replacement shares you purchased. This means when you eventually sell those replacement shares, your cost basis will be higher — effectively deferring the tax benefit rather than eliminating it. For example, if you bought shares at $50, sold at $45 (–$5 loss, disallowed), and rebought at $44, your adjusted cost basis on the new shares is $49. When you sell those new shares, you will realize a larger loss or smaller gain than the raw purchase price suggests.
Trading Insights Newsletter
Weekly deep-dives on strategy, signals, and market structure — written for active traders. No spam, unsubscribe anytime.
Ready to trade smarter?
Get AI-powered trading signals delivered to you — with full analysis explaining every trade idea.
Get free AI trading signals
Daily stock and crypto trade ideas with full analysis — delivered to your inbox. No spam, unsubscribe anytime.
Related Guides
Day Trading Taxes: Capital Gains, Wash Sale Rule, and Mark-to-Market Explained
A complete guide to day trading taxes. Understand short-term vs. long-term capital gains, the wash sale rule, mark-to-market accounting, deductible trading expenses, and how to track your trading activity for tax season.
Risk Management for Day Traders: The Complete Guide (2026)
Learn the essential risk management techniques that separate profitable day traders from those who blow up. Covers position sizing, stop placement, daily loss limits, and portfolio heat management.
Trailing Stops: The Complete Guide to Protecting Profits While Staying in Winners
Learn how trailing stops work, the difference between fixed-percentage and ATR-based trailing stops, how to set them correctly, and how Tradewink automates them so you never manually trail a stop again.
How to Use a Trade Journal to Improve Your Trading (With MFE/MAE Analysis)
Learn how to build a trade journal that captures MFE and MAE data, how to analyze trade quality systematically, and how to use post-trade insights to improve entry timing, stop placement, and exit strategy.
Day Trading for Beginners: Everything You Need to Know in 2026
A comprehensive day trading guide for beginners. Learn what day trading is, how to build a starter workflow, the PDT rule, essential strategies, risk management, and how AI can help you practice before risking real capital.
Paper Trading: How to Practice Trading Without Risking Real Money
Learn how to use paper trading to build skills, test strategies, and gain confidence before risking real capital. Covers platforms, best practices, and common mistakes.
Founder of Tradewink. Building autonomous AI trading systems that combine real-time market analysis, multi-broker execution, and self-improving machine learning models.