Wash Sale Calculator

How much of your loss is disallowed, and what your new basis becomes.

$
$
100
20
50
%
%
Loss you can deduct now
—

Adjust any input above — results update instantly and stay on your device.

Total realised loss
—
Disallowed (deferred) loss
—
Tax saved this year
—
New cost basis per replacement share
—
Wash sale triggered
—
Deferred loss if you sell the replacements
—
Effective tax rate on the loss
—

How to use this wash sale calculator

The wash sale rule is the most commonly misapplied provision in investing tax. People know it exists, they know it involves a 30-day window, and they consistently misunderstand both the mechanism and the consequence.

The rule, stated precisely

If you sell a security for a loss, and you or your spouse buy a substantially identical security within 30 days before or after the sale, the loss is disallowed for the current tax year. It is not forfeited — it is added to the cost basis of the replacement shares. You recognise it later, when you eventually sell those replacements without triggering another wash sale.

The window is 61 days in total: 30 days before the sale and 30 days after. That means the purchase date on the replacement matters as much as the sale date.

What the calculator shows

On a 100-share position with a $100 basis sold at $80 after 20 days, the total loss is $2,000. If you bought back 50 replacement shares within the window, half the loss — $1,000 — is disallowed and deferred. The other $1,000 can offset gains this year. The 50 replacement shares get a new basis of $120 per share rather than the original $100, because $1,000 of disallowed loss divided across 50 shares is $20 added to each.

Note that you sold the position at a short-term loss (held 20 days), so it offsets short-term gains at your ordinary rate — 24% rather than the 15% long-term rate. That timing distinction is worth more than most people realise: harvesting a loss only helps if the gain it offsets sits in a bracket higher than the loss would have used.

What is substantially identical

The IRS says "substantially identical" without defining it precisely, and the ambiguity is real. Generally safe: a completely different company, or a broad market index fund. Generally treated as a wash: the same stock, a different share class of the same company, or an option on that stock.

The safest strategy is to change what you own, not when you sell. If you need to exit a losing position, sell it and stay out for 31 days. If you want to keep the exposure, buy something genuinely different.

The IRA trap

Buying the replacement inside an IRA is the worst option. The loss is permanently disallowed rather than deferred, because IRA basis is not tracked for adjustment. You get no offset this year and no adjustment later — the loss simply disappears. This catches people who buy the replacement in a tax-advantaged account to avoid triggering a wash sale on the taxable account.

Is harvesting losses worth the complexity?

Sometimes, and it depends on your bracket. Two things make it not worth doing:

  • Your gains are already at 0%. Losses do not offset the 0% long-term capital gains bracket. If you have $50,000 of long-term gains taxed at 0% and you harvest $5,000 of losses, you now pay tax on $45,000 at 0% instead of $50,000 at 0% — no benefit, and you have permanently given up the $5,000 loss.
  • You are in a low-income year. The value of a loss is the bracket rate it offsets. A $10,000 loss against zero income is worth nothing this year and might be worth something in ten years.

Harvesting makes clear sense when you have gains in the 15% or 20% bracket, and it makes sense to do it in a year when your income is unusually low. Otherwise, the complexity is not worth it.

Frequently asked questions

What is the wash sale rule?

If you sell a security at a loss and buy a substantially identical one within 30 days before or after the sale, the loss is disallowed for tax purposes. It is not lost — it is added to the cost basis of the replacement shares, so you recognise it later instead of now.

What counts as a substantially identical security?

Generally the same stock or security, or an option to buy it. There is limited guidance on how similar two different securities can be and still be substantially identical, so a convertible bond in the same company or a different class of the same company's stock is legally grey. Buying a genuinely different company or a broad index fund is normally safe.

Does a wash sale apply across accounts?

Yes. The rule applies within the same account and also across your different accounts, including a spouse's account and, with reporting, an IRA. If you buy the replacement in an IRA, the loss is permanently disallowed rather than deferred, because IRA basis is not tracked for adjustment.

Can I wash sale my way out of a losing position?

No. The rule exists to prevent exactly that. If you sell a losing stock and buy it back, you have not reduced your exposure — you have only deferred the tax consequence. If your goal is to exit a position entirely, sell it and do not repurchase it for at least 31 days.

More free calculators

Every tool on Jisua Tools runs entirely in your browser. No sign-up, no data collected, results are instant.

Browse all tools