Wash Sale Rule Calculator
IRS §1091 — 61-day window check, disallowed loss, adjusted cost basis & safe repurchase date for US investors filing Schedule D
Enter your trade details
Fill in the sale details and click Check Wash Sale to see your full §1091 analysis — including the 61-day danger window and adjusted cost basis.
- ✓ Real-time 61-day window check
- ✓ Disallowed vs. allowed loss breakdown
- ✓ Adjusted cost basis for replacement shares
- ✓ Holding period inheritance (LTCG / STCG)
- ✓ IRA permanent loss trap warning
The wash sale rule (IRC §1091) is one of the most commonly triggered and least understood provisions in US individual income tax law. Enacted in 1954 and codified at Section 1091 of the Internal Revenue Code, the rule prevents a specific form of artificial tax loss manufacturing: selling a security to realize a deductible loss on Schedule D, then immediately repurchasing the same security to maintain your market position. In Congress's view — and in the IRS's enforcement posture — this sequence produces a loss on paper without any real change in your economic position. The rule disallows the tax deduction until you have a genuine period without holding the security. For US investors filing their annual return, understanding exactly how the disallowance works, how it interacts with your cost basis, and what the IRA trap looks like can make the difference between a correct Schedule D and an amended return.
The 61-Day Window: How the IRS Counts It
The wash sale window is commonly described as "30 days before or after the sale," but the technically accurate statement is more precise: the restricted period runs from the 30th calendar day before the loss sale through the 30th calendar day after the loss sale — a total of 61 days inclusive of the sale date itself. If you sell on December 10, the window runs from November 10 through January 9.
The IRS uses calendar days, not trading days. This is a critical distinction that many investors get wrong. The Saturday after a Friday loss sale counts. The day after Thanksgiving counts. The day the market was closed for a presidential funeral counts. If day 30 falls on a Sunday and you repurchase on Monday (day 31), you are outside the window and the rule does not apply. If you repurchase on that same Sunday (because your broker supports after-hours orders that settle Monday), the controlling date is typically the trade date, not the settlement date. The trade date is what appears on your brokerage confirmation and what the IRS treats as the purchase date for wash sale purposes.
The pre-sale 30-day lookback catches a pattern that surprises many investors using dollar-cost averaging strategies: averaging down into a losing position. Suppose you bought 100 shares of a stock at $180 six months ago. The stock has fallen to $145. On December 10, you buy another 100 shares at $145 (averaging down). On December 15, you sell your original 100 shares at $145 to realize the $35/share loss for tax purposes. The December 10 purchase — five days before the sale — falls inside the 30-day pre-sale window. The loss on your original 100 shares is fully disallowed. You intended to harvest a tax loss; instead, you triggered a wash sale by the averaging-down purchase you made first. Many US investors who actively manage individual stock positions in taxable accounts hit this pattern without realizing it.
Calculating the Disallowed Loss: The Pro-Rata Rule
One of the most important — and underused — mechanics of the wash sale rule is that disallowance is proportional to the number of replacement shares, not automatic on the entire loss. The IRS applies disallowance only to the shares that were actually repurchased within the window, capped at the number sold at a loss. This creates genuine planning flexibility.
The formula: Disallowed loss = min(shares repurchased within window, shares sold at a loss) × loss per share. The deductible loss is the total loss minus the disallowed portion. Example: you sold 200 shares of AAPL at a $25/share loss (total: $5,000 loss) and repurchased 80 shares within 30 days at $155/share. Disallowed loss = 80 × $25 = $2,000. Deductible loss on this year's Schedule D = $3,000 (the remaining 120 shares × $25). The $2,000 is deferred into the adjusted basis of the 80 replacement shares, not permanently lost.
This proportionality means that investors can structure partial repurchases strategically. If you want to maintain some market exposure but still claim a partial deduction, repurchasing fewer shares than you sold while staying inside the window preserves a portion of the current-year deduction. Whether this makes sense depends on your capital gains situation elsewhere in your portfolio — if you have large capital gains to offset, maximizing the current-year deduction by staying out of the window entirely may be preferable to a partial repurchase strategy.
Adjusted Cost Basis: How the Deferred Loss Carries Forward
When a wash sale is triggered in a taxable brokerage account, the disallowed loss per share is added to the repurchase price to create the adjusted cost basis of the replacement shares. This is the deferral mechanism: the tax loss is not extinguished — it is postponed and embedded in the new position's basis, where it will be recognized when those replacement shares are eventually sold outside a wash sale window.
Continuing the example: 80 replacement shares purchased at $155. Disallowed loss per share: $25. Adjusted basis: $155 + $25 = $180 per share. Total adjusted basis for 80 shares: $14,400. When you sell those 80 shares later — say at $200 — your capital gain is ($200 − $180) × 80 = $1,600, not ($200 − $155) × 80 = $3,600. The $2,000 deferred loss has effectively reduced your future capital gain by the same amount. Over time, the full economic loss is recognized — just not in the current tax year.
The critical tax administration point: your broker may or may not update the cost basis on your 1099-B to reflect the wash sale adjustment. For wash sales within the same account, most major brokers (Fidelity, Schwab, Vanguard, TD Ameritrade/Schwab) do track and report the adjusted basis automatically in Box 1e of the 1099-B. However, if the replacement purchase occurs in a different brokerage account — or in your spouse's account — the broker has no visibility into the wash sale across accounts and will not adjust the basis. You must track this manually and make the Form 8949 adjustment yourself. This cross-account tracking failure is a significant source of errors in US investor tax returns.
Holding Period Inheritance: The Often-Overlooked LTCG Benefit
Under IRC §1091(d), replacement shares inherit the holding period of the original shares sold at a loss. The IRS "tacks on" the original holding period, meaning the replacement shares are treated as if you had purchased them on the original purchase date, not the repurchase date. This rule exists to prevent taxpayers from using the wash sale mechanism to reset a short-term position into a long-term one — but it also creates an unintended benefit when you held the original shares for close to (but less than) 12 months.
Example: you bought 100 shares on February 1, 2024. By December 1, 2024 (10 months into the position), the stock has fallen and you sell at a loss, triggering a wash sale by repurchasing on December 15. For long-term capital gains, you need 12 months from the original purchase date. Your replacement shares inherit the February 1, 2024 purchase date. To reach the 12-month mark, you only need to hold the replacement shares until February 2, 2025 — just 49 days from your December 15 repurchase. Without the holding period inheritance rule, you would need to hold from December 15 for a full year, until December 15, 2025. The inherited holding period saves you approximately 10 months of additional hold time.
For US investors in the 32%+ federal bracket, the difference between short-term (ordinary income) and long-term (15% or 20%) capital gains rates on the same dollar amount of gain can be 12%–22%. Knowing that your replacement shares inherit the original holding period lets you plan the minimum hold period to qualify for long-term treatment rather than guessing or over-holding out of caution.
The IRA and Roth IRA Trap: When Deferral Becomes Permanent Loss
The most costly wash sale scenario for US individual investors involves a repurchase inside a retirement account. The rule is straightforward but its consequences are severe: if you sell a security at a loss in a taxable brokerage account and repurchase the same or substantially identical security in a traditional IRA or Roth IRA within the 61-day window, the loss is permanently disallowed. Not deferred — permanently lost. The reason: IRAs are tax-sheltered accounts that do not track cost basis or recognize capital gains and losses. There is no mechanism to add the disallowed loss to an IRA's adjusted basis, because IRA positions have no recognized basis for capital gain purposes. The deferred-loss basis mechanism that applies in taxable accounts simply does not exist inside an IRA.
This trap catches investors in a specific scenario: sell 200 shares of VOO in your taxable Fidelity account at a $4,000 loss on December 8 to harvest the loss before year-end. On December 12, buy 200 shares of VOO in your Roth IRA to "maintain market exposure" during the wash sale wait period. The loss from the taxable sale is permanently disallowed — $4,000 gone. The Roth IRA shares have no adjusted basis, and when those shares are later sold at a profit inside the Roth, the gain is tax-free (as Roth gains always are) — but the $4,000 disallowed loss provides no future tax benefit anywhere.
The IRA trap also extends to your spouse's IRA. If you sell at a loss in your taxable account and your spouse purchases the same security in their IRA within the 61-day window, the wash sale rule applies and your loss is disallowed. The IRS treats spousal accounts as part of the same household for wash sale purposes. This is documented in IRS Publication 550, Chapter 4. Many married couples who coordinate their December tax-loss harvesting activities unknowingly trigger this rule when one partner's IRA rebalancing purchase coincides with the other's taxable loss harvesting sale.
Reporting Wash Sales on Form 8949 and Schedule D
Wash sales are reported on Form 8949, Part I (short-term) or Part II (long-term), depending on the holding period. Your broker will report wash sale adjustments on Form 1099-B, Box 1g ("Wash sale loss disallowed"), for wash sales within the same account. On Form 8949, the mechanics are: Column (d) shows gross proceeds. Column (e) shows your original cost basis. Column (g) shows the wash sale disallowance as a positive number (reducing the deductible loss). The net result flows to Column (h), which reflects the actual deductible loss after the §1091 adjustment. This net deductible loss transfers to Schedule D, Line 1b (short-term, covered) or Line 8b (long-term, covered).
For cross-account wash sales not captured on your 1099-B, you must identify the transactions manually and make the adjustments on Form 8949 yourself. Use column (g) to note both the disallowed amount (reducing the loss) and, for the replacement shares in the other account, note the basis adjustment via a separate Form 8949 entry. The IRS instructions for Form 8949 provide the technical treatment, and IRS Publication 550 (Investment Income and Expenses) contains the definitive wash sale guidance including examples. If your wash sale situation involves multiple lots, different accounts, or a spouse's account, having a CPA or enrolled agent prepare the Schedule D section of your return is advisable for the year the wash sale occurred.
Tax-Loss Harvesting Without Triggering the Wash Sale Rule
Year-end tax-loss harvesting is a legitimate and widely practiced strategy for US investors in taxable brokerage accounts. The goal is to realize losses that offset capital gains (and up to $3,000 of ordinary income annually, with excess carried forward indefinitely). The wash sale rule is the primary constraint on this strategy, but it does not prevent tax-loss harvesting — it just requires a 31-day waiting period or a switch to a non-identical security.
The two main approaches: (1) Wait 31 days, then repurchase. Sell the losing position, accept 31 calendar days of market exposure risk, then repurchase the same security. This is simple and avoids any substantially identical security question — but it leaves you out of the market during the waiting period, which could matter if the security or its sector moves significantly. Use the safe repurchase date shown by this calculator to plan the exact earliest repurchase date without guessing.
(2) Immediately buy a similar but not identical security. Sell SPY at a loss, immediately buy IVV (iShares S&P 500). Both track the S&P 500, but most tax practitioners consider them not substantially identical because they are issued by different entities (State Street vs. BlackRock) with different fund structures. After 31 days, you can sell IVV and buy SPY back if you prefer. Similarly: sell an individual stock at a loss, immediately buy a diversified ETF in the same sector. The ETF represents many companies and is generally not considered substantially identical to any single stock. Selling NVDA at a loss and buying SMH (VanEck Semiconductor ETF) is the kind of switch most CPAs consider safe — SMH holds 25+ semiconductor companies, and NVDA is roughly 20% of the ETF, making the ETF not "substantially identical" to a single-name position.
What you should not do: sell VOO and immediately buy SPY. The IRS has not ruled definitively, but the risk that these two funds — which both track the S&P 500 index with near-identical compositions and daily price correlation above 0.999 — are considered substantially identical is real enough that most CPAs advise against the swap. The "different issuer" argument has merit but is not settled law. When the potential wash sale disallowance is large (say, $20,000+), the downside of an IRS challenge outweighs the convenience of staying in a nearly identical fund.
Frequently Asked Questions — Wash Sale Rule for US Investors
The questions every American investor asks about IRC §1091, Schedule D, and year-end tax-loss harvesting — answered with the specificity your tax return requires.
The wash sale rule (IRC §1091) disallows a capital loss deduction if you buy the same or substantially identical security within 30 calendar days before or after the sale that generated the loss — a 61-day window total. If triggered in a taxable account, the disallowed loss is not permanently lost: it is added to the cost basis of the replacement shares and recognized when those shares are eventually sold outside of another wash sale window. This affects your Schedule D by reducing the deductible loss in the current year. The rule applies to stocks, ETFs, mutual funds, and options on substantially identical securities. It does not apply to gains — only to loss transactions.
Yes — the wash sale rule applies to any "substantially identical" security, which unambiguously includes the exact same ETF or mutual fund (same ticker, same CUSIP). Where it gets complicated is cross-ETF switching. The IRS has not issued a revenue ruling specifically addressing ETF substantially identical determinations, and there is no Tax Court precedent directly on point. The practical standard most CPAs apply: two funds are not substantially identical if they are issued by different entities, track different indexes (even if correlated), and have different constituent holdings. VOO (Vanguard) and SPY (State Street) both track the S&P 500 — they are highly correlated but issued by different entities with different structures. Most practitioners consider this switch acceptable, but it carries more risk than a clearly non-identical swap (e.g., VOO to QQQ). This calculator applies the rule only to the exact same ticker, consistent with what your broker's 1099-B will report.
This is the most damaging wash sale scenario. If you sell at a loss in your taxable brokerage account and repurchase the same security in a traditional IRA, Roth IRA, or your spouse's IRA within the 61-day window, the loss is permanently disallowed — not deferred, permanently lost. IRAs do not track cost basis for capital gain purposes, so there is no mechanism to pass the deferred loss into the IRA. The disallowance is documented in IRS Publication 550, page 59 (2023 edition): "If you sell stock and your spouse or a corporation you control buys substantially identical stock within the wash sale period, the loss is also disallowed." The IRA trap is especially dangerous in December, when investors often harvest taxable losses and simultaneously rebalance their IRA portfolios — the two activities can unknowingly create cross-account wash sales that trigger permanent loss disallowance. Always coordinate taxable and retirement account transactions during loss harvesting season.
No — the disallowance is strictly proportional to the shares repurchased within the window, capped at the shares sold at a loss. If you sold 300 shares at a $20/share loss ($6,000 total) and repurchased 100 shares within 30 days, only $2,000 (100 × $20) is disallowed. The remaining $4,000 (the 200 non-replaced shares × $20) is fully deductible on Schedule D in the current year. This proportionality rule — established by the IRS in regulations under §1091 — is what makes partial tax-loss harvesting viable. You can sell your entire position, immediately buy back a smaller position to maintain partial exposure, and still deduct the loss attributable to the unreplaced shares. Many investors are unaware of this and either avoid all repurchases (sacrificing more deduction than necessary) or repurchase their entire position (disallowing the full loss unnecessarily).
The adjusted cost basis is the key to understanding why wash sales defer rather than destroy your tax deduction. The disallowed loss per share is added to the purchase price of each replacement share. Formula: adjusted basis = repurchase price + (disallowed loss ÷ wash sale shares). If you repurchased 100 shares at $160 and the disallowed loss was $20/share, your adjusted basis is $180/share. When you eventually sell those 100 shares at, say, $190, your capital gain is ($190 − $180) × 100 = $1,000 — not ($190 − $160) × 100 = $3,000. The deferred $2,000 was factored into your basis and is recovered at the future sale. Keep detailed records of adjusted basis for Form 8949 filing, especially for cross-account wash sales where your broker's 1099-B may not reflect the adjustment.
Yes — IRC §1091(d) requires holding period tacking: replacement shares inherit the original purchase date from the shares sold at a loss. If you originally bought stock on March 1, 2024, held for 9 months, sold at a loss in December, and repurchased within 30 days, your replacement shares are treated as having been purchased on March 1, 2024 — not in December. This means you only need to hold the replacement shares until March 2, 2025 (3 more months from the December repurchase) to reach the 12-month LTCG threshold, rather than waiting until December 2025. For investors in the 32%+ bracket, the difference between short-term (ordinary income) and long-term (15%–20%) rates on a $10,000 gain can be $1,200–$1,700 in federal tax savings alone. Knowing the inherited holding period lets you plan the exact minimum hold date rather than over-holding.
Yes — the rule's 30-day lookback catches pre-sale purchases as firmly as post-sale ones. A purchase 28 days before your loss sale is treated identically to a purchase 28 days after. This pattern — buying more shares of a falling stock, then selling your original higher-priced lot at a loss — is one of the most common inadvertent wash sale triggers. Dollar-cost averagers are particularly exposed: if you add to a position monthly and the position falls, any sale of your earlier, higher-cost shares within 30 days of the most recent scheduled purchase triggers the wash sale rule on shares equal to those most recently purchased. The practical safeguard: if you hold a position at a significant unrealized loss and want to harvest it before year-end, stop any automatic purchases or dividend reinvestments in that security at least 30 days before the planned sale date.
The safe repurchase date is calculated as: sale date + 31 calendar days. Day 30 after the sale is still inside the prohibited window. Day 31 is the first date you can repurchase the same security without triggering §1091. This calculator displays the exact date based on your sale date input. Remember: the IRS uses calendar days, not business days or trading days. If your sale date is December 10, the safe repurchase date is January 10. If January 10 falls on a Sunday and the market is closed, you can execute on Monday January 11 — but not on Friday January 9 (which is day 30 and still in the window). One practical tip: schedule your repurchase for day 31 or later, not "approximately a month later." Investors who eyeball "about 30 days" frequently repurchase on day 29 or 30, triggering the rule and eliminating the tax benefit they were specifically trying to preserve.
Wash sales are reported on Form 8949 in column (g), with adjustment code "W." Your broker's Form 1099-B will show the disallowed amount in Box 1g ("Wash sale loss disallowed") for wash sales within the same account. On Form 8949: enter gross proceeds in column (d), original cost basis in column (e), and the disallowed amount (as a positive number) in column (g) with code W. The net allowed loss in column (h) flows to Schedule D Line 1b or 8b depending on holding period. For wash sales across accounts (different brokerages or IRA repurchases), the 1099-B from the selling account will not show the adjustment — you must enter it manually on Form 8949. The replacement account's 1099-B will similarly not reflect the basis increase — you must update this in your own records and enter the adjusted basis on Form 8949 when you eventually sell those replacement shares. IRS Publication 550 (2024 edition), the "Wash Sales" section beginning on page 59, provides the authoritative treatment with worked examples.
Switching to a different but correlated ETF is the most common tax-loss harvesting technique to maintain market exposure while avoiding a wash sale. Selling an individual stock and buying a sector ETF is generally considered safe — an ETF holding 20+ companies is not substantially identical to any single component stock. Selling one S&P 500 ETF and buying a different S&P 500 ETF (e.g., VOO → SPY) is a gray area that most practitioners accept but that carries meaningful IRS challenge risk for large disallowed amounts. The safest approach for large taxable positions: switch asset classes temporarily — sell the losing equity position and hold cash or short-term Treasuries for 31 days before returning to equities. You accept market risk during the 31-day window, but the wash sale risk is zero. For bond ETFs, swapping between different issuers' funds tracking the same index carries the same "gray area" risk as equity index ETF swaps — the different issuer argument is the same but equally untested in court.
Yes — and this interaction is a key year-end planning consideration. The IRS allows up to $3,000 of net capital losses to be deducted against ordinary income annually ($1,500 if married filing separately). Losses beyond $3,000 carry forward to future years indefinitely. A wash sale disallows part of your recognized loss, reducing your net deductible loss for the year. If your net deductible loss after wash sale adjustments is exactly $3,000, you deduct all of it this year. If the full loss (before wash sale disallowance) would have been $6,000 and the wash sale disallows $2,000, your deductible loss is $4,000 — you deduct $3,000 this year and carry forward $1,000. Without the wash sale, you would have deducted $3,000 this year and carried forward $3,000. The wash sale reduced your carryforward by $2,000. For investors managing multi-year carryforward positions, tracking how wash sale disallowances interact with the annual $3,000 cap and the carryforward balance is important for accurate multi-year tax planning.
Tax-loss harvesting is the legal, proactive strategy of selling investments at a loss to offset capital gains elsewhere in your portfolio and (up to $3,000) ordinary income. It is widely recommended by financial planners as a way to improve after-tax returns in taxable accounts. A wash sale is an inadvertent or deliberate violation of the tax code that disallows the deduction from that harvested loss — specifically when you repurchase the same security too quickly. Tax-loss harvesting is smart tax planning; a wash sale is what happens when the execution of that plan is done incorrectly. This calculator helps you execute the first strategy without triggering the second: the safe repurchase date feature shows you exactly when you can buy back in, and the partial repurchase analysis shows you how to retain a current-year deduction even if you want to maintain some market exposure.