The wash sale rule is a U.S. tax rule that prevents you from claiming a capital loss on a security if you buy a substantially identical security within 30 days before or after the sale. If you trigger it, the loss is disallowed for the current tax year and instead adjusts the cost basis of the replacement shares. For traders who actively manage positions, this can create unexpected tax bills and complicate record-keeping.
This article explains the mechanics, walks through examples, and highlights common mistakes, but it is general information, not tax advice. Because every situation differs, consult a qualified tax professional before acting.
What the wash sale rule actually says
The rule is in Section 1091 of the Internal Revenue Code. It applies to losses on stocks, securities, and options to buy or sell them. If you sell a security at a loss and, within 30 days before or after the sale, you acquire a substantially identical security, the loss is disallowed. The 30-day window is approximately 30 calendar days, not trading days.
The disallowed loss is not gone forever. It is added to the cost basis of the replacement shares. That means when you eventually sell those replacement shares, the higher basis reduces your gain or increases your loss. In effect, the loss is deferred, not eliminated. But the deferral can push the tax benefit into a later year, which may or may not be what you want.
The rule may also apply to acquisitions in a spouse’s account and to acquisitions in an IRA or other tax-advantaged account, with some nuances. For example, if you sell shares at a loss in your taxable account and buy identical shares in your IRA within a short period, the loss may be disallowed, and the basis adjustment may not carry over to the IRA. That can potentially affect the tax benefit. This is a common trap.
How the 30-day window works in practice
The window is symmetrical. It includes the 30 days before the sale and the 30 days after.
Many brokers may report wash sales on Form 1099-B, but they may not capture all acquisitions, especially those in other accounts or IRAs. You are responsible for tracking your own wash sales across all your accounts. If you trade at multiple brokers, the risk of an unnoticed wash sale rises.

For traders who use options, the rule can apply to options on the same underlying stock if the options are substantially identical to the stock. The IRS has not provided exhaustive guidance on every options strategy, so treat this area with caution. A common mistake is assuming that options are exempt. They are not.
Examples that show the mechanics
Example 1: You buy 100 shares of XYZ at $50, but later you sell them at $40, realizing a $1,000 loss. Some days later, you buy 100 shares of XYZ at $42, so the loss may be disallowed under wash sale rules. The $1,000 loss could be added to the basis of the new shares, which would make your basis approximately $5,200 ($4,200 cost + $1,000 disallowed loss). If you later sell those shares at $55, your reported gain might be around $300 instead of $1,300, depending on applicable tax rules.
Example 2: You sell 100 shares of XYZ at a loss on June 1. You had bought 100 shares of XYZ on May 15. That purchase may be within a window before the sale, so the loss may be disallowed. The basis of the May 15 shares is adjusted upward by the disallowed loss. This can happen even if you did not plan to rebuy; the earlier purchase counts.
Example 3: You sell 100 shares of XYZ at a loss in your taxable account. Your spouse buys 100 shares of XYZ in their own account 10 days later. The loss is disallowed because the rule attributes the spouse’s purchase to you. This can be a surprise for couples who manage money separately.
Example 4: You sell 100 shares of XYZ at a loss in your taxable account, and you buy 100 shares of XYZ in your IRA 20 days later. The loss is disallowed, but the basis adjustment does not apply to the IRA. The tax benefit is lost. This is one of the most costly mistakes for long-term investors who also trade in IRAs.
Common mistakes traders make
One frequent error is rebuying too soon, because the 30-day window is easy to miscalculate, especially around weekends and holidays. So if you sell at a loss and then decide to get back in, consider waiting roughly a month from the sale date. Mark the calendar.
Another mistake is ignoring purchases in other accounts, which can happen if you have a brokerage account and an IRA at different institutions. Because some brokers do not track cross-account activity, you may not see the wash sale coming. You need to monitor all your accounts, including those of your spouse.
A third mistake is assuming the rule only applies to stocks. It applies to securities, which includes options, mutual funds, and exchange-traded funds. If you sell an ETF at a loss and buy a substantially identical ETF within a short period, the rule may apply. The key is “substantially identical,” which is not always clear. Different ETFs that track the same index may or may not be considered substantially identical. The IRS has not provided a bright-line test, so conservative treatment is wise.
A fourth mistake is forgetting about dividend reinvestment. If you sell shares at a loss and have automatic dividend reinvestment turned on, the reinvestment can count as a purchase within the window. This can trigger a wash sale unintentionally. Consider turning off reinvestment if you plan to harvest losses.
A fifth mistake is not keeping records, because if you trigger a wash sale, you need to adjust your cost basis. Your broker may or may not do this correctly, so keep your own records of the disallowed loss and the adjusted basis. If you are audited, you will need to show your work.
The investor perspective (6+ months)
For long-term investors, the wash sale rule mainly matters when you harvest losses. Tax-loss harvesting is a strategy where you sell a security at a loss to offset gains elsewhere. The wash sale rule can undo the benefit if you rebuy too soon. If you want to stay invested, you can buy a similar but not substantially identical security. For example, you might sell one broad-market ETF and buy another that tracks a different index. But you must be confident they are not substantially identical. The IRS has not defined the term precisely, so some risk exists.
Investors who hold positions for years may also encounter the rule when they sell at a loss and then buy back shares in a retirement account. As noted, that can permanently disallow the loss. If you are retired and drawing from taxable accounts, this is worth watching.
The trader perspective (weeks to ~6 months)
Active traders face the wash sale rule more often because they trade frequently. If you sell a position at a loss and then re-enter within 30 days, the loss is disallowed. That can be frustrating if you are trying to manage risk. One approach is to avoid selling at a loss in the first place, but that is not always possible. Another is to wait 31 days before rebuying, but that exposes you to price moves.
Some traders use options to manage risk without triggering the rule. But options can themselves be substantially identical to the stock, so this is not a safe harbor. A common mistake is selling a stock at a loss and buying a call option on the same stock within 30 days. That can trigger the rule. The same applies to buying a deep-in-the-money call that behaves like stock. The IRS has not issued detailed guidance, so treat options with care.
Traders also need to consider the mark-to-market election. If you qualify and make the election, you may be taxed on unrealized gains and losses, and certain rules may not apply. But the election has strict requirements and is not suitable for everyone. It requires careful planning and professional advice.
Conclusion: keep the rule in mind before you trade
The wash sale rule is a mechanical tax rule with real consequences. It can defer a loss, adjust your basis, or in some cases wipe out the tax benefit entirely. The key points are the 30-day window, the substantially identical standard, and the need to track all accounts, including IRAs and a spouse’s accounts. If you trade frequently or harvest losses, build a process to check for wash sales before you act. And remember that this article is general information, not tax advice. Your situation is unique, so consult a qualified tax professional.
- What Happens If Your Broker Fails: Investor Protection Explained
- REITs Explained: Trading Real Estate on the Stock Exchange
- Energy Leads, Tech Lags: A Narrow Market With a 4.99% Yield Problem (week of Oct 26, 2026)
Frequently Asked Questions
Does the wash sale rule apply to cryptocurrency?
The IRS treats cryptocurrency as property, not as a security, so the wash sale rule generally does not apply. However, proposed legislation and IRS guidance could change this. Check current rules or consult a tax professional.
What happens if I trigger a wash sale by accident?
The loss is disallowed for the current year and added to the cost basis of the replacement shares. You need to adjust your records. Your broker may report it, but you are responsible for accuracy.
Does the wash sale rule apply to purchases in an IRA?
Yes, purchases in an IRA can trigger the wash sale rule. The disallowed loss does not adjust the IRA basis, so the tax benefit is permanently lost. This is a common and costly mistake.
Can I avoid the wash sale rule by buying a similar but different security?
Possibly, but the key is whether the securities are substantially identical. The IRS has not defined this precisely, so there is risk. Different ETFs tracking different indexes are less likely to be considered substantially identical, but you should be cautious.
Does the wash sale rule apply to options?
Yes, options can be subject to the wash sale rule if they are substantially identical to the stock. For example, buying a call option on the same stock within 30 days of a loss sale can trigger the rule. The IRS has not provided exhaustive guidance, so treat options carefully.
AI Notice: This article was created wholly or predominantly with the assistance of artificial intelligence and was published without human editorial review.
This article is for general information only and does not constitute investment advice. Always do your own research before making trading decisions.
