You sold a concentrated position. Maybe it was a single stock that had grown to dominate your portfolio, maybe it was shares from an ESPP or a vested RSU grant you finally decided to trim. You booked a loss on part of the sale, and you are ready to put that cash back to work. Before you do, there is a rule that trips up more people than you would expect: the wash sale rule.
It is not exotic. It is not new. But the mechanics are easy to misjudge, especially when the replacement purchase happens automatically through a dividend reinvestment plan or a fresh ESPP purchase window rather than a deliberate trade. Here is what the rule actually says, where it tends to catch people off guard, and what to bring to your tax advisor before you reinvest.
What the Wash Sale Rule Actually Prohibits
Photo by Hanna Pad on Pexels
The wash sale rule disallows a capital loss deduction if you buy a "substantially identical" security within 30 days before or after the sale that generated the loss. The disallowed loss does not disappear. It gets added to the cost basis of the replacement shares, which pushes the tax consequence into the future rather than eliminating it.
The rule exists to stop a specific maneuver: selling a losing position purely to harvest the tax loss while never actually leaving the position economically. Congress and the IRS decided that if you are back in the same security within a month, you have not really changed your exposure, so the loss should not count yet.
The 61-Day Window Most People Don't Realize Exists
The "30 days" framing understates the real exposure. The wash sale window runs 30 days before the sale, the day of the sale itself, and 30 days after, for a total span of 61 days where a purchase can trigger the rule. Reinvesting proceeds from a sale a few weeks earlier, without realizing a purchase inside that earlier window already exists, is one of the more common ways people get caught by surprise at tax time.
This matters most for anyone whose reinvestment plan involves scheduled or automatic purchases. A dividend reinvestment plan that buys shares on a fixed monthly date, or a payroll-deducted ESPP purchase that lands mid-quarter, does not pause itself just because you happen to be tax-loss harvesting elsewhere in the account.
What Counts as "Substantially Identical" and What Doesn't
The IRS has never published a precise, mechanical test for "substantially identical," which is part of what makes this area worth reviewing with a tax advisor rather than guessing. Buying back the exact same stock is clearly a wash sale. Buying a broad market index fund after selling an individual stock generally is not, because the securities are not considered the same investment.
The gray area sits in between: sector funds, single-stock options, and securities that track the same underlying company through a different instrument. According to IRS Publication 550, which covers investment income and expenses in detail, the analysis depends on the specific facts, not a fixed list. That ambiguity is exactly why this is a topic to bring to your advisor rather than resolve with a quick search.
Retirement Account Repurchases Are a Common Trap
Photo by Polina Tankilevitch on Pexels
Here is a trap that surprises even attentive investors: buying the same or a substantially identical security inside your IRA or 401(k) within the wash sale window can disallow a loss realized in your taxable account, even though the retirement account itself is tax-deferred. The IRS treats the accounts as connected for this purpose, and unlike a wash sale inside a single taxable account, a loss disallowed because of an IRA repurchase is permanently lost. It does not get added back to the basis of shares inside the IRA, because IRA basis generally is not tracked that way.
This is one of the clearest reasons to review your full household picture, including retirement accounts, before assuming a harvested loss will actually reduce this year's tax bill.
ESPP and RSU Purchases Can Trigger the Rule Without You Trading
This is the scenario that catches people who never think of themselves as "trading" at all. If you sold shares to harvest a loss, and your employer's ESPP has a purchase date inside the following 30 days, or a batch of RSUs vests and settles into your account during that window, the IRS treats that as a purchase for wash sale purposes even though you did not place an order or make an active decision.
ESPPs are a particularly easy way to trip this rule because the purchase price is typically set by a formula tied to a lookback period, and the purchase itself happens automatically on a fixed schedule regardless of what else you are doing in your taxable brokerage account that month. If you are harvesting a loss on employer stock, or on a position correlated with it, the purchase calendar for your equity compensation plan is worth checking before you assume the loss will hold.
Vesting is a little different from a purchase in the traditional sense, but the practical effect for wash sale purposes is often the same: shares landing in your account inside the 61-day window, regardless of whether you actively chose the timing. This is one of the clearer cases where the rule was not really designed with equity compensation in mind, but it still applies, and the IRS has not carved out an exception for it.
Spousal and Related-Party Purchases Count Too
The wash sale rule does not stop at your own accounts. A purchase by your spouse, or by a corporation or trust you control, inside the same 61-day window can trigger the disallowance rule as if you had made the purchase yourself. Couples who split investment management between two brokerage relationships, or who each have their own advisor, sometimes discover this only after the fact, when neither side knew the other had made a related trade.
If you and your spouse manage separate accounts, this is a specific topic to raise directly: does either of you have a scheduled purchase, reinvestment plan, or options position that could overlap with a loss the other is trying to harvest.
How This Interacts With a Broader Tax-Loss Harvesting Plan
Photo by Leeloo The First on Pexels
Tax-loss harvesting is often framed as a simple move: sell the loser, buy something similar to maintain market exposure, claim the loss. The wash sale rule is the reason that second step, buying something similar, has to be handled carefully. A common approach advisors discuss is swapping into a fund that tracks a related but distinct index rather than the same security, so the portfolio's exposure stays close to intact without triggering the rule.
The right approach depends on what you are trying to accomplish with the proceeds, how much of the loss you are trying to preserve this tax year, and how the rest of your portfolio is positioned. This is a genuinely advisor-dependent decision, not a one-size-fits-all formula, and it is worth reviewing as part of a tax-efficient reinvestment advisor conversation rather than working it out alone under a year-end deadline.
What Your 1099-B Will (and Won't) Tell You
Brokers are required to track and report certain wash sales on Form 1099-B, flagging the disallowed portion of a loss and adjusting the reported basis accordingly. But broker reporting has real limits. It generally only tracks wash sales within the same account at the same broker, using identical CUSIP numbers. It will not catch a related purchase in a different account, at a different broker, in a spouse's account, or in a substantially identical security that trades under a different ticker.
That means the 1099-B you receive may understate your actual wash sale exposure if your investments are spread across multiple institutions, which is common for people who have accumulated employer stock, an outside brokerage account, and retirement accounts with different custodians over time.
Questions Worth Bringing to Your Tax Advisor Before You Reinvest
A few questions are worth raising before you execute a reinvestment plan tied to a recent loss sale:
- Does any account in the household, including retirement accounts, have a scheduled or automatic purchase that could fall inside the 61-day window?
- Is the replacement investment being considered similar enough to the sold position that it could be treated as substantially identical?
- If part of the loss gets disallowed, how does that change the basis of the replacement shares, and when would that adjustment actually help?
- Are there other pending trades, in this account or elsewhere, that could interact with the timing of this sale?
These are the kinds of factors a coordinated review with a tax advisor and a financial advisor can walk through together, since the tax mechanics and the portfolio strategy are genuinely intertwined here.
Getting a Second Set of Eyes on the Timing
None of this means tax-loss harvesting is not worth doing. It routinely is. But the mechanics reward careful sequencing, and the penalty for getting the timing wrong is not a fine, it is simply a tax benefit you thought you had that quietly does not show up when you file. Reviewing your full account picture, including retirement and spousal accounts, before you place the replacement trade is the difference between a clean harvest and a disallowed one you discover next April.
If you are not sure whether your current advisor relationship covers this level of coordination, questions to ask an advisor is a useful starting point, and organizations like the Financial Industry Regulatory Authority and the Securities and Exchange Commission's investor education site both publish plain-language explanations of how loss timing rules interact with everyday reinvestment decisions.
Where to Go From Here
Reinvesting after a concentrated stock sale involves more moving pieces than most people expect: timing, account coordination, and a rule that spans household accounts rather than stopping at the account you sold from. A tax advisor who understands your full picture, paired with a financial advisor who understands how the reinvestment fits your broader plan, is the combination most people actually need here. Groups like the American Institute of CPAs maintain directories and educational resources if you are starting that search from scratch, and confirming credentials through advisor verification is worth doing regardless of how you found the name.
If you want help finding an advisor who can walk through this kind of timing question with you directly, you can start a match through Capivise and be connected with a vetted professional who works on exactly these situations.
