Calculate a wash sale’s disallowed loss and replacement-share basis, or find the 30-day window before and after a sale when buying back triggers the rule.

One loss sale with the same basis and proceeds per share. U.S. estimate, not tax filing advice.

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

Optional settings

Calculator Functions

FunctionWhat it doesWhat it requires
Wash sale impactFinds the loss disallowed by a wash sale, the loss that remains and the new basis of the replacement sharesRequires shares sold, adjusted basis per share, net proceeds per share, the number of qualifying replacement shares and the replacement account. Replacement cost per share is required when there are replacement shares
61-day windowFinds the first and last dates on which a purchase can turn a loss sale into a wash saleRequires the trade date of the sale

The impact function covers one loss sale in which every share has the same basis and the same proceeds. Replacement shares are the substantially identical shares bought from 30 days before to 30 days after the sale. The replacement account can be a taxable account or an IRA or Roth IRA.

Wash Sale Rule Formulas

D = (B − P) × M [1]
DDisallowed loss ($)
BAdjusted basis per share sold ($)
PNet proceeds per share sold ($)
MMatched shares: the smaller of shares sold and replacement shares

A loss on a sale of stock or securities cannot be deducted when substantially identical stock or securities are bought within 30 days before or after the sale [1] [2]. When the number bought differs from the number sold, the shares bought are matched with an equal number of the shares sold, and only the matched shares lose their deduction [1].

Wash sale impact

new basis = cost + (B − P) [1]

In a taxable account the disallowed loss is added to the cost of the matched replacement shares, which postpones the deduction until those shares are sold, and their holding period includes that of the shares sold [1]. Unmatched replacement shares keep their own cost. When the replacement is bought in an IRA or Roth IRA the loss is still disallowed, and the basis in the IRA is not increased [3].

100 shares with a $10 basis sold for $7.50 a share realize a $250 loss. Buying 100 replacement shares at $8 disallows all $250 and raises their basis to $10.50 a share, $1,050 in total [1]. With 100 shares bought at $50, sold at $40 and only 75 replaced, $750 of the $1,000 loss is disallowed and $250 remains [1].

61-day window

start = sale − 30 days
end = sale + 30 days [2]

The period starts 30 days before the sale and ends 30 days after it [2], which with the sale date itself is 61 days. A sale traded on March 16, 2026 has a window from February 14 to April 15, 2026, and April 16 is the first date outside it. The count uses calendar days from the trade date, not the settlement date.

Limits of This Estimate

  • This is a simplified estimate under U.S. federal rules as published for 2025 returns [1], not tax filing advice.
  • Several purchase lots are matched in the order they were bought, and each lot gets its own basis adjustment [1]. The calculator handles one sale and one replacement price.
  • It does not test whether securities are substantially identical. A purchase by a spouse or a controlled corporation, or a contract or option to buy, also counts as a replacement [1].
  • The loss that is not disallowed may still be limited by other tax rules, and a date outside one sale’s window can fall inside another’s.

Sources

  1. Internal Revenue Service, Publication 550 (2025), Investment Income and Expenses, Wash Sales: wash sale definition, basis and holding period of replacement shares, matching rule and the worked examples
  2. 26 U.S. Code § 1091, Loss from wash sales of stock or securities (Cornell Legal Information Institute): the period from 30 days before to 30 days after the sale
  3. Internal Revenue Service, Revenue Ruling 2008-5: loss disallowed with no IRA basis increase when the replacement is bought in an IRA or Roth IRA