QuantWheel

Free tool

Wash Sale Calculator

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.

The free Cost Basis Calculator lowering the adjusted cost basis per share as covered call premium is added
The sale at a loss
Other buys near the sale

Do not enter the buy of the shares you sold.

Enter the sale at a loss

Enter the sale date, the quantity sold, the total cost and the proceeds to see the result.

Try the whole product with sample positions. No account needed.

$1 for 7 days • Cancel anytime • 14-day money-back guarantee

How it works

How the Wash Sale Calculator Works

Three entries show if the wash sale rule disallows your loss.

  1. 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.

  2. Add every buy near the sale

    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.

  3. Read the result

    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

What Is a Wash Sale?

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 window is 61 days

    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.

  • The loss moves to the new shares

    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.

  • Other accounts count too

    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

Wash Sale Examples With Numbers

Three IRS cases with the sums the calculator does.

Wash Sale Examples With Numbers
CaseWhat happenedLoss disallowedLoss you can deduct nowNew cost basis
You buy back all the sharesYou 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 sharesYou sell 100 shares at a $1,000 loss. You bought 75 shares of the same stock within 30 days before the sale.$750$250The $750 is added to the cost of the 75 shares
Your IRA buys the sharesYou sell 100 shares with a basis of $1,000 for $600. The next day your IRA buys 100 shares of the same stock.$400$0No 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

How the Wash Sale Rule Works With Options

The calculator checks a stock sale at a loss against the stock and the options you buy or sell near it.

  • A call you buy counts as the stock

    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.

  • A loss on an option can be disallowed too

    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 may be a wash sale

    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

How to Avoid a Wash Sale

Three checks to make before you sell at a loss.

  • Wait until day 31

    Buy the stock back on day 31 after the sale or later. Count the day after the sale as day 1.

  • Hold a different stock until day 31

    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.

  • Check every account first

    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

Wash Sale Calculator questions

FAQ

The wash sale window covers 30 days before the sale, the day of the sale and 30 days after it. That is 61 days. If you buy substantially identical stock or securities on any of those days, the IRS disallows the loss on as many shares as you bought.

Usually no. The disallowed loss is added to the cost of the new shares, so it counts when you sell them. A buy in an IRA or Roth IRA is the exception. There the loss is disallowed and the IRA's basis does not go up.

Yes. A call option you buy on the stock you sold at a loss triggers the rule. The rule also applies to losses on options themselves. A put you sell may trigger it too.

The IRS gives no fixed list. It says to consider all the facts and circumstances of your case. Stocks of one corporation are not ordinarily substantially identical to stocks of another corporation.

Only the loss on the matching shares is disallowed. In the IRS example you sell 100 shares at a $1,000 loss after buying 75 shares within 30 days before the sale. The loss on 75 shares, $750, is disallowed. You can deduct the other $250.

On day 31 after the sale or later. Count the day after the sale as day 1. The calculator shows the date for your sale.

No. The calculator gives an estimate from the numbers you enter and the rules in IRS Publication 550. Check the result against your broker's Form 1099-B and with a tax professional. QuantWheel does not give tax advice.

Tax Loss Harvesting CalculatorTax loss harvesting with optionsCost Basis After Assignment CalculatorHow are options taxed

An estimate, not tax advice

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

Where to go next

Try the whole product with sample positions. No account needed.

$1 for 7 days • Cancel anytime • 14-day money-back guarantee