Tax-loss harvesting is a legitimate strategy for cutting your tax bill by realizing investment losses to offset gains. The wash sale rule blocks the deduction if you buy back the same security (or a 'substantially identical' one) within 30 days before or after the loss sale. This tool checks whether your planned harvest trips the rule and explains what to do instead if it does.
The wash sale window is 61 days total: 30 days before the loss sale, the day of the sale, and 30 days after. If you bought (or buy) the same security or a substantially identical one anywhere in that 61-day window, the loss is disallowed for tax purposes. The disallowed loss is added to the cost basis of the replacement shares, effectively deferring the deduction rather than eliminating it. The tool takes your sale date and any purchase dates and flags conflicts.
On December 15 you sell 100 shares of stock XYZ at a 4,000 dollar loss. On December 28, the brokerage automatically reinvests a 90 dollar dividend, buying 2 shares of XYZ. The wash sale rule applies to those 2 shares: the loss on 2 of the 100 sold shares (about 80 dollars worth of loss) is disallowed and added to the basis of the 2 reinvested shares. The other 98 shares' loss (about 3,920 dollars) remains fully deductible. To avoid this entirely, turn off automatic dividend reinvestment before harvesting.
What counts as 'substantially identical'?
The IRS has never published a bright-line definition, but the consensus is: same company's common stock, share classes that are economically equivalent, and two index funds tracking the same exact index. Funds tracking different indexes (S&P 500 versus Total Market) are generally considered distinct.
Can I sell at a loss and buy a similar ETF instead?
Yes, as long as the replacement is not substantially identical. A common strategy is to sell SPY and buy a different large-cap ETF (like VTI or SPLG) that tracks a related but distinct index, then swap back after 31 days if desired.
Does the wash sale rule apply to crypto?
Not currently under federal tax law (as of 2026), though the rule has been proposed multiple times in Congress. State rules vary. Consult your tax advisor before relying on this.
What happens if I trigger a wash sale by mistake?
The disallowed loss is added to the cost basis of the replacement shares. When you eventually sell those shares, you will realize the deferred loss. You do not lose the deduction permanently (except in IRA cases).
Should I just wait 31 days to repurchase?
Yes, the safest approach. Set a calendar reminder. The wash sale window is 30 days after the sale; you can buy back on day 31.
This page is for general educational information only. It is not financial, tax, legal, or medical advice. Consult a qualified professional before making decisions based on this tool.