CashDesk · Free Tool

Wash Sale Calculator

Sold at a loss and bought back? See whether the US wash sale rule applies, how much of the loss is disallowed, the new cost basis, and the first date you could have bought back safely.

The sale at a loss

The repurchase

Disallowed loss —
Loss on the sale—
Loss you can claim now—
Wash sale window—
Basis of replacement shares—
First safe date to buy back—

Educational tool only, for the US federal wash sale rule in its simplest form. It does not cover purchases in IRAs, a spouse's account or options and other substantially identical securities, partial lots across several purchases, or state rules. Nothing here is tax advice; confirm with a tax professional.

The wash sale rule in one paragraph

Under the US wash sale rule, if you sell a security at a loss and buy the same or a substantially identical security within 30 days before or after the sale, you cannot deduct the loss now. The window is 61 days long: the 30 days before, the day of the sale and the 30 days after. The loss is not gone. It is added to the cost basis of the replacement shares, and the holding period of the old shares carries over.

disallowed loss = loss × min(shares bought, shares sold) ÷ shares sold
new basis per replacement share = purchase price + disallowed loss ÷ replacement shares

A worked example

With the figures loaded above you sell 100 shares on 20 November 2026 at $40, having paid $50: a $1,000 loss. On 5 December you buy 60 shares back at $38.

  • The window runs from 21 October to 20 December 2026, and 5 December is inside it.
  • 60 of the 100 shares were replaced, so 60% of the loss is disallowed: $600. The other $400 can be claimed for 2026.
  • The $600 is added to the 60 new shares: their basis becomes $38 + $10 = $48 a share. You get the loss back when you eventually sell them.
  • The first date you could have bought back without triggering the rule was 21 December 2026.

Year-end dates for tax-loss harvesting

  • For a loss to count in the 2026 tax year, the sale must happen by 31 December 2026 (trade date).
  • To sell at a loss and buy back within 2026 without a wash sale, sell by 30 November 2026: the 31st day after is 31 December.
  • Purchases in the 30 days before the sale count too. Buying more of a losing position in early December, then selling the original lot at a loss before year-end, is a wash sale.

Purchases in an IRA, or by your spouse, also trigger the rule, and a loss disallowed by an IRA purchase is not added to anything: it is lost. Buying call options on the same shares can count as acquiring substantially identical securities.

Australia is different

Australia has no fixed 30-day rule. Instead, the ATO treats a sale and repurchase made mainly to create a tax loss as a wash sale that can be cancelled under the general anti-avoidance provisions (Part IVA), whatever the gap between the trades; its view is set out in taxation ruling TR 2008/1. There is no “safe” number of days. Whether you are a share trader or an investor also changes how losses are treated: see share trader or share investor?

For setting aside tax on trading gains as you go, see how much to set aside for taxes when self-employed in the US.

Keep the tax reserve as you trade.

CashDesk sets aside tax on trading income as it lands and prepares the figures for your return. It does not lodge returns or give tax advice.

Frequently asked questions

What is the wash sale rule?

A US tax rule that disallows a loss on a sale if you buy the same or a substantially identical security within 30 days before or after it. The disallowed loss is added to the cost basis of the replacement shares.

How long do I have to wait to buy back after selling at a loss?

Until the 31st day after the sale. A sale on 20 November 2026 can be bought back without a wash sale from 21 December 2026.

Is a wash sale loss gone forever?

Usually not. It is added to the basis of the replacement shares and recovered when you sell them. The exception is a repurchase inside an IRA, where the loss is permanently lost.

What if I only buy back some of the shares?

Only the matching portion is disallowed. Selling 100 shares at a loss and buying back 60 disallows 60% of the loss.

Does Australia have a wash sale rule?

Not a fixed 30-day rule. The ATO can cancel the tax benefit of a sale and repurchase made mainly for a tax loss under Part IVA, regardless of the time between trades, as set out in TR 2008/1.