Losing Money Is Hard Enough: Don't Let the Wash Sale Rule Make It Worse
For investors who experienced losses in a volatile market year, the silver lining is straightforward: those losses can offset capital gains, reducing the tax bill come April. It is a strategy known as tax-loss harvesting, and it is entirely legitimate when executed correctly. The problem is that one of the most widely misunderstood provisions in the tax code — the wash sale rule — can quietly eliminate that benefit while the investor remains completely unaware.
The IRS does not allow taxpayers to sell a security at a loss and then immediately repurchase a substantially identical security, effectively reclaiming the position while booking the tax deduction. The wash sale rule under IRC Section 1091 disallows the loss if the investor buys a "substantially identical" security within 30 days before or after the sale. That is a 61-day window in total, and it applies in directions most people do not anticipate.
How the Trap Is Set Before You Even Know It
The most intuitive version of the wash sale violation is simple: sell shares of Company X at a loss on Monday, rebuy those same shares on Friday. Loss disallowed. But the rule's reach extends well beyond this obvious scenario, and the traps that catch investors most frequently are far more subtle.
Dividend reinvestment plans (DRIPs) are among the most common culprits. Many brokerage accounts are configured by default to automatically reinvest dividends. If an investor sells shares of a mutual fund or stock at a loss, but that same account continues to receive and reinvest dividends from the same holding within the 30-day window, a wash sale has occurred — even though the investor took no deliberate action to repurchase. The reinvested dividend, however small, constitutes a purchase of a substantially identical security.
Spousal accounts present another underappreciated exposure. The wash sale rule applies not only to the individual taxpayer's accounts but also to transactions made by a spouse or a corporation the taxpayer controls. If one spouse sells shares at a loss in their individual brokerage account, and the other spouse purchases the same shares in their own account within the prohibited window, the loss is disallowed. Married couples who manage separate investment accounts without coordinating their trades routinely fall into this category.
Multiple accounts across platforms create similar coordination problems. An investor might sell shares of an index fund at a loss in a taxable account, then unknowingly purchase a substantially identical fund inside their IRA or 401(k) through routine contributions or rebalancing. The IRS does not limit wash sale analysis to a single account.
What "Substantially Identical" Actually Means
The phrase "substantially identical" is central to the rule, and it is deliberately imprecise. The IRS has not provided a comprehensive definition, which creates both ambiguity and planning opportunity.
Shares of the same company are clearly substantially identical. Options or futures contracts tied to the same underlying stock generally qualify as well. Where it becomes less clear is in the realm of mutual funds and exchange-traded funds. Two funds tracking the same index — say, two S&P 500 index funds from different fund families — may or may not be considered substantially identical, depending on how closely their holdings and construction mirror one another. Two funds tracking different but correlated indices, such as the S&P 500 and the total U.S. stock market, are generally not considered substantially identical, though no definitive IRS ruling resolves every case.
This ambiguity is where strategic planning becomes possible.
Navigating the Rule Without Abandoning the Strategy
The goal of tax-loss harvesting is to capture the tax value of a loss while maintaining meaningful market exposure. The wash sale rule does not prohibit this — it simply requires that investors exercise some discipline in how they execute it.
Wait out the 30-day window. The most straightforward approach is to sell the losing position, hold the proceeds in cash or an unrelated security, and wait 31 days before repurchasing the original holding. The risk, of course, is market movement during that window. For investors with a long time horizon and a diversified portfolio, this risk is often manageable.
Substitute a similar but not substantially identical security. Rather than sitting in cash, an investor who sells an S&P 500 ETF at a loss can immediately purchase an ETF tracking the total U.S. stock market or a different large-cap index. This preserves equity exposure while avoiding a substantially identical repurchase. After the 31-day window closes, the investor can return to the original holding if desired. The key is selecting a replacement that offers comparable economic exposure without crossing the substantially identical threshold.
Disable automatic dividend reinvestment before harvesting. Before executing a tax-loss sale, investors should review all dividend reinvestment settings across every account holding the same or related securities. Disabling DRIP for the relevant holding during the 61-day window eliminates one of the most common inadvertent violations.
Coordinate with a spouse. Couples who manage separate accounts should communicate clearly before executing any tax-loss harvest. A simple shared calendar entry noting the restricted window for each harvested security can prevent an unintended spousal purchase from nullifying the deduction.
Consider asset classes not subject to wash sale rules. Cryptocurrency, as of current law, is not classified as a security under the tax code, which means the wash sale rule does not apply to crypto transactions. An investor can sell Bitcoin at a loss and repurchase it the same day without triggering a wash sale disallowance. This distinction has drawn legislative attention, and proposals to extend wash sale treatment to digital assets have circulated in Congress. However, as of 2025, the exemption remains intact. Investors with crypto exposure may find this an unusually clean loss-harvesting vehicle compared to traditional securities.
What Happens When the Rule Is Violated
A wash sale does not mean the loss is gone permanently — it is deferred. The disallowed loss is added to the cost basis of the repurchased security, effectively preserving it for a future sale. This is an important distinction. If an investor sells the replacement position later without triggering another wash sale, the full economic loss will eventually be recognized.
However, deferral carries its own costs. The tax benefit is postponed, often into a year where the investor's marginal rate may be different. The administrative complexity of tracking adjusted basis across multiple lots and accounts increases. And if the position is held inside a tax-deferred account such as an IRA when the replacement shares are eventually sold, the deferred loss may be permanently lost rather than merely postponed.
A Rule Worth Understanding Before the Year Ends
Tax-loss harvesting is most effective when it is planned rather than reactive. Investors who review their portfolios in the fourth quarter — identifying positions with unrealized losses, checking for wash sale exposure across all accounts, and coordinating with a spouse or advisor before executing trades — are far more likely to capture the full benefit the strategy offers.
The wash sale rule is not designed to prevent legitimate tax planning. It is designed to prevent the artificial manufacturing of losses through immediate repurchase. Investors who respect the spirit of the rule while applying its letter thoughtfully can still derive meaningful tax savings from positions that have underperformed. The key is knowing where the traps are before stepping into them.