๐ Wash Sale Calculator
Calculate Disallowed Losses & Adjusted Cost Basis
โ ๏ธ What is a Wash Sale?
A wash sale occurs when you sell a security at a loss and buy the same or "substantially identical" security within 30 days before or after the sale. The IRS disallows the loss deduction, but it's added to the cost basis of the replacement shares.
๐ Understanding the Wash Sale Rule
The wash sale calculator helps investors determine the tax impact of selling securities at a loss and repurchasing them within the IRS's 61-day wash sale window (30 days before, sale date, 30 days after) for 2026. Under IRC Section 1091, losses on wash sales are disallowed as tax deductionsโbut they're not lost forever. The disallowed loss gets added to your cost basis of the replacement shares, effectively deferring the deduction. Whether you're tax-loss harvesting, rebalancing your portfolio, or accidentally triggered a wash sale, this calculator shows your exact disallowed amount, adjusted cost basis, and the timing required to avoid the rule.
๐ How to Use the Wash Sale Calculator
- Enter Shares Sold: Input the number of shares you sold at a loss. This is the original lot you're selling to realize the capital loss.
- Enter Sale Price & Cost Basis: Input the sale price per share and your original purchase price (cost basis). The difference determines your capital loss.
- Enter Sale Date: The date you sold the shares. This establishes the 30-day window before and after for wash sale detection.
- Enter Replacement Shares: Input the number of shares you repurchased and the price paid. If you bought fewer shares than you sold, only a proportional loss is disallowed.
- Enter Repurchase Date: If this date is within 30 days of the sale date (before OR after), a wash sale is triggered.
- Click Analyze: View whether a wash sale occurred, the disallowed loss amount, your new adjusted cost basis, and the 30-day window visualization.
๐ 30-Day Wash Sale Window
๐ Wash Sale Formula & Calculation Method
Capital Loss Calculation
The total capital loss is the difference between what you received from the sale and what you originally paid. A negative result indicates a loss; positive indicates a gain.
Disallowed Loss (Wash Sale)
If you repurchase fewer shares than you sold, only the proportional loss is disallowed. For example, if you sold 100 shares but only repurchased 50, only 50% of the loss is disallowed.
Adjusted Cost Basis (Replacement Shares)
The disallowed loss is added to your cost basis of the replacement shares. This means when you eventually sell those shares, you'll have a higher basis, resulting in less taxable gain (or a deductible loss).
๐ Wash Sale Examples
Example 1: Full Wash Sale
Scenario: Michael sells 100 shares of XYZ at a $500 loss and repurchases 100 shares 5 days later.
Inputs: Sold: 100 shares @ $45 (cost basis $50) | Repurchased: 100 shares @ $43 after 5 days
Calculation:
- Sale Proceeds: 100 ร $45 = $4,500
- Original Cost: 100 ร $50 = $5,000
- Capital Loss: $4,500 - $5,000 = -$500
- Days Apart: 5 (within 30-day window) โ Wash Sale!
- Disallowed: $500 ร (100/100) = $500
- Deductible: $0
Adjusted Basis: $4,300 (repurchase) + $500 (disallowed) = $4,800 ($48/share)
Example 2: Partial Wash Sale
Scenario: Sarah sells 100 shares at a loss but only repurchases 50 shares within the window.
Inputs: Sold: 100 shares @ $30 (cost basis $40) | Repurchased: 50 shares @ $28 after 10 days
Calculation:
- Sale Proceeds: 100 ร $30 = $3,000
- Original Cost: 100 ร $40 = $4,000
- Capital Loss: $3,000 - $4,000 = -$1,000
- Wash Sale Ratio: 50/100 = 50%
- Disallowed: $1,000 ร 50% = $500
- Deductible: $1,000 - $500 = $500
Adjusted Basis: $1,400 (repurchase) + $500 (disallowed) = $1,900 ($38/share)
Example 3: No Wash Sale (31+ Days)
Scenario: Alex sells shares at a loss and waits 35 days before repurchasing.
Inputs: Sold: 200 shares @ $25 (cost basis $35) | Repurchased: 200 shares @ $24 after 35 days
Calculation:
- Sale Proceeds: 200 ร $25 = $5,000
- Original Cost: 200 ร $35 = $7,000
- Capital Loss: $5,000 - $7,000 = -$2,000
- Days Apart: 35 (OUTSIDE 30-day window) โ No Wash Sale!
- Disallowed: $0
- Deductible: $2,000 (full loss)
Replacement Basis: Simply $4,800 (200 ร $24) โ no adjustment needed
๐ Wash Sale Rule Reference Table 2026
| Scenario | Result | Tax Impact |
|---|---|---|
| Repurchase within 30 days | Wash Sale | Loss disallowed, added to new basis |
| Repurchase after 31+ days | No Wash Sale | Full loss is deductible |
| Buy identical security in IRA | Wash Sale | Loss permanently disallowed |
| Spouse buys same security | Wash Sale | Loss disallowed |
๐ก Important Tips for Avoiding Wash Sales
- Wait 31 Days: The safest way to avoid a wash sale is to wait at least 31 days before repurchasing the same security. Mark your calendar!
- Buy Similar, Not Identical: You can buy a similar but not "substantially identical" security immediately. For example, sell S&P 500 ETF (SPY) and buy total market ETF (VTI).
- Watch Your IRA: If your IRA buys the same security during the wash sale window, the loss is permanently disallowedโnot added to basis. This is the worst scenario.
- Spouse's Accounts Count: Your spouse's purchases in any account can trigger the wash sale rule. Coordinate trades at tax time.
- Options Matter: Buying call options or selling put options on the same security during the window also triggers wash sales.
- Track Adjusted Basis: Keep records of all wash sales so your adjusted cost basis is correct when you eventually sell the replacement shares.
๐ Related Calculators
โ Frequently Asked Questions
๐ Official IRS Resources
- IRS Publication 550 (Investment Income)
- IRS Topic 409 - Capital Gains and Losses
- SEC.gov - Wash Sales Explained
Created by Omnicalculator.space โ Your trusted source for investment tax calculators.
Last Updated: January 2026 | IRS Wash Sale Rule (IRC Section 1091)
