Wash Sale Calculator
Enter your sale and repurchase details to see how much of your capital loss the IRS wash sale rule disallows.
Result
How it is calculated
The tool assumes you already know you repurchased within the 30-day window; it does not take dates, it only splits the loss by share count.
loss per share = cost basis − sale pricetotal loss = shares sold × loss per sharematching shares = min(shares sold, shares repurchased)disallowed = matching shares × loss per shareallowed = total loss − disallowednew basis = repurchase price + disallowed ÷ matching shares
All prices are dollars per share. The disallowed amount is not lost; it is added to the basis of the matching replacement shares only. If you bought back more than you sold, the extra shares keep their plain repurchase price, and the new basis shown is per matching share. If the sale was at a gain or breakeven (sale price not below cost basis) there is no loss and no result is shown. Zero shares sold, zero shares repurchased or a zero cost basis also give no result.
Worked example
You sold 100 shares at $40 that cost $50 each, then bought back 60 shares at $41. The loss is 50 − 40 = $10 per share, so the total loss is 100 × 10 = $1,000. Only 60 shares were replaced, so the disallowed loss is 60 × 10 = $600.00. The other 40 shares keep their loss: 1,000 − 600 = $400.00 allowed now. The $600 is added to the 60 replacement shares: 41 + 600 ÷ 60 = $51.00 new cost basis per share.
Common mistakes
- Entering the sale price at or above the cost basis. A gain is not a wash sale; the tool returns nothing instead of a disallowed amount of zero.
- Entering the total proceeds rather than the price per share. Both price fields are per share, and the share counts are separate fields.
- Treating the disallowed loss as gone for good. It is moved into the basis of the repurchased shares and is recovered when you finally sell them.
- Entering a repurchase of zero to see the loss as fully allowed. With zero shares repurchased the tool shows no result; if nothing was bought back, the whole loss is simply deductible and no wash-sale calculation is needed.
- Forgetting that the tool does not check dates or whether the securities are substantially identical. It only does the arithmetic; you decide whether the rule applies, and other countries have different rules.
About this calculator
The IRS wash sale rule (Internal Revenue Code Section 1091) disallows a tax deduction for a capital loss if you buy the same or a 'substantially identical' security within a 61-day window: 30 days before the sale, the day of the sale, or 30 days after. It exists to stop investors from selling a losing position purely to claim a tax deduction while immediately buying it back and keeping their market position unchanged.
When the rule is triggered, the disallowed loss is not simply lost — it is added to the cost basis of the newly repurchased shares, which reduces your taxable gain (or increases your deductible loss) when you eventually sell those replacement shares for good. The portion of your original loss that falls outside the repurchase, if any, remains an allowed loss you can deduct right away.
Investors and tax preparers run this calculation especially during tax-loss harvesting season at year-end, when it's common to sell a losing stock or fund for the tax benefit while wanting to stay invested in a similar position — this calculator shows exactly how much of the loss the wash sale rule disallows and what your adjusted cost basis becomes.
Was this helpful?
You can pick up to 3 reactions.
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
- Loan Calculator
- Profit Calculator
- Discount Calculator
- BMI Calculator
- Percentage Calculator
- Ideal Weight Calculator
- Age Calculator
- Pregnancy Due Date Calculator
- Compound Interest Calculator
- BMR Calculator (Basal Metabolic Rate)
- Tip Calculator
- Fuel Cost Calculator
- Date Difference Calculator
- Sleep Cycle Calculator
- Daily Water Intake Calculator
- Simple Interest Calculator
- Heart Rate Zones Calculator
- Running Pace Calculator
- Pet Age Calculator
- Calories Burned Calculator
- Macro Calculator
- TDEE Calculator (Total Daily Energy Expenditure)
- Waist-to-Hip Ratio Calculator
- Honor Roll Calculator
- One Rep Max (1RM) Calculator
- Ovulation Calculator
- Electricity Cost Calculator
- Unit Price Calculator
- Savings Goal Calculator
- Break-Even Point Calculator
- Paint Calculator
- Course Grade Average Calculator
- Business Days Calculator
- Time Duration Calculator
- Fuel Economy Calculator
- Temperature Converter
- Tile Calculator
- Aspect Ratio Calculator
- Roman Numeral Converter
- Goal Weight Timeline Calculator
- Salary Converter (Hourly to Annual)
- Credit Card Validator (Luhn)
- Body Surface Area (BSA) Calculator
- Feels-Like Temperature Calculator
- Ohm’s Law Calculator
- PPI (Pixel Density) Calculator
- Molar Mass Calculator
- Zodiac Sign Calculator (Western + Chinese)
- IBAN Validator
- Shoe Size Converter
- Country Info & Dialing Code Lookup
- Time Zone Difference (World Clock)
- CAGR (Compound Annual Growth Rate) Calculator
- Rule of 72 Calculator
- Blood Alcohol Content (BAC) Calculator
- Lean Body Mass (LBM) Calculator
- Pythagorean Theorem Calculator
- Speed Converter
- Download Time Calculator
- Date Calculator (Add/Subtract)
No calculators found
Comments