Wash Sales Across RSU and ESPP Lots
Sep 13, 2026
If you're harvesting a loss on company stock, the biggest risk usually isn't the trade itself — it's a vesting or ESPP purchase date already sitting on your calendar that you didn't think to check first. This article assumes you already know the basic mechanics of tax-loss harvesting — offsetting gains, carrying losses forward — and focuses specifically on the wash-sale trap created by an equity-comp vesting schedule you don't control: when it's triggered, how an ESPP purchase counts, and what to do about it.
What is a wash sale, in plain terms?
A wash sale happens when you sell a security at a loss and, within a window that runs 30 days before the sale through 30 days after it — 61 days in total, counting the sale date itself — you acquire substantially identical stock or securities. When that happens, the loss you were counting on isn't gone, but it also isn't usable right now: the IRS disallows the loss on that sale for the current year, and instead adds the disallowed amount to the cost basis of the replacement shares you acquired. That deferral is the important part to understand before anything else in this article: a wash sale doesn't destroy the tax benefit of the loss, it just moves it into the replacement shares, where it will eventually reduce your gain, or increase your loss, whenever you sell those shares for good. The part that surprises people who don't work with equity compensation is what counts as "acquiring" substantially identical stock — it isn't limited to placing a new buy order in a brokerage account. Any way your position in the same stock increases within the window can potentially qualify, which is exactly why the next two sections matter if your compensation includes company stock rather than only cash.
How can my own vesting schedule cause a wash sale?
An RSU vest delivers shares of your employer's stock into your account without you placing an order or paying cash for them — but for wash-sale purposes, what matters is that your position in that stock increased, not how it increased. If a tranche vests within 30 days before or after you sell a different lot of the same stock at a loss, the vest counts as acquiring substantially identical stock, and the loss on your sale is disallowed under the same rule an ordinary market purchase would trigger — the disallowed amount is added to the basis of the shares that just vested. This is precisely the scenario that catches people who don't think of a vest as a "purchase" at all: you didn't choose to buy anything, your vesting schedule was set months or years ago when the grant was made, and yet it can still wash out a loss you were deliberately trying to realize this week. Because vest dates are fixed by your grant schedule rather than by you, the only lever you actually control is the timing of the loss sale itself: before selling a losing lot of employer stock, check whether any tranche is scheduled to vest in the 30 days on either side of your planned sale date, and if one is, either move the sale or accept that the loss will be deferred into the new shares rather than usable this year.
Does my ESPP purchase count as a replacement buy?
Yes — an ESPP purchase is a purchase, and unlike an RSU vest, there's no ambiguity about whether it counts: your plan uses your accumulated payroll deductions to buy shares of the same company stock on the purchase date, which is about as clear an acquisition as the wash-sale rule contemplates. If that purchase date falls within 30 days before or after you sell a losing lot of the same stock elsewhere, the loss is disallowed the same way it would be for any other replacement purchase. What makes this harder to plan around than an ordinary brokerage trade is that the purchase date isn't something you choose in the moment — it's fixed by your plan's offering and purchase period, often set many months in advance, the same way an RSU vest date is fixed by your grant schedule. That leaves you with the same lever as the vesting-schedule problem in the previous section: since you can't move the purchase date, the timing of your loss sale is what has to work around it. One more automatic purchase deserves the same caution and is easy to forget entirely: dividend reinvestment. If your employer's stock pays a dividend and you have automatic reinvestment turned on in the account holding it, each reinvestment is a small purchase of the same stock, and one landing inside the window around a loss sale can trigger a wash sale just as easily as a full ESPP purchase or vest can.
How do I harvest a loss on company stock without a wash sale?
The most reliable fix is sequencing: before selling a losing lot of company stock, check your vesting calendar and your ESPP's next purchase date, and make sure neither falls within 30 days on either side of your planned sale date. If a vest or purchase is unavoidably close, you generally have two choices — sell earlier or later to clear the window, or accept that the loss will be deferred into the new shares' basis rather than usable this year, which isn't a disaster but should be a decision you make on purpose rather than discover in the spring. If your plan lets you turn off automatic dividend reinvestment on the position you're harvesting, doing so before you sell removes one more silent trigger you'd otherwise have to track separately. The trap that's easy to miss is a purchase in a completely different account: buying substantially identical stock in your IRA, your spouse's account, or any other account you or a related party controls can trigger the same rule — and a wash sale caused by a purchase inside an IRA is worse than an ordinary one, because the disallowed loss cannot be added to the basis of shares held in the IRA the way it would be in a taxable account. In that specific case, the loss isn't deferred, it's gone permanently, which makes an IRA the one account to check most carefully before repurchasing anything you've just sold at a loss elsewhere.
What does my broker report, and what do I have to fix?
When a broker's own system detects a wash sale — a repurchase of the same security in the same account within the window — it adjusts the basis of the replacement shares and reports the disallowed amount on your Form 1099-B, usually with a specific code flagging it as a wash sale. The catch is that brokers are only required to track wash sales within one account and one specific security, while the tax law that actually applies to you covers every account you hold, including accounts at other brokers, your spouse's accounts, and even substantially identical securities that aren't a share-for-share match with what you sold. That mismatch runs in both directions: your 1099-B can under-report wash sales the law actually requires you to apply, if the replacement purchase happened at a different broker or in an ESPP or 401(k) the 1099-B-issuing broker can't see, and it can occasionally flag something your broker's software caught that you'd want to double-check against the actual dates. Either way, you're responsible for reporting your correct, complete wash-sale adjustments on your own return regardless of what any single 1099-B shows — corrections to a broker-reported wash sale, whether adding one the form missed or adjusting one it got wrong, are made on Form 8949, using the adjustment codes and columns built for exactly that purpose before the totals flow to Schedule D.
Key numbers (2026)
- Wash-sale window — 30 days before a loss sale through 30 days after it, 61 days in total including the sale date, during which acquiring substantially identical stock disallows the loss (IRS Pub 550, "Wash Sales"; IRC §1091).
- Disallowed loss treatment — the loss isn't lost permanently; it's added to the cost basis of the replacement shares that triggered the wash sale (IRS Pub 550, "Wash Sales").
- Annual capital-loss limit against ordinary income — $3,000 for most filers ($1,500 if married filing separately) per year, with any unused loss carried forward to future years indefinitely (IRS Pub 550, "Capital Losses"; IRC §1211(b)).
- Wash sale inside an IRA — a replacement purchase made inside an IRA permanently disallows the loss; it is not added to the basis of the IRA-held shares the way it would be in a taxable account (IRS Revenue Ruling 2008-5).
- Where corrections are reported — wash-sale adjustments, whether confirming or correcting what a broker's 1099-B shows, are reported on Form 8949 (Instructions for Form 8949).
Current as of 2026-09
Sources
- IRS Publication 550, Investment Income and Expenses — https://www.irs.gov/publications/p550
- Internal Revenue Code §1091 — https://www.law.cornell.edu/uscode/text/26/1091
- Internal Revenue Code §1211 — https://www.law.cornell.edu/uscode/text/26/1211
- IRS Revenue Ruling 2008-5 — https://www.irs.gov/irb/2008-03_IRB
- Instructions for Form 8949 — https://www.irs.gov/instructions/i8949
- Treasury Regulation §1.6045-1 — https://www.law.cornell.edu/cfr/text/26/1.6045-1
Sample content for demonstration purposes — not financial advice.