Wash Sale Rule Calculator
Check if a repurchase triggers the IRS wash sale rule. See the 61-day window, your disallowed loss, and the adjusted basis of the replacement shares.
Wash Sale Rule Calculator
Trade Dates
The repurchase can be before the sale. The window runs 30 days in both directions, so a buy that came first still counts.
The Loss Sale
Proceeds and basis are totals, copied straight off Form 1099-B boxes 1d and 1e.
The Replacement Buy
Buy back fewer shares than you sold and only that share of the loss is disallowed.
The rule spans accounts. Section 1091 reaches every account you control, your spouse's purchases, and your IRA. Your broker only reports wash sales inside one account at one firm (Form 1099-B box 1g), so a cross-broker match is yours to track.
Add a sale date and a repurchase date to test the 61-day window.
Estimates only. This calculator is for informational purposes and does not provide tax or legal advice. Whether two securities are "substantially identical" is a facts-and-circumstances determination, so consult a qualified tax professional about your situation.
Tax47
Tax Calculator USA
Estimate your capital gains tax in Tax47
Tax47 builds your whole federal return from real 1099 and W-2 data, with capital gains, deductions, and credits applied as you go.
Free · No sign-up needed
How the 61-day wash sale window works
The wash sale window is not "30 days after." IRC Section 1091(a) and IRS Publication 550 both describe it as a purchase of substantially identical stock or securities within 30 days before or after the sale. Count the 30 days before, the sale date itself, and the 30 days after, and you get 61 calendar days.
Say you sell 100 shares at a loss on April 15. The window opened on March 16 and closes on May 15. A purchase anywhere in that span is a match. That includes a buy you made on April 2, two weeks before the sale, which is the case most calculators miss.
The boundaries are inclusive, so a repurchase on day 30 still trips the rule. The first clear date is the sale date plus 31 days: May 16 in the example above. That is the number most people are actually looking for, and this calculator prints it for whatever sale date you enter.
What happens to the disallowed loss
The loss is deferred, not destroyed. Section 1091(d) adds the disallowed amount to the cost basis of the replacement shares, and Section 1223 tacks the old holding period onto the new shares, so a wash sale cannot be used to restart the long-term clock.
A worked example: you sell 100 shares for $4,000 with a $6,000 basis, a $2,000 loss, then buy 100 shares back at $40. The replacement cost is $4,000, the full $2,000 loss is disallowed, and the adjusted basis of the replacement shares becomes $6,000. Sell those shares later at $6,000 and you break even, which is exactly the loss you were denied.
Partial repurchases prorate. Sell 100 and buy back only 40, and 40% of the loss ($800) is disallowed while the other $1,200 stays deductible this year. Buy back 250 instead and the disallowance caps at 100% of the loss: only the first 100 replacement shares carry the basis bump, and the extra 150 keep their own unadjusted basis.
One exception turns deferral into a permanent loss. If the replacement purchase happens inside an IRA, Revenue Ruling 2008-5 says there is no basis to increase, so the loss is gone for good.
Why cross-account and year-end wash sales slip through
Section 1091 follows the taxpayer, not the account. A sale in your brokerage account and a buy in your spouse's account or your IRA is still a wash sale, and Publication 550 applies the spouse rule even when you file separate returns. Brokers report wash sales on Form 1099-B box 1g, but only within one account at one firm, so cross-broker matches never show up on a form and are yours to catch.
December harvesting is the classic trap. Sell on December 22 and rebuy on January 8 and the disallowed loss follows the replacement shares into the next tax year, which defeats the point of a year-end harvest. Report the adjustment on Form 8949 with code W in column (f) and the disallowed amount as a positive number in column (g).
Staying clear of the rule when harvesting losses
The clean answer is to wait until day 31. If you want to stay invested in the meantime, buy something similar but not identical, such as a broad-market index fund tracking a different index from a different issuer. You can also double up on the position more than 31 days before you sell the original lot, which puts the purchase outside the window entirely. Cryptocurrency sits outside Section 1091 for now because the IRS treats it as property rather than a security.
Once a loss survives the rule, it nets against your capital gains, and any net capital loss left over can offset up to $3,000 of ordinary income per year ($1,500 if you file Married Filing Separately) under IRC Section 1211(b) and IRS Topic No. 409, with the rest carried forward. The Tax-Loss Harvesting Calculator runs that netting for you, and the Capital Gains Tax Calculator prices the short-term or long-term result. If you hold equity comp, the same window applies. A vest in the RSU Tax Calculator or a purchase in the ESPP Tax Calculator counts as an acquisition, and one landing inside the 61 days can trigger the rule on a separate loss sale of the same stock.
Frequently Asked Questions
Common questions about wash sale rule calculator
What is the wash sale rule?
Under IRC Section 1091, a loss is disallowed if you sell a security at a loss and buy a substantially identical security within 30 days before or after that sale. The full window is 61 days: the 30 days before the sale, the sale date itself, and the 30 days after. The disallowed loss is not deducted this year, it is added to the basis of the replacement shares instead.
How long do I have to wait before buying back the same stock?
Day 31. The window closes 30 days after the sale, so the first clear repurchase date is the sale date plus 31 days. Buying back on day 30 still triggers the rule. This calculator prints the exact first safe date for the sale date you enter.
Does the wash sale rule apply if I bought the shares before I sold?
Yes. The window looks 30 days backward as well as forward. If you buy a replacement lot and then sell an older lot at a loss two weeks later, that is a wash sale even though the purchase came first. Enter a repurchase date earlier than the sale date and this calculator will flag it.
What happens to the disallowed loss, is it gone forever?
In a taxable account, no. Under Section 1091(d) the disallowed amount is added to the cost basis of the replacement shares, so you recover it when you sell those shares. The holding period of the shares you sold also tacks onto the replacement shares under Section 1223, so a wash sale cannot restart the short-term clock.
Does it count if I repurchase in my IRA or my spouse's account?
Yes, it is still a wash sale. IRS Publication 550 applies the rule across accounts you control and to your spouse's purchases, even if you file separate returns. The IRA case is worse than a normal wash sale: under Revenue Ruling 2008-5 you cannot increase the IRA's basis, so the loss is permanently lost rather than deferred.
Does the wash sale rule apply to cryptocurrency?
Not currently. The IRS treats cryptocurrency as property rather than a security, so Section 1091 does not reach it and you can sell crypto at a loss and rebuy the same day. Proposed legislation could change this, so check the rules for the tax year you are filing.
What counts as a substantially identical security?
Shares of the same company are always substantially identical. Two index funds tracking the same index are widely treated as substantially identical, while funds tracking different indexes generally are not. Options and contracts to buy the same stock are covered too. The IRS gives no bright-line test, so this is a facts-and-circumstances call. Talk to a tax professional before relying on a swap.
How do I report a wash sale on my tax return?
On Form 8949, enter code W in column (f) and the disallowed amount as a positive number in column (g). Brokers report wash sales on Form 1099-B box 1g, but only within a single account at a single broker. They cannot see your other accounts, so cross-account and cross-broker wash sales are yours to catch. Then run the surviving loss through the Tax-Loss Harvesting Calculator.