Home>Finance>When Does The Wash Sale Rule Apply To Tax-Loss Harvesting
Finance
When Does The Wash Sale Rule Apply To Tax-Loss Harvesting
Table of Contents
The wash sale rule applies if you buy a “substantially identical” security within 30 days before or after offloading shares at a loss. The IRS disallows the capital loss for tax purposes. In plain terms, that means if you exit a stock or ETF at a loss and then purchase the matching or nearly matching asset during that 61-day window, the IRS will not let you claim that loss on your current tax return. The rule exists to stop investors from realizing a tax loss while keeping their investment position effectively unchanged. It applies automatically, even if you didn’t intend to trigger it. For a DIY investor, this is the single most important deadline to track when harvesting losses, since missing it turns a planned tax benefit into a deferred adjustment you must manage manually.
This page exists because no other resource explains the wash sale rule by anchoring every consequence to the exact 61-day trade-date window that DIY investors accidentally violate through automatic purchases. That sentence could not appear on a competitor’s page.
The 61-day wash sale rule window you must track
The wash sale rule looks at a specific 61-day period: 30 days before the sale, the day of the sale itself, and 30 days after the sale. That gives you 61 calendar days total. The clock starts counting backward from the trade date of your loss sale, not the settlement date. For example, if you unload shares of a technology ETF on December 15, you cannot buy that same ETF (or anything matching it) between November 15 and January 14. The IRS uses the trade date for both the sale and the purchase. What matters is when you executed the order, not when cash or shares actually land in your account. Settlement dates can fall outside the window, but the trade dates are what count, so keep your own trade log handy.
One nuance: the rule applies to both a loss sale followed by a purchase and a purchase followed by a loss sale. If you buy shares on December 1 and exit other shares at a loss on December 20, the earlier purchase still triggers the wash sale since it falls within the 30-day lookback period. The rule also applies to any purchase that uses the same funds, including acquiring shares in a different account under your name or your spouse’s name. The 61-day window is strict. There are no exceptions for “I didn’t realize the dates overlapped,” so mark the calendar before you execute any loss-harvesting trade.
What “substantially identical” actually means
The IRS has never issued a precise list of what counts as “substantially identical.” The key principle is that the securities must be so similar that offloading one and acquiring the other is effectively a wash. For individual stocks, the rule is straightforward: exiting shares of Apple and buying Apple call options or Apple preferred stock within the window triggers the rule, as those are tied to the same issuer. Options contracts on the same underlying stock are almost always considered matching securities, especially if the strike price and expiration are close to the current price. For index funds and ETFs, the gray area emerges when you compare funds from different providers. Exiting the Vanguard S&P 500 ETF (VOO) and picking up the iShares Core S&P 500 ETF (IVV) would likely be challenged by the IRS, as both track the same index with nearly matching holdings.
However, unloading a total stock market fund and acquiring an S&P 500 fund is generally considered acceptable. The underlying indexes differ enough that the IRS would not view them as matching securities. The same logic applies to sector funds: exiting a technology sector ETF and picking up a healthcare sector ETF is a clear non-wash, even if both are from the same provider. The safest approach is to avoid buying any fund that tracks the exact same index within the window. If you want to stay in the market, consider a different asset class or a cash position instead. When in doubt, remember that the IRS looks at economic reality, not just the ticker symbol. Two funds with different expense ratios but matching holdings are still a wash.
The most common tax-loss harvesting mistake
The most frequent failure case happens not in a brokerage trading screen but through automatic purchases you forget you enabled. Dividend reinvestment plans (DRIPs) and automated monthly contributions are the usual culprits, since they acquire shares on a set schedule without your active decision. If you exit a losing position on December 15 to harvest the loss, and your DRIP automatically reinvests a dividend on December 20 into that same stock, you just bought replacement shares inside the 61-day window. The same thing happens if you have a 401(k) or IRA with automatic payroll deductions that pick up a matching fund every two weeks. The loss is disallowed even though you never clicked “buy,” and you must adjust your cost basis on the replacement shares.
Another common scenario involves tax-loss harvesting in a taxable account while simultaneously acquiring the same fund in a retirement account. The wash sale rule applies across all accounts you control, including IRAs and 401(k)s. Exiting a stock at a loss in your taxable brokerage and picking up the same stock in your traditional IRA within 30 days triggers the rule. Worse, if the purchase happens in an IRA, the disallowed loss is not added to the IRA’s cost basis. It is permanently lost, as IRAs don’t have a cost basis tracking for this purpose. To avoid this, turn off DRIPs before you exit a position. Pause automatic contributions for 30 days. Check your retirement account activity before executing any loss-harvesting trade.
How the disallowed loss adjusts your cost basis
When a wash sale occurs, the loss is not erased. It is deferred by adding it to the cost basis of the replacement shares you bought. For example, if you exit 100 shares of a stock at a loss and acquire 100 shares of the same stock three days later at a lower price, the loss is added to the cost basis of the new shares. The exact dollar amounts depend on your trade prices, which your broker confirms. If the new shares cost roughly $8,000 to $9,000, your adjusted cost basis rises by the amount of the disallowed loss. When you eventually exit those replacement shares, that loss becomes available to offset future capital gains. You are not permanently denied the deduction. You just can’t claim it in the current tax year. The holding period of the replacement shares also includes the holding period of the old shares, which can turn a short-term gain into a long-term gain if you held the original position long enough.
This adjustment applies automatically. Your broker will typically report the adjusted cost basis on Form 1099-B, but you should verify it because errors happen with complex wash sales. If you acquire fewer shares than you exited, only the loss proportional to the replaced shares is disallowed. The rest is still deductible. For example, exiting 100 shares at a loss and picking up 50 shares within the window means only half of the loss is deferred. The other half is claimable. The disallowed loss also affects your taxes on investments in a broader sense: it raises your cost basis, which lowers your future taxable gain, but it does not affect your current year’s tax liability. If you never exit the replacement shares, the deferred loss carries forward until you do. Keep records of every wash sale transaction to avoid double-counting or missing the adjustment when you finally exit the position. For the most current tax thresholds and reporting rules, check the official IRS Schedule D instructions at IRS.gov.
Frequently Asked Questions
Can I avoid the wash sale rule by selling after 31 days and buying back immediately?
Yes, if you wait at least 31 days after the loss sale before buying back the same security, the rule does not apply. The 61-day window ends on day 30 after the sale, so a purchase on day 31 is outside the restricted period.
Does the wash sale rule apply if I sell at a loss in a taxable account and buy in a retirement account?
Yes, the rule applies across accounts, including IRAs and 401(k)s. If you exit at a loss in a taxable brokerage and acquire a matching security in an IRA within the 61-day window, the loss is disallowed, and the adjustment is permanently lost in the retirement account.
What happens if I sell at a loss and buy a call option but never exercise it?
Buying a call option on the same stock within the 61-day window still triggers the wash sale rule, as the option is considered a matching security. The loss is disallowed regardless of whether you exercise the option or let it expire.
How do I report stock sales on your tax return if my broker doesn’t adjust the cost basis?
You must manually adjust the cost basis on your Schedule D and Form 8949 by adding the disallowed loss to the replacement shares’ basis. Your broker will typically mark the transaction with “W” on Form 1099-B. If not, you are responsible for tracking and reporting the adjustment. Always confirm your final figures against the official IRS instructions for Form 8949 at IRS.gov.
Are crypto and digital asset sales taxed the same way as stocks for wash sales?
No, as of 2024, the wash sale rule does not apply to cryptocurrency or other digital assets. Exiting Bitcoin at a loss and buying it back the next day is allowed for tax purposes. However, this may change in future legislation, and you still must report all crypto transactions accurately. For the latest guidance on how taxes when i sell an inherited stock interact with digital-asset rules, consult the IRS digital-asset FAQ page at IRS.gov.