Insights / Individual & family tax

Selling company stock at a loss near an RSU vest or ESPP purchase: how the wash sale rule hits employees

Sell previously vested company shares at a loss, and an RSU vest, ESPP purchase or reinvested dividend within 30 days before or after can disallow the loss on that many shares. The two platforms don't talk to each other, so the 1099-B usually won't show it. The rule, how shares are matched, the new basis, an example and a date check before you sell.

Published By YCL CPA
Questions? Reach us directly

Message us on WhatsApp

Scan the code with WhatsApp, or tap the button if you are on your phone.

919-802-8376Open WhatsApp

Add us on WeChat

Scan the code with WeChat, or copy the WeChat ID and search for it in the app.

WeChat ID: YCLUSA
FacebookInstagramXRednoteWeChat Channels
Selling company stock at a loss near an RSU vest or ESPP purchase: how the wash sale rule hits employees

If an RSU vests, an ESPP purchase happens or a company-stock dividend is reinvested within 30 days before or after you sell company shares at a loss, you've acquired the same stock, and the wash sale rule disallows the loss on that many shares. The disallowed loss moves into the new shares' basis. Equity awards usually sit on a different platform from the broker where you sold, so the 1099-B often won't show it. You check the dates and make the adjustment yourself.

The rule: shares from your employer count as acquisitions

Section 1091: a loss on stock or securities is disallowed if, within 30 days before or after the sale, you acquire substantially identical stock or securities. The rule looks at acquisitions, not just purchases you place yourself.

The IRS's own example: in the wash sales section of Publication 550 (2025), an employee receives company stock as a bonus under an incentive plan and includes its fair market value in pay. The employee later sells company shares at a loss, and if another award of substantially identical stock arrives within 30 days, the loss isn't deductible. RSU vesting works the same way: you acquire the shares on the vesting date, and their value goes on your W-2.

ESPP is even simpler: an employee stock purchase plan uses your payroll deductions to buy company stock on the purchase date. That's a plain purchase.

Dividend reinvestment: reinvesting company-stock dividends is a purchase too.

Why it's easy to miss

Two platforms: many people hold older shares at Schwab, Fidelity or Robinhood while RSUs and ESPP shares land on the employer's plan platform, such as E*Trade, Morgan Stanley at Work or a Fidelity NetBenefits stock plan account. The sale happens on one platform and the vest on another, and neither 1099-B connects them.

You don't pick vesting dates: RSUs vest quarterly or monthly, and ESPP purchases often happen every six months. Year-end loss harvesting tends to run right into November and December vesting and purchase dates.

The 30 days before count too: an RSU vest on November 20 followed by a loss sale of older shares on December 5 is still a wash sale.

Example: an RSU vest two weeks after a loss sale

Example (hypothetical numbers, to show the method): Ms. Wang had 100 shares vest on November 20, 2025, at $150 a share, for a $15,000 basis. On November 5, 2026, she sold all 100 at $120 a share, receiving $12,000, a $3,000 loss, or $30 a share. On November 20, 2026, another 50 RSUs vested at $125 a share, adding $6,250 to her W-2.

How much is disallowed: she acquired 50 shares in the window, fewer than the 100 she sold, so only the loss on 50 shares is disallowed: 50 × $30 = $1,500. The loss on the other 50 shares, $1,500, is deductible. When fewer shares are acquired than sold, Treas. Reg. §1.1091-1(c) matches the acquired shares, in order of acquisition, with an equal number of the shares sold.

New basis: the 50 newly vested shares have a basis of $6,250 plus $1,500, or $7,750, and their holding period includes the old shares' 350 days.

Form 8949: Part I (short-term) shows proceeds $12,000, basis $15,000, W in column (f), 1,500 in column (g) and a loss of (1,500) in column (h).

Shares withheld for taxes: employers often withhold or sell part of the vest to cover taxes (sell-to-cover or net share settlement), so fewer shares land in your account. Matching uses the shares you actually acquired, so check the vesting detail.

RSU basis is often wrong to begin with

Fix basis first, then apply the wash sale rule: the RSU's value at vesting was taxed on your W-2, and that's your basis. Many platforms report RSU basis on the 1099-B as $0 or leave it blank, and copying that taxes the same income twice. Correct the basis to the vesting-date value on Form 8949 (code B), then make the wash sale adjustment.

ESPP basis: the purchase price plus any discount included in wages when you sell. Qualifying and disqualifying dispositions are figured differently; use Form 3922 and your W-2.

Before selling company stock at a loss, check three things

The past 30 days: any RSU vest, ESPP purchase, reinvested dividend or purchase you made yourself.

The next 30 days: any scheduled vesting date, purchase date or dividend payment. RSU vesting dates are in your award agreement; ESPP purchase dates are in the plan documents.

Your spouse and IRAs: a spouse who works at the same company or buys the same stock counts too, and buying company stock in an IRA makes the disallowed loss permanent.

Which lot you sell: with several lots, identify the lot at the time of sale. Selling the highest-basis lot or a lot held more than a year gives different results.

If you'd rather not have the loss disallowed: where timing allows, the sale would need to be more than 30 days before the next vest or purchase and more than 30 days after the last one; some ESPPs let you change contributions before an offering period. Those choices depend on your whole situation, and we don't give investment advice on whether or when to sell.

When the disallowed loss comes back

When you sell the newly vested lot: its basis already includes the disallowed loss, so the loss shows up then. If another vest lands within 30 days of that sale, it can be deferred again. Employees with quarterly vesting need to check the dates every time.

It isn't lost (except through an IRA): as long as the replacement shares aren't bought in an IRA, the deferred loss eventually comes back.

For equity compensation basis, AMT and investment tax generally, see our guide to how investments are taxed. For the full wash sale rule, including the 61-day window, other brokers and spouses, options, crypto and the trader election, see our wash sale guide. To reconcile RSUs, ESPP and your broker's 1099-B together, book a free 15-minute call or add WeChat YCLUSA. YCL CPA doesn't recommend buying or selling any stock; we get the tax right and the forms filed, and results depend on your facts and the tax rules.

Questions this article answers

Is it a wash sale if my RSUs vest two weeks after I sell company stock at a loss?

Yes. The rule looks at whether you acquired the same stock within 30 days before or after the loss sale, and RSU shares acquired at vesting count; IRS Publication 550 uses an employee stock award example. If fewer shares vest than you sold, only the loss on the vested number of shares is disallowed.

My ESPP purchase was 20 days before my loss sale. Does that count?

Yes. The window runs 30 days before and after the sale, so an ESPP purchase 20 days earlier is inside it. The loss on that many shares is disallowed and added to the basis of the ESPP shares.

Which shares get the disallowed loss?

The newly acquired shares that caused the wash sale, such as the RSUs that vested or the ESPP shares bought, and their holding period includes the old shares'. The loss shows up when you sell those shares in a sale that doesn't trigger another wash sale.

My 1099-B shows no wash sale adjustment. Can I ignore it?

No. RSUs and ESPP shares usually sit on a different platform, so the broker where you sold doesn't see the vest or purchase and the 1099-B won't show it. The loss is still disallowed: enter code W and the amount on Form 8949, and use code B to fix basis when you sell the new shares.

Ready to talk? The first 15 minutes are on us.

Book online, or send us a few details and we will come back with a written quote within one business day.

Book a callQuick quote