Wash Sale Rule Calculator
Loss on Sale of Original Security (L): $ Total loss amount from selling the original security Number of Replacement Shares (RS): Shares purchased within 30 days before or after the sale Number of Original Shares Sold (OS): Number of shares sold in the original transaction Calculate Reset Wash Sale Rule Result: Original Loss $0.00 Replacement…
Wash Sale Rule Formula:
LD = L × (RS ÷ OS)
Where LD = Loss deferred ($), L = Original loss ($), RS = Replacement shares, OS = Original shares sold
Wash Sale Rule Key Points:
- 30-Day Window: Rule applies 30 days before and after the sale date
- Substantially Identical: Applies to same or substantially identical securities
- Loss Deferral: Disallowed losses are added to the basis of replacement shares
- Full or Partial: Can apply to full or partial share replacement
- IRA/401k Purchases: Purchasing in retirement accounts can trigger wash sale
- Spouse Purchases: Purchases by spouse also subject to wash sale rule
Wash Sale Examples:
- Complete Wash Sale: Sell 100 shares at loss, buy 100 shares within 30 days
- Partial Wash Sale: Sell 100 shares at loss, buy 50 shares within 30 days
- Excess Purchase: Sell 50 shares at loss, buy 100 shares within 30 days
- No Wash Sale: Wait more than 30 days before repurchasing
- Similar Securities: ETF and mutual fund of same index may trigger rule
- Options: Stock options can create wash sales with underlying stock
About the Wash Sale Rule:
The Wash Sale Rule is an IRS regulation designed to prevent taxpayers from claiming artificial losses for tax purposes. Under this rule, if you sell a security at a loss and purchase the same or substantially identical security within 30 days before or after the sale, the loss cannot be deducted in the current tax year. Instead, the disallowed loss is added to the cost basis of the replacement shares, effectively deferring the loss until those shares are sold. This rule ensures that investors cannot manipulate their tax liability through strategic buying and selling while maintaining their market position in the same security.
The Wash Sale Rule Calculator helps investors quickly determine if a recent stock or crypto sale triggers the IRS wash sale rule, which disallows claiming a tax loss if you repurchase the same (or substantially identical) security within 30 days before or after the sale.
This rule is crucial for anyone using tax-loss harvesting strategies and ensures compliance with U.S. tax laws.
🔹 What is the Wash Sale Rule?
The wash sale rule prevents taxpayers from selling a security at a loss and then repurchasing the same or a substantially identical one within a 61-day window (30 days before, the sale date, and 30 days after).
If triggered:
- Your loss is disallowed for current tax reporting.
- The disallowed loss is added to the cost basis of the repurchased security.
- This delays tax benefits until the future sale.
🔹 How the Wash Sale Rule Calculator Works
The calculator requires:
- Date of Sale
- Purchase Dates (before or after sale)
- Security Type (stock, ETF, option, crypto*)
- Sale Proceeds & Cost Basis
It will then:
- Check if repurchases occurred within the 30-day window.
- Flag a wash sale if true.
- Adjust cost basis of the new holding.
⚠️ Note: Crypto is not yet explicitly covered by the IRS wash sale rule (as of 2025), but lawmakers are considering applying it.
🔹 Example Calculation
- You sell 100 shares of XYZ stock on July 1 at a $2,000 loss.
- You repurchase 50 shares of XYZ on July 15.
Result:
- ✅ Wash sale triggered.
- ❌ Cannot claim the $2,000 loss now.
- ➕ The $2,000 disallowed loss is added to the cost basis of the new shares.
🔹 Why Use a Wash Sale Rule Calculator?
- ✅ Avoid IRS filing mistakes.
- ✅ Prevent penalties and audits.
- ✅ Track disallowed losses and basis adjustments.
- ✅ Plan tax-loss harvesting correctly.
- ✅ Works for frequent traders in stocks, ETFs, and options.
🔹 Benefits & Limitations
Benefits
- Clarifies IRS rules for traders.
- Saves time during tax preparation.
- Helps maximize long-term tax savings.
Limitations
- U.S.-specific rule (other countries differ).
- Crypto treatment may change in the future.
- Doesn’t replace professional tax advice.
🔹 Common Use Cases
- Day traders who buy and sell the same stock frequently.
- Long-term investors planning tax-loss harvesting.
- Crypto traders (to check possible future regulation).
- Tax preparers assisting clients with compliance.
🔹 FAQ – Wash Sale Rule Calculator
1. What is a wash sale?
A transaction where you sell a security at a loss and repurchase it within 30 days.
2. How long is the wash sale period?
61 days (30 before, sale date, 30 after).
3. Does the rule apply to gains?
No, only to losses.
4. Do crypto trades trigger wash sales?
Currently no (2025), but Congress has debated including crypto.
5. Do ETFs and mutual funds count?
Yes, if they are “substantially identical” to the sold security.
6. What if I repurchase in my spouse’s account?
The wash sale rule still applies.
7. Do IRAs and 401(k)s count?
Yes, buying in retirement accounts can trigger wash sales.
8. Can I repurchase in a different brokerage?
Yes, it still counts. The IRS looks across all accounts.
9. Does fractional share buying matter?
Yes, even small amounts can trigger a wash sale.
10. What happens to the disallowed loss?
It’s added to the cost basis of the repurchased security.
11. Can I avoid wash sales by waiting 31 days?
Yes, waiting 31+ days avoids the rule.
12. Does selling options count?
Yes, options on the same stock can trigger wash sales.
13. Can I repurchase a similar ETF?
If it tracks the same index, it may be considered identical.
14. What if I sell at a gain?
Wash sale rules don’t apply to gains.
15. Can I sell in a taxable account and buy in a Roth IRA?
Yes, but it still counts as a wash sale.
16. Do dividends affect wash sales?
No, only purchase/sale transactions matter.
17. Can a wash sale occur if I reinvest dividends?
Yes, automatic reinvestment can trigger it.
18. Are wash sales illegal?
No, they are legal but the loss is deferred.
19. How do brokers handle wash sales?
Most flag them on Form 1099-B, but not always across different brokerages.
20. How can I avoid wash sales?
- Wait 31 days before rebuying.
- Buy a similar but not identical security.
- Use tax software or a calculator.
🔹 Conclusion
The Wash Sale Rule Calculator is an essential tool for active investors and traders. By tracking your trades against IRS wash sale guidelines, you can avoid disallowed losses, correctly adjust cost basis, and stay compliant with tax law.
Whether you’re a day trader, crypto investor, or retirement saver, this calculator ensures your tax-loss harvesting strategy works smoothly without unexpected IRS surprises.
