Wash Sale Rule Calculator

Check if a stock repurchase triggers the wash sale rule. See adjusted cost basis.

By Konstantin Iakovlev · Updated September 2026 · Source: IRS Publication 550 (2025), Wash Sales

$
$

Wash Sale Triggered?

Yes

Disallowed Loss

$5,000.00

Adjusted Basis

$14,500.00

Wash Sale Analysis

Days Between Sale and Repurchase10 days
Within 30-Day Window?Yes — wash sale applies
Total Loss on Sale$5,000.00
Disallowed Loss$5,000.00
Currently Deductible Loss$0.00

Adjusted Cost Basis

Original Basis Per Share$95.00
Disallowed Loss Added$50.00
Adjusted Basis Per Share$145.00

Alternative Strategies

Wait 31+ daysRepurchase after wash sale window
Buy similar (not identical) fundE.g., from an S&P 500 fund to a total-market fund
Double upBuy first, wait 31 days, then sell original
Do not rebuy in an IRAAn IRA or Roth IRA purchase within the window disallows the loss for good (IRS Pub. 550)

Use the Wash Sale Rule Calculator above to calculate your results. Enter your values and see instant results — all calculations run in your browser.

Disclaimer: This calculator is for informational purposes only and does not constitute tax, financial, or legal advice. Results are estimates based on the information you provide and current rates. Always consult a qualified tax professional or financial advisor for advice specific to your situation.

How It Works

Selling a stock at a loss feels like a clean way to harvest a tax benefit, but the IRS Wash Sale Rule can quietly disallow that capital loss and reshape your adjusted cost basis. This tool maps out whether your repurchase falls into the trap, so your tax reporting reflects what the IRS will actually accept rather than what you hoped to claim.

The trigger is mechanical: sell a security at a loss, then buy substantially identical stock within 30 days before or after the sale, and you land inside a 61-day window that voids the deduction. When that happens, the disallowed loss isn't gone forever. It rolls into the cost basis of the replacement shares, raising that basis by exactly the amount you couldn't deduct.

Many investors track only the exact ticker and miss the wider net the rule casts. Buying a contract or option to buy the same stock inside the window counts too, and so does a purchase by your spouse or by a corporation you control. The rule also reaches your IRA: if the replacement shares go into an IRA or Roth IRA, the loss is disallowed and is not added to any basis, so it is lost rather than deferred. Whether two different funds tracking the same index are substantially identical is a facts-and-circumstances question that IRS Publication 550 does not settle. Treat the position, not the symbol, as what you're really watching.

Example: Wash Sale Impact

  1. 1 Input: You sold 100 shares of XYZ Corp. on April 1, 2026, at $50 per share, realizing a $500 loss (original cost basis was $55 per share). You then repurchase 100 shares of XYZ Corp. on April 15, 2026, at $52 per share.
  2. 2 Calculation: Since the repurchase occurred within 30 days of the sale at a loss, a wash sale is triggered. The $500 loss is disallowed. This $500 is added to the cost basis of your newly acquired shares.
  3. 3 Result: Your adjusted cost basis for the 100 shares purchased on April 15, 2026, is $5,700 ($5,200 purchase price + $500 disallowed loss). Your per-share adjusted cost basis is $57.00.
  4. 4 Context: You cannot claim the $500 loss on your 2026 tax return. Instead, it effectively reduces any future capital gains or increases any future capital losses when you eventually sell the repurchased shares, due to the higher cost basis.

Source: IRS Publication 550 (2025), Wash Sales · Last updated: September 2026

Frequently Asked Questions

What is the wash sale rule? (detailed)
The wash sale rule prevents you from claiming a tax loss on a security if you buy a substantially identical security within 30 days before or after the sale. The disallowed loss is added to the cost basis of the replacement security, deferring (not eliminating) the tax benefit.
Does the wash sale rule apply to crypto?
Not to crypto held directly. IRS Publication 550 (2025) applies the wash sale rule to stock or securities and treats digital assets as property, so under that publication, selling a coin at a loss and buying it back within 30 days is not a wash sale. Legislation could change this, so check the latest Publication 550 before relying on it.
Can I buy a similar ETF to avoid a wash sale?
Often, yes, as long as the new fund is not "substantially identical" to the one you sold. Publication 550 gives no fund-specific rule; it says to weigh all the facts and circumstances. Two funds that track the same index, such as two S&P 500 ETFs from different providers, are the gray area. Switching to a fund that tracks a different index, for example from an S&P 500 fund to a total-market fund, avoids the question.