Estimate disallowed wash sale loss and replacement-share basis for one uniform taxable sale and one qualifying replacement lot, or find its inclusive 61-day window. Remaining loss is not necessarily deductible now.

U.S. estimate for one taxable sale and one qualifying replacement lot with uniform per-share amounts. Confirm substantially identical securities and matching across accounts; this is not tax filing advice. Enter decimals up to 6 places.

Enter 0 if none; count purchases from 30 days before through 30 days after this sale.

Wash Sale Rule Formula

The following simplified formula is used to estimate the loss deferred (disallowed) under the wash sale rule. The deferred loss cannot exceed the total realized loss.

LD = L ร— (min(RS, OS)) / (OS)

Variables:

  • LD is the loss deferred / disallowed ($)
  • L is the loss on the sale of the original security ($)
  • RS is the number of replacement shares purchased in the wash sale window
  • OS is the number of original shares sold

To estimate the loss deferred, multiply the total realized loss (L) by the fraction of shares replaced in the wash sale window (matched shares รท original shares sold). If RS is greater than or equal to OS, then the entire loss is deferred (LD = L).

What is a Wash Sale Rule?

The wash sale rule is an Internal Revenue Service (IRS) rule that generally disallows a capital loss deduction if you sell a security at a loss and, within 30 days before or 30 days after that sale (a 61โ€‘day window), you buy the same or a โ€œsubstantially identicalโ€ security (or enter into a contract or option to do so). In most taxable-account cases, the disallowed loss is added to the basis of the matched replacement shares. Unmatched shares retain their replacement cost; do not spread the adjustment across excess shares. Purchases for your IRA or Roth IRA can disallow the loss without increasing IRA basis.

How to Calculate Wash Sale Rule?

The following steps outline how to estimate the wash sale deferred loss using the formula: LD = L ยท (min(RS, OS) / OS).


  1. First, determine the total realized loss on the sale of the original security ($), denoted as L.
  2. Next, determine the number of replacement shares purchased in the wash sale window (30 days before through 30 days after the sale), denoted as RS.
  3. Next, determine the number of original shares sold, denoted as OS.
  4. Next, calculate the loss deferred ($), denoted as LD, using the formula LD = L ยท (min(RS, OS) / OS).
  5. Finally, interpret the result: LD is the amount of loss disallowed now and typically added to the basis of the matched replacement shares (in a taxable account).
  6. After inserting the variables and calculating the result, check your answer with the calculator above.

Example Problem : 

Use the following variables as an example problem to test your knowledge.

loss on the sale of the original security ($) = 500

number of replacement shares purchased in the wash sale window = 100

number of original shares sold = 50

Using the formula: LD = 500 ยท (min(100, 50) / 50) = 500. The deferred loss cannot exceed the total realized loss.