Check whether a sale and repurchase trigger the wash sale rule, how much of your loss is disallowed, the new basis of your replacement shares and the first safe day to buy back.
Education only, not financial advice. This calculator gives estimates from the numbers you enter. It is not a recommendation to buy, sell or hold anything. Check important decisions with a qualified professional. Everything runs in your browser; nothing you type is sent or stored.
IRS rules Wash sale rule under IRC §1091: a loss is disallowed if you buy substantially identical securities within 30 days before or after the sale; the disallowed loss is added to the basis of the replacement shares (IRS Pub. 550). As of November 2026.
How the wash sale rule works
If you sell a stock, fund or bond at a loss and buy the same or a substantially identical security within 30 days before or after the sale, the IRS disallows the loss for now. The 61-day window counts calendar days, not business days. Purchases in an IRA, your spouse’s account or through dividend reinvestment can also trigger it.
The loss isn’t gone. It’s added to the cost basis of the replacement shares, and their holding period includes the time you owned the original shares, so you recover it when you sell the replacement. The exception is a purchase in an IRA or Roth IRA: there the basis adjustment doesn’t apply, and the loss can be lost for good.
Staying clear: wait 31 days to buy back, or buy something similar but not substantially identical, such as a fund tracking a different index. Turn off automatic dividend reinvestment on the position during the window. Plan a harvest with the tax-loss harvesting calculator, read tax-loss harvesting and the wash sale rule explained, and estimate the tax on gains with the capital gains tax calculator.
Frequently asked questions
If you sell a security at a loss and buy the same or a substantially identical one within 30 days before or after, you can’t deduct the loss that year. It’s added to the basis of the new shares instead.
Buy back on the 31st day after the sale or later, and make sure you didn’t buy shares in the 30 days before the sale either.
Usually not. It’s added to the cost basis of the replacement shares and recovered when you sell them. But if the replacement was bought in an IRA, the loss is generally lost permanently.
Yes, proportionally. If you sold 100 shares at a loss and bought back 60, the loss on 60 shares is disallowed and the loss on the other 40 is deductible.
Under current law, section 1091 covers stocks and securities. Most crypto isn’t treated as a security for this rule, but check for law changes before relying on it.
Related tools and guides
Updated Nov 23, 2026. Built by the ECMSource team. Spot an error? Tell us.
Disclaimer: ECMSource tools are for general education. Results are hypothetical, assume constant rates, and ignore taxes, fees and other costs unless stated. Past returns do not predict future returns. See our full disclaimer and editorial policy.