Once you know which losses survive the wash sale rule, see how much you can deduct now and how much carries forward. Enter your adjusted gains and losses in the calculator.
Open the Capital Loss Carryover Calculator →The wash sale rule (IRC §1091) disallows a loss when you sell a stock or security at a loss and buy a substantially identical one within 30 days before or after the sale. The loss is not deleted: it is added to the basis of the replacement shares and the holding period carries over, so you get it back when you sell those shares in a clean transaction. The big exception is a repurchase in an IRA, where the loss is permanently forfeited. As of 2026, the rule does not apply to cryptocurrency.
- 61-day window. The rule covers the 30 days before the sale, the sale day, and the 30 days after - a purchase anywhere in that span triggers it.
- Substantially identical. The same stock or fund is covered; a different company or a fund tracking a different index generally is not.
- Loss is deferred, not lost. The disallowed loss is added to the replacement shares' basis under §1091(d), and their holding period tacks on the old holding period.
- The IRA trap is permanent. Under Revenue Ruling 2008-5, buying the replacement in an IRA disallows the loss with no basis step-up, so it is gone for good.
- Spouses and entities count. A purchase by your spouse or a corporation you control can trigger the rule on your sale.
- Dividend reinvestment can trigger it. An automatic reinvestment within the window is a purchase of more shares and can cause a wash sale.
- Crypto is not covered (2026). Cryptocurrency is property, not a security, so §1091 does not currently apply to it.
- Report with code W. A wash sale is shown on Form 8949 with code W and a positive adjustment in column (g).
- It feeds the carryover. Because a wash sale shrinks your deductible loss, it directly affects your $3,000 deduction and your capital loss carryover.
What the Wash Sale Rule Is
The wash sale rule is an anti-abuse provision in IRC §1091. It stops you from claiming a tax loss on a security while staying invested in essentially the same position. If you sell stock or securities at a loss and acquire substantially identical stock or securities within a short window around the sale, the loss is disallowed for that year. The economic logic is simple: if you never really left the position, Congress does not let you bank the loss yet.
The rule matters most for tax-loss harvesting, the common practice of selling losers near year-end to offset gains or up to $3,000 of ordinary income. Harvesting only works if the loss is actually deductible, and the wash sale rule is the main thing that can take it away. Critically, the loss is not destroyed, only deferred (except in the IRA case below), so a wash sale is usually a timing problem rather than a permanent loss of the deduction.
Where It Comes From
Section 1091 disallows "any loss" from a sale of stock or securities where, within a period beginning 30 days before and ending 30 days after the sale, the taxpayer has acquired (or entered into a contract or option to acquire) substantially identical stock or securities. The matching basis and holding-period rules are in §1091(d). The IRS explains the mechanics in Publication 550. This guide walks through each part and then shows how it connects to your capital loss carryover.
The 61-Day Window
The wash sale period is often called the 30-day rule, but it is really a 61-day window. It includes the 30 calendar days before the sale, the day of the sale itself, and the 30 calendar days after. A purchase of substantially identical securities at any point in that span disallows the loss.
| Part of the window | Length | What triggers the rule |
|---|---|---|
| Before the sale | 30 days | Buying substantially identical shares in the 30 days leading up to the sale |
| Day of sale | 1 day | The loss sale itself |
| After the sale | 30 days | Buying substantially identical shares in the 30 days after the sale |
The most overlooked half is the 30 days before. Investors who plan to harvest a loss often remember not to rebuy for 31 days afterward, but forget that a recent purchase, an automatic dividend reinvestment, or a payroll-plan purchase in the prior month can disallow the very loss they are trying to take. To be safe, the position should be clean of any substantially identical purchases for the full 61 days, and you must wait at least 31 days after the sale before buying back.
The window counts calendar days, not trading days, and there is no exception for weekends or holidays. Because the count is exact, a repurchase on day 30 still triggers the rule, while a repurchase on day 31 does not.
Substantially Identical Securities
The rule only bites if the security you buy is substantially identical to the one you sold. The phrase is not defined in the statute, and the IRS judges it on the facts, but some patterns are settled.
- The same security is always substantially identical. Selling and rebuying the same company's common stock, or the same mutual fund or ETF, is the clearest wash sale.
- Different companies are not. Selling one company's stock and buying a competitor's is not a wash sale, even in the same industry.
- Index funds tracking the same index from the same provider are generally treated as substantially identical; two funds tracking different indexes usually are not, which is the basis of most harvesting swaps.
- Preferred stock or bonds versus common stock of the same company can be substantially identical if they are convertible or otherwise interchangeable, but ordinarily are treated as different securities.
- Options and contracts count. Acquiring a call option or a contract to buy substantially identical stock within the window triggers the rule just like buying the shares.
The practical takeaway for harvesting is to replace a sold fund with one that is clearly not substantially identical - a different issuer tracking a different index in the same asset class - so you keep market exposure without disallowing the loss. After 31 days you can switch back to the original if you wish.
How the Disallowed Loss Is Calculated
When a wash sale applies, you do not deduct the loss in the year of sale. The amount disallowed is the loss attributable to the shares that were replaced. If you replace only some of the shares you sold, only the loss on the matched shares is disallowed; the rest is deductible.
- Full replacement. Sell 100 shares at a $2,000 loss and buy 100 substantially identical shares within the window - the entire $2,000 loss is disallowed.
- Partial replacement. Sell 100 shares at a $2,000 loss but buy back only 40 - 40 percent of the loss ($800) is disallowed; the other $1,200 is deductible.
- More shares bought than sold. If you buy more replacement shares than you sold, the disallowed loss attaches to an equal number of the new shares; the extra shares simply have their own cost basis.
The disallowed amount is what you carry into the basis adjustment below. It also means a wash sale reduces the net loss available for your $3,000 deduction and your carryover, which is why harvesting plans have to account for it before counting on a deduction.
The Basis and Holding-Period Adjustment
This is the part that makes a wash sale usually a deferral rather than a true loss. Under §1091(d), the disallowed loss is added to the cost basis of the replacement shares, and under the holding-period rules the time you held the original shares is added to the holding period of the replacement shares.
Basis Step-Up
Suppose you buy 100 shares for $5,000, sell them for $3,000 (a $2,000 loss), and rebuy 100 substantially identical shares for $3,100 within the window. The $2,000 loss is disallowed, so your basis in the new shares is $3,100 plus $2,000, or $5,100. When you later sell those shares in a clean transaction, the higher basis gives you a bigger loss or a smaller gain, recovering the $2,000. The loss was deferred, not lost.
Holding Period Tacks
The holding period of the shares you sold is added to the replacement shares. So if you had held the original shares for 11 months, the replacement shares are treated as already held 11 months. This can let a later sale qualify as long-term sooner than the actual purchase date would suggest, which affects whether a future gain or loss is short-term or long-term.
Cryptocurrency and What Is Not Covered
IRC §1091 applies to "stock or securities." That wording controls what falls outside the rule.
- Cryptocurrency. The IRS treats cryptocurrency as property, not a security, so as of 2026 the wash sale rule does not apply to it. Selling a coin at a loss and rebuying it immediately generally preserves the loss. Congress has repeatedly proposed extending wash sale rules to digital assets, and the One Big Beautiful Bill Act did not make that change, so it remains current law. Watch for future legislation, and note that crypto held through a security, such as a stock or an ETF, can be a different story.
- Commodities and most physical assets. Direct commodity positions outside the securities definition are generally not covered, though related securities and contracts can be.
- Gains. The rule disallows losses only. There is no wash sale on a gain; selling at a gain and rebuying is never restricted.
- Section 475 traders. A trader who has made a valid mark-to-market election under §475(f) reports ordinary gains and losses and is not subject to wash sale adjustments on securities.
Because the crypto position is widely misunderstood and the law could change, anyone harvesting crypto losses should document the rules in effect for the year and watch for new legislation each session.
Reporting a Wash Sale on Form 8949
Wash sales are reported on Form 8949, which feeds Schedule D. You report the sale normally, then flag the wash sale and add back the disallowed portion.
- Column (f) - code W. Enter code W to identify the transaction as a wash sale.
- Column (g) - adjustment. Enter the disallowed loss as a positive number. This reduces the loss in column (h), so only the deductible part flows to Schedule D.
- Form 1099-B. Your broker reports wash sales within that one account and may show the adjustment for you, but brokers do not track wash sales across different accounts, across brokers, or between spouses.
The cross-account blind spot is where most reporting errors happen. If you sold at a loss in one brokerage and bought the replacement in another, in an IRA, or in your spouse's account, no single 1099-B will catch it, and you must make the code W adjustment yourself. Keeping the disallowed amount straight is also what keeps your basis in the replacement shares correct for the future recovery.
Wash Sales, Capital Loss Carryover, and Harvesting
The wash sale rule sits upstream of the capital loss rules. Only losses that survive §1091 enter the Schedule D netting that decides your $3,000 deduction and your carryover under §1211 and §1212.
The sequence is: first remove any wash-sale losses (deferring them into basis), then net short-term and long-term gains and losses, then apply the $3,000 ($1,500 MFS) annual limit against ordinary income, and finally carry the rest forward indefinitely, keeping its short-term or long-term character. A wash sale that disallows a loss this year shrinks both the current deduction and the carryover, then quietly restores the benefit later through the higher basis on the replacement shares.
For tax-loss harvesting to work, the loss has to be real for tax purposes, which means avoiding a wash sale entirely or accepting the deferral. Once your figures are clean, the Capital Loss Carryover Calculator shows how much you deduct now and how much, split by character, carries forward. For the rules on the deduction limit and indefinite carryover, the calculator's methodology walks through §1211 and §1212 step by step. Once losses are netted and a gain remains, the Qualified Dividends and Capital Gains Worksheet Guide shows the 0/15/20 percent rate that gain is taxed at.
Cleaned up your wash sales and ready to see the deductible number? Enter your short-term and long-term gains and losses to get this year's $3,000 deduction and the carryover split.
Open the Capital Loss Carryover Calculator →Practitioner Insight (LMN Tax Inc.)
The wash sale that wrecks a client's return is almost never the obvious one in a single brokerage. It is the cross-account version: a loss harvested in the taxable account while a 401(k) or IRA quietly bought the same target-date or index fund the same week, or a spouse's automatic investment plan picked up the identical ETF. No 1099-B catches it, so we map every household account before approving a December harvest.
The IRA repurchase is the one we treat as a hard stop. An ordinary wash sale only defers the loss; an IRA wash sale destroys it because there is no basis to step up. We have seen five-figure losses vanish this way. The fix is trivial once you know the rule: never buy the security you just sold for a loss inside any IRA in the household for at least 31 days.
For harvesting we lean on the substantially-identical line. Selling one large-cap index fund and buying a different issuer's fund on a different index keeps the client invested through the 31 days without disallowing the loss, and we switch back afterward if they prefer the original. The mistake to avoid is swapping into a fund so close that the IRS would call it identical; the small tracking difference is the whole point.
We also remind clients that a wash sale is usually a timing issue, not a catastrophe, in a taxable account. The deferred loss rides along in the new basis and comes back on the next clean sale, and the holding period tacks, which can even pull a future sale into long-term treatment. We document the basis adjustment in the year it happens so the recovery is not lost track of two or three years later.
Real-World Scenarios
When the General Rules Do Not Apply
- Cryptocurrency (2026). Crypto is property, not a security, so §1091 does not apply. This could change if Congress acts; check the law for the year.
- Section 475 mark-to-market traders. A valid §475(f) election produces ordinary gains and losses and removes wash sale adjustments on securities.
- Dealers in securities. A loss sustained in the ordinary course of a dealer's business is excepted from §1091.
- Gains. The rule disallows losses only; there is never a wash sale on a position sold at a gain.
- Different, non-identical securities. Swapping into a security that is not substantially identical avoids the rule even within the window.
- State conformity. Most states follow the federal treatment, but confirm your state, especially if it computes capital gains differently.
- Cost-basis method interactions. Specific-identification versus average-cost choices can change which lots are matched in a partial wash sale.
Frequently Asked Questions
What to Do Next
Confirm the position is clear of substantially identical purchases for the full 61-day window, including any IRA, 401(k), or spouse account. Then run the Capital Loss Carryover Calculator to see how much of the harvested loss you can deduct this year and how much carries forward.
Make sure the disallowed loss is added to the replacement shares' basis so you recover it later, and report the sale on Form 8949 with code W. Then re-enter your adjusted gains and losses in the carryover calculator to get the correct deductible figure.
Losses that survive the wash sale rule offset capital gains without the $3,000 limit. Estimate the gain on a property sale with the Home Sale Capital Gains Calculator, or read the Installment Sale Guide to time the gains a carryover can shelter.
Margin interest is deductible only against net investment income, and the election to include capital gains changes the result. Check it with the Investment Interest Expense Calculator before you file.
Related Tools and Guides
- IRC §1091 (Cornell LII) — Loss From Wash Sales of Stock or Securities — (a) the 30-days-before-and-after window and the disallowance of the loss; (d) the basis adjustment to the replacement shares.
- IRS Publication 550 — Investment Income and Expenses — the wash sale rule explained, substantially identical securities, the basis and holding-period adjustment, and the dividend-reinvestment and option traps.
- IRS Form 8949 — Sales and Other Dispositions of Capital Assets — reporting a wash sale with code W in column (f) and the disallowed loss as a positive adjustment in column (g).
- IRS Topic 409 — Capital Gains and Losses — the $3,000 ($1,500 MFS) capital loss deduction limit and the carryover of unused losses that the wash sale rule feeds into.
- Revenue Ruling 2008-5 (IRB 2008-3) — a wash sale into an IRA disallows the loss with no basis increase, permanently forfeiting it.
- IRC §1211 (Cornell LII) — Limitation on Capital Losses — the $3,000 ($1,500 MFS) limit on deducting net capital losses against ordinary income, the rule wash-sale-adjusted losses ultimately flow into.
- IRC §1212 (Cornell LII) — Capital Loss Carryovers — the indefinite carryover for individuals with preserved short-term and long-term character.