Key takeaways
- The rule disallows a loss if you buy the same or a substantially identical security within 30 days before or after the sale, a 61-day window.
- It applies across all of your accounts, your spouse's accounts, and IRAs; a loss washed by an IRA purchase is lost permanently.
- A disallowed loss is added to the basis of the replacement shares, so it is usually deferred rather than lost, except in the IRA case.
- Two funds tracking different indexes are not substantially identical; the same fund at a different custodian is.
The wash sale rule exists to stop one specific maneuver: selling a stock to claim the loss and immediately buying it back, so nothing has really changed except the tax return. The rule is old, its edges are partly undefined, and it quietly disallows losses in accounts where nobody was trying to game anything. This is what it actually says and how to work within it.
The rule
If you sell a security at a loss and, within 30 days before or after the sale, buy the same security or one that's "substantially identical," the loss is disallowed for the year. The window is 61 days in total: 30 days before, the day of, and 30 days after.
In most cases the disallowed loss isn't gone. It gets added to the cost basis of the replacement shares, and the holding period of the old shares carries over. When the replacement shares are eventually sold, the larger basis produces a smaller gain or a larger loss. So the rule defers the loss rather than killing it. With one big exception, below.
What triggers it
Buying the same security in any of your accounts. The rule applies across every account you own, not just the one where the sale happened.
Buying it in your spouse's account. The IRS treats spouses as one for this purpose.
Buying it in an IRA or 401(k). This is the expensive case. If you sell a fund at a loss in your brokerage account and your IRA buys the same fund inside the window, the loss is disallowed, and because the replacement sits in a tax-deferred account, the basis adjustment is worthless. The loss is permanently gone. Automatic dividend reinvestment and automatic contributions in retirement accounts are the usual culprits.
Dividend reinvestment. A reinvested dividend in the same fund within the window is a purchase, and it washes a proportional slice of the loss. Turning off automatic reinvestment in taxable accounts holding funds you might harvest is basic hygiene.
Buying a call option on the stock, or selling a deep in-the-money put, within the window.
Buying it before the sale. The 30 days before count too. Buy additional shares on the 1st and sell the original lot at a loss on the 15th, and the loss is washed on the number of shares you bought.
What "substantially identical" means
The statute doesn't define it, and the IRS has offered little guidance beyond the obvious cases. The generally accepted lines:
- The same stock, or the same mutual fund or ETF, is identical regardless of custodian or share class in most cases.
- Two funds that track the same index from different providers (two S&P 500 funds) are widely treated as substantially identical, though the IRS has never ruled on it directly. Cautious practitioners avoid the pair.
- Two funds that track different indexes, even similar ones (an S&P 500 fund and a total U.S. market fund; a Russell 1000 Value fund and an S&P 500 Value fund), are generally treated as not substantially identical. Every practical harvesting program rests on this.
- Stock in one company and stock in a different company in the same industry aren't substantially identical.
- Bonds of the same issuer with materially different maturities or coupons aren't.
- Stock and a convertible bond of the same company may be.
Harvesting around it
The standard method is a paired replacement. For every fund in the taxable portfolio, you pre-select an alternative that tracks a different index, has similar exposure and cost, and can be held indefinitely. When the original is sold at a loss, the replacement is bought the same day. The portfolio's allocation never changes, the loss is realized, and after 31 days the original can be bought back if you want, or you just keep the replacement.
The checks before any harvesting trade:
- No purchases of the security in any account, including spousal and retirement accounts, in the prior 30 days.
- Dividend reinvestment off, or the ex-dividend date outside the window.
- Automatic contributions in retirement accounts directed away from the security for the following 30 days.
- The replacement isn't substantially identical to the sold position.
- The loss is big enough to justify the trade.
The fuller picture of when harvesting helps and when it doesn't is in our guide to tax-loss harvesting.
Reporting
Brokers are required to track wash sales within a single account and report them on Form 1099-B with the disallowed amount and adjusted basis. They don't track across accounts, across custodians, or into IRAs. That part is on you, and it's where the errors happen. Whoever prepares your return needs a list of any cross-account purchases within the windows.
What the rule doesn't cover
The wash sale rule applies only to losses. Selling a position at a gain and buying it right back is allowed, and it's the mechanism for harvesting gains at 0% in low-income years; see the capital gains brackets. As of this writing the rule also doesn't apply to cryptocurrency held directly, which is treated as property rather than a security, though proposals to change that keep resurfacing in Congress.
How we manage it
We keep a replacement pair for every holding in taxable portfolios, leave dividend reinvestment off in taxable accounts, hold retirement accounts in different funds from the taxable holdings where practical, and check every account in the household before a harvesting trade. It's a small piece of tax planning that prevents a common, avoidable loss of a loss.
Frequently asked questions
Does the rule apply if I sell in my IRA?
No, because there's no deductible loss inside an IRA to disallow. The rule matters when an IRA purchase washes a loss taken in a taxable account.
What if I sell everything and stay in cash for 31 days?
That sidesteps the rule entirely but leaves you out of the market for a month, which can cost more than the tax benefit. The replacement-fund method keeps you invested.
Can I sell a fund and buy an ETF version of the same fund?
Mutual fund and ETF share classes of the same fund from the same provider are the same security. An ETF from a different provider tracking a different index is a valid replacement.
Does the rule apply to my kids' custodial accounts?
The IRS position covers the taxpayer and spouse. Accounts of children and entities the taxpayer controls are a gray area. The conservative approach is to avoid purchases there during the window too.
This article is general education, not individualized advice, and it is not tax, legal, or accounting advice. Figures reflect federal law for the year stated and can change. Valerio Wealth Management does not prepare or file tax returns. Speak with a qualified professional about your own situation before acting.
In this article
Want this applied to your own numbers? A 30-minute introductory call is the first step.
See if you’re a fit