Enter the sale you made at a loss
Add the ticker, the sale date, the number of shares, what you paid and what you sold for.
Free tool
This wash sale calculator checks a loss sale against the IRS rule. Enter the sale and the buys near it. See the 61-day window, how much of the loss is disallowed, your new cost basis and the first day you can buy back. Free, no signup.

Try the whole product with sample positions. No account needed.
$1 for 7 days • Cancel anytime • 14-day money-back guarantee
How it works
Three entries show if the wash sale rule disallows your loss.
Add the ticker, the sale date, the number of shares, what you paid and what you sold for.
List every other buy of the same stock, each call you bought and each put you sold on it, from 30 days before the sale to 30 days after. Include your IRA and your spouse's account.
See how much of the loss is disallowed, how much you can still deduct, the cost basis of the new shares and the first day you can buy back.
The rule
A wash sale happens when you sell a stock or security at a loss and buy substantially identical stock or securities within 30 days before or after the sale. The IRS then disallows the loss on as many shares as you bought.
The rule counts 30 days before the sale, the day of the sale and 30 days after it. A buy on day 31 after the sale is outside the window.
A disallowed loss is added to the cost of the new shares, so it counts when you sell them. Their holding period also includes the time you held the shares you sold.
A buy in your IRA or Roth IRA counts. So does a buy by your spouse or by a corporation you control. After an IRA buy the loss is disallowed and the IRA's basis does not go up.
Examples
Three IRS cases with the sums the calculator does.
| Case | What happened | Loss disallowed | Loss you can deduct now | New cost basis |
|---|---|---|---|---|
| You buy back all the shares | You buy 100 shares for $1,000 and sell them for $750. Within 30 days you buy 100 shares of the same stock for $800. | $250 | $0 | $1,050 ($800 plus the $250 loss) |
| You buy back fewer shares | You sell 100 shares at a $1,000 loss. You bought 75 shares of the same stock within 30 days before the sale. | $750 | $250 | The $750 is added to the cost of the 75 shares |
| Your IRA buys the shares | You sell 100 shares with a basis of $1,000 for $600. The next day your IRA buys 100 shares of the same stock. | $400 | $0 | No change. The IRA's basis does not go up |
Cases 1 and 2 are from IRS Publication 550. Case 3 is from IRS Revenue Ruling 2008-5.
Options
The calculator checks a stock sale at a loss against the stock and the options you buy or sell near it.
The IRS lists a contract or option to buy substantially identical stock as a trigger. If you sell shares at a loss and buy a call on the same stock inside the window, the loss is disallowed.
The wash sale rules apply to losses from sales or trades of contracts and options to acquire or sell stock. A loss on an option you close can be disallowed in the same way. This calculator checks a loss on stock only.
A put you sell can oblige you to buy the stock, and the IRS lists a contract to buy substantially identical stock as a trigger. So a put you sell inside the window may be a wash sale, and an assignment inside the window is a buy of the stock. The calculator marks a sold put as "may be a wash sale" so you can check it with a tax professional.
Before you sell
Three checks to make before you sell at a loss.
Buy the stock back on day 31 after the sale or later. Count the day after the sale as day 1.
The IRS says stocks of one corporation are not ordinarily substantially identical to stocks of another. For anything closer than that, the IRS looks at all the facts of your case.
Look for buys in the last 30 days in your own accounts, your IRA and your spouse's account. Another buy before the sale counts the same as a buy after it.
FAQ
FAQ
Tax Loss Harvesting CalculatorTax loss harvesting with optionsCost Basis After Assignment CalculatorHow are options taxed
This calculator applies the wash sale rules in IRS Publication 550 to the numbers you enter. It does not see your other accounts or your broker's records, and QuantWheel does not give tax advice. Check the result with a tax professional before you file.
SourcesIRS Publication 550, Investment Income and ExpensesIRS Revenue Ruling 2008-5
Next step
Try the whole product with sample positions. No account needed.
$1 for 7 days • Cancel anytime • 14-day money-back guarantee