The short version

A wash sale happens when you sell stock at a loss and acquire substantially identical stock within 30 days before or after the sale. RSU vests, ESPP purchases, option exercises and dividend reinvestments all count as acquisitions. So do purchases by your spouse and purchases inside your IRA.

A washed loss is usually deferred, not lost: it gets added to the basis of the replacement shares. The exception is an IRA purchase, which can wipe out the loss permanently. Brokers only flag wash sales inside a single account, so if your loss sale and your vest happen in different accounts, you have to find and report the adjustment yourself.

What counts as a wash sale

A wash sale is a sale of stock at a loss where you also acquire substantially identical stock within 30 days before or 30 days after the sale. Counting the sale date, that is a 61-day window. If an acquisition lands anywhere inside it, the loss is disallowed to the extent of the shares acquired.

A few points that matter for equity comp:

  • It only applies to losses. Selling at a gain and acquiring new shares the next day has no wash sale consequence.
  • Your employer's stock is identical to itself. Shares from an RSU vest, an ESPP purchase, and an open-market buy of the same class of stock are all substantially identical. There is no argument that "plan shares" are different.
  • The window looks backward too. An acquisition up to 30 days before the loss sale counts, not just purchases after it.
  • It is not about intent. You do not have to be trying to game anything. An automatic vest you never think about triggers the rule just the same.

Losses on company stock usually come from shares that dropped after they vested. With the correct basis, which is often not what your 1099-B shows (see why your 1099-B shows zero basis), a sale below the vesting price is a real capital loss. That loss is exactly what a wash sale can take away.

RSU vests, ESPP purchases and other acquisitions that count

Any way you come to own new shares of company stock counts as an acquisition for the wash sale rule, not just a trade you place yourself. For people with equity comp, the usual sources are:

  • RSU vests. On the vest date, shares are delivered to you. That is generally treated as acquiring stock, even though you paid nothing and the value went on your W-2. Most tech employees vest quarterly or monthly, so the windows add up fast.
  • ESPP purchases. The purchase date at the end of each offering period is an acquisition. Payroll contributions leading up to it are not purchases, but the purchase itself is. More on how ESPP shares are taxed in my ESPP guide.
  • Option exercises. Exercising an NSO or ISO acquires shares on the exercise date.
  • Dividend reinvestment. If dividends on company stock are set to reinvest automatically, each reinvestment buys a small number of shares. It only washes a matching number of shares, but it creates adjustments that are easy to miss.

The rule also reaches acquisitions by your spouse and purchases in your IRA or Roth IRA. I cover both below, because they are where the most expensive mistakes happen.

What happens to the disallowed loss: a worked example

A disallowed loss is usually deferred, not lost. The washed amount is added to the basis of the replacement shares, and the holding period of the shares you sold carries over to the replacement shares. You get the loss back when you eventually sell the replacement shares, unless that sale is washed too.

If you acquire fewer shares than you sold, only a proportional part of the loss is disallowed. Here is a simplified example with round numbers.

Say you hold 200 shares from an earlier vest with a correct basis of $100 per share. On November 10 the stock is at $70, and you sell all 200 for a $6,000 loss. On November 20, 100 RSUs vest at $72, so $7,200 goes on your W-2. To keep it simple, assume taxes were covered in cash and all 100 shares land in your account.

Step Amount
Loss on 200 shares sold Nov 10 $6,000
Replacement shares from Nov 20 vest 100 of 200
Loss disallowed (half) $3,000
Loss allowed this year $3,000
Basis of vested shares: $7,200 + $3,000 $10,200
Later sale of the 100 shares at $80: $8,000 − $10,200 $2,200 loss

Without the wash sale, you would have had a $6,000 loss now and an $800 gain later, a net $5,200 loss. With it, you have a $3,000 loss now and a $2,200 loss later. Same $5,200 total, different timing. Because the holding period tacks, the later sale may also be long-term sooner than you would expect from the vest date alone.

Timing still matters. A deferred loss cannot offset this year's gains, and if the replacement shares are held for years, the benefit waits with them. If you are counting on a loss to offset a large gain this year, a wash sale can leave you with a bigger bill than planned. For how capital losses offset gains and ordinary income, see when equity loses value.

Why your 1099-B misses it, and how to report it

Your 1099-B often misses equity comp wash sales because brokers are only required to report them when the loss sale and the replacement purchase happen in the same account and involve the identical security (same CUSIP). Anything across accounts is on you.

That is a real gap for most tech employees. RSUs and ESPP shares typically land in a stock plan account at one broker. Many people move shares to a personal brokerage account elsewhere, and a spouse may hold company stock in yet another account. A loss sale in the personal account and a vest in the plan account will not be matched by either broker. Even two accounts at the same firm may not be linked.

When the broker does catch it, the disallowed amount shows in box 1g of the 1099-B. When it does not, you report the adjustment on Form 8949: enter code W in column (f) and the disallowed loss as a positive number in column (g). Then add the same amount to the basis of the replacement shares in your own records, because the broker will not know to do it.

IRA and Roth purchases. If you sell company stock at a loss in a taxable account and buy it within the window in your IRA or Roth IRA, the IRS position in Rev. Rul. 2008-5 is that the loss is disallowed and the IRA shares do not get the basis increase. That loss is gone permanently, not deferred.

Spouse purchases. IRS guidance treats a purchase by your spouse as your own for wash sale purposes. If your spouse works at the same company and has an ESPP purchase or vest inside your window, it can wash your loss, and neither broker will report it.

How to plan around the window

The practical way to avoid a surprise wash sale is to map every upcoming acquisition of company stock before you sell a lot at a loss. That calendar, not the loss itself, decides whether the loss counts this year.

  • List the dates. Vest dates, ESPP purchase dates, planned option exercises, and dividend reinvestment dates, for you and your spouse, across every account including IRAs. A loss sale more than 30 days from all of them is clean.
  • Look for gaps. With quarterly vesting, there is often a stretch between vests that is wide enough. Monthly vesting rarely leaves a clean window, which makes some washing hard to avoid.
  • Know which lots you are selling. Using specific lot identification, you can see which lots carry a loss and which do not. Recently vested shares usually have a basis close to the current price, so selling them tends to produce little gain or loss. Also, if the replacement shares are themselves sold later in a clean window, the deferred loss generally comes back at that point.
  • Check dividend reinvestment settings. Automatic reinvestment on company stock creates small acquisitions you may not track.
  • Watch December. Loss sales in late December can be washed by acquisitions in January, and the adjustment still applies to the year of the sale. My year-end tax checklist covers the timing.

To be clear about my role: whether to sell, hold, or reduce a concentrated position is an investment decision that belongs with you and your financial advisor. What I help with is the tax consequence of the timing you choose. If you are working through a larger plan to reduce company stock, concentrated stock diversification covers the tax side of that.

Where this trips people up

Assuming the 1099-B caught it

Box 1g only reflects wash sales the broker could see inside one account. A clean-looking 1099-B does not mean there was no wash sale.

Forgetting the vest 30 days before

People check the next vest date and forget the window looks backward. A vest three weeks before your loss sale counts just as much as one three weeks after.

Buying company stock in an IRA

A purchase in your IRA or Roth inside the window can make the loss disappear for good. This is the one wash sale that is not just a timing difference.

Ignoring your spouse's equity

Couples at the same company are common in the Bay Area. Their vests and ESPP purchases count against your losses, and no broker will link the two.

Not carrying the basis forward

If you self-report a wash sale but do not add the disallowed loss to the replacement shares, you lose the deferred loss when those shares are sold. Keep your own record, because the broker's basis will be wrong.

Wash sale questions people ask

Can an RSU vest trigger a wash sale?

Yes. When RSUs vest, you acquire shares. If you sold the same company stock at a loss within 30 days before or after the vest date, the vest is generally treated as a replacement purchase and some or all of that loss is disallowed.

Does my ESPP purchase cause a wash sale?

It can. An ESPP purchase is an acquisition of company stock on the purchase date. If you sold company shares at a loss within 30 days before or after that date, the purchase can wash out the loss, in proportion to the number of shares bought.

What happens to a disallowed loss?

In most cases it is deferred, not lost. The disallowed amount is added to the basis of the replacement shares, and their holding period includes the holding period of the shares you sold. You get the benefit when you sell the replacement shares, unless that sale is washed too.

Why didn't my 1099-B show the wash sale?

Brokers only have to report wash sales when the loss sale and the purchase happen in the same account and involve the identical security. A vest in your stock plan account, a purchase at another broker, or your spouse's trade will not show up, so you have to identify and report it yourself on Form 8949 with code W.

Do purchases in my IRA or my spouse's account count?

Yes. The IRS treats a spouse's purchase as yours for wash sale purposes. A purchase in your IRA or Roth IRA also counts, and under Rev. Rul. 2008-5 the disallowed loss is not added to the IRA shares' basis, so it is effectively lost for good.

How do I avoid wash sales with company stock?

Map every date you will acquire company stock, including vests, ESPP purchases, option exercises and dividend reinvestments, before you sell a lot at a loss. A loss sale that falls more than 30 days from every acquisition, in every account you and your spouse control, avoids the rule.

Keep reading

Sold company stock at a loss this year?

Matching loss sales against vests, ESPP purchases and every account in the household is tedious, and it is routine work for me. If you want a second set of eyes before you file, or before you sell, here is how to start a conversation.

Become a Client
Andrew Sedlacek, CPA

Andrew Sedlacek, CPA

Founder, OGCPA

Andrew is a Certified Public Accountant and the founder of OGCPA. He built his tax career at a local Bend firm and on Deloitte's tax team before founding the firm in 2019, and began professionally as a licensed financial advisor. He focuses on equity compensation, liquidity events, and the tax side of charitable giving and wealth distribution, and serves as the tax subject-matter expert for a venture-backed AI company. He works with clients across Bend, Oregon and the San Francisco Bay Area.

This article is general information, not tax or legal advice for your specific situation. Tax outcomes depend on your individual facts, and the rules change over time. Talk to a qualified professional (I am happy to be that person) before acting on anything here. Reading this page does not create a client relationship.