Wash Sale Calculator

Disallowed vs allowed loss on repurchases.

Finance and MoneyUpdated 2026-10-121 min read
Wash Sale Calculator
Bought 30 days before through 30 days after.
Disallowed loss
...
Allowed loss...
Basis add...

What it does

Selling losers while rebuying them trips the wash sale rule: losses on replaced shares wait instead of deducting now. The disallowed slice joins the new shares basis, so it surfaces on the later sale.

The tool above takes shares sold, total loss, and replacement shares inside the window. It returns disallowed with allowed loss and per share basis add beside them.

The defaults sell 100 shares at a $1,000 loss and replace 40: $400.00 disallowed, $600.00 allowed, plus $10.00 basis per new share. Full replacement disallows the whole $1,000.

The window and basis math follow IRS Publication 550 with Schedule D instructions matching: 30 days before through 30 days after, replacement cost rises by disallowed loss except in IRAs.

How to use

  1. Enter shares sold at a loss.
  2. Enter the total dollar loss.
  3. Enter replacement shares in the window.
  4. Read disallowed loss first.
  5. Read allowed loss beside it.
  6. Carry the basis add to new lots.

Formula

Disallowed = loss x new / sold (capped). Allowed = loss - disallowed. Basis += disallowed / new.
61 days
30 before through 30 after sale date.
new
Substantially identical shares repurchased.
basis
New cost plus disallowed slice.

Partial replacement prorates while full replacement kills the whole loss this year. IRA repurchases lose the basis add permanently, and 1099-B flags only same account same CUSIP cases while the rule reaches further.

Worked example

Example: 100 sold, $1,000 loss, 40 new

Defaults: 100 shares sold, $1,000 loss, 40 replacement shares.

  1. Share: 40 / 100 of the sale replaced.
  2. Disallowed: 1000 x 0.4 = $400.00.
  3. Allowed: 1000 - 400 = $600.00.
  4. Basis: 400 / 40 = $10.00 per new share.
  5. Tool shows $400.00, $600.00, $10.00.
  6. Full 100 new disallows the whole $1,000.

Reference table

Cases on $1,000 loss, 100 sold
ReplacedDisallowedAllowed
0 shares$0.00$1,000.00
40 shares$400.00$600.00
100 shares$1,000.00$0.00

Limits

  • Identical means facts and circumstances.
  • IRA replacements lose basis add.
  • Dealers and some funds exempt.
  • State rules can differ.

Common mistakes

  • Counting only same day repurchases.
  • Missing pre sale 30 days.
  • Forgetting options count too.
  • Trusting 1099-B flags fully.
  • Losing the basis add on resale.

Try it yourself

Quick checks. Answers sit tucked under each question.

Full 100 replaced?

$1,000.00 disallowed, $0.00 allowed.

Nothing replaced?

$0.00 disallowed, full $1,000.00 allowed.

IRA replacement?

Disallowed with no basis add, permanently.

Questions

What is a wash sale?

Loss sale with identical repurchase inside 30 days either way.

How long is the window?

61 days total including the sale date.

Partial replacement?

Disallowed prorates by replaced share count.

Where does disallowed go?

Into replacement shares basis, except IRA cases.

Options count?

Yes, contracts on identical stock trip the rule.

Crypto too?

Securities rules differ for digital assets; check current IRS posture.

Sources

How this page was checked. The formula above was matched against the cited sources, and the worked example was run through the tool on this page before publishing. If you spot an error, contact us so we can fix it and note the correction.