Skip to content
Omnikalc

Wash sale calculator: how much of your stock loss is disallowed and what is your new basis?

Enter the shares sold at a loss and the shares bought back within the 61-day window to see the disallowed loss, the deductible loss and the adjusted cost basis.

Updated on
Your inputs

Value out of range

$

Value out of range

$

Value out of range

Value out of range

$

Value out of range

%

Value out of range

Results

Loss disallowed by the wash sale rule

$600

Loss you can deduct now

$400

Partly disallowed Part of the loss is deferred into the basis of the shares bought back.

New basis per share of the shares bought back

$52.00

Loss on the sale
$1,000
New total basis of the shares bought back
$3,120
Tax value of the deferred loss
$144
Tax value of the loss you can use now
$96

The wash sale rule stops you from claiming a tax loss on a security and then buying the same one right back. If you buy substantially identical shares within 30 days before or after the sale, the loss on the matching shares is disallowed for now and added to the cost basis of the shares you bought. This calculator shows how much of your loss is disallowed, how much you can deduct and the new basis.

How the calculation works

  • Loss per share = purchase price − sale price (if positive)
  • Shares affected = the smaller of the shares sold and the shares bought back in the window
  • Disallowed loss = loss per share × shares affected
  • Deductible loss = total loss − disallowed loss
  • New basis of the shares bought back = their price + the disallowed loss
  • The holding period of the old shares carries over to the new ones

Example

You bought 100 shares at $50 and sold them at $40, a loss of $1,000. Within 30 days you buy 60 shares back at $42. The wash sale applies to 60 shares, so $600 of the loss is disallowed and $400 is deductible now. The disallowed loss moves into the new shares: their basis is $3,120, or $52.00 a share instead of $42. At a 24 % rate, the deductible loss is worth $96 this year and the deferred part, $144, comes back when you sell the new shares.

Why it matters

Many investors trigger the rule by accident: with automatic dividend reinvestment, in a second account or in a spouse’s account. The loss is not lost, it is deferred, but a deferral can push a deduction into another tax year, or erase it if the new shares are bought in an IRA, where the disallowed loss is not added to any basis. Knowing the adjusted basis helps you keep correct records for the later sale.

Good to know

The 61-day window includes purchases made before the sale. The rule also applies to options and contracts on the same security, and to purchases by your spouse or by a company you control. It applies only to losses: a sale at a gain is not affected. Shares are matched in a set order and partial matches are possible, as in the example. To keep market exposure while harvesting a loss, investors often buy a similar but not substantially identical fund. What counts as substantially identical is a matter of facts and circumstances.

In practice

Wait 31 days before buying the same security back, turn off dividend reinvestment around a harvest, and check all your accounts. Your broker reports adjusted basis for many cases but not all. This tool is for education and is not tax advice.

Frequently asked questions

What is the wash sale rule?

It disallows a loss when you buy the same or a substantially identical security within 30 days before or after selling it at a loss. The loss is added to the basis of the new shares.

Is the wash sale loss lost forever?

No, it is deferred. It increases the basis of the replacement shares, so you recover it when you sell them, unless you bought them in an IRA.

Does the rule apply to gains?

No. Only losses are affected. A sale at a gain is taxed normally, even if you buy back the shares.

What if I bought fewer shares than I sold?

Only the loss on the matching number of shares is disallowed. The rest is deductible, as the calculator shows.

Was this calculator helpful?

Thanks for your feedback!

Results are estimates provided for information purposes. They do not replace professional advice.