Back to Articles

How to Avoid Wash Sales with RSUs: The 30-Day Rule Explained

taxesstocks

Last updated: February 3, 2026

Imagine selling your company stock to claim a $5,000 loss on your taxes—only to discover that your upcoming RSU vest completely wiped out that deduction. This happens to tech workers every year, and it's entirely preventable.

If you hold company stock and receive RSUs, you need to understand wash sale rules. One wrong move can cost you thousands in lost tax deductions. This is especially critical if you're doing tax loss harvesting to offset capital gains.

⚠️ Check for Wash Sales: Use our free Wash Sale Calculator to detect wash sales in your trades and see exactly how RSU vesting affects your cost basis. Enter your trades and vesting dates to avoid costly mistakes.

If you want a complete plan that covers vesting, sale timing, and tax surprises, read RSU Vesting and Sale Planning.

What Is a Wash Sale?

A wash sale happens when you sell a stock at a loss and then buy the same or "substantially identical" stock within 30 days before or after the sale. When this occurs, the IRS disallows your loss deduction for tax purposes.

Here's the critical RSU connection: RSU vesting counts as a purchase. The IRS treats it exactly like buying shares with cash.

Real Example: John's $5,000 Mistake

John, a software engineer at a Big Tech company, owns 100 shares he purchased for $200 each ($20,000 total). The stock dropped to $100 per share, so John decides to sell all 100 shares to harvest the loss:

  • Sale proceeds: 100 shares × $100 = $10,000
  • Capital loss: $10,000 - $20,000 = $10,000 loss

John plans to use this loss to offset other capital gains. Perfect strategy, right?

But here's the problem: John's next RSU vest happens in 20 days. When those RSUs vest, the IRS considers it a "purchase" of company stock within the 30-day wash sale window.

Result: The entire $10,000 loss is disallowed. Instead of reducing his tax bill, the loss gets added to the cost basis of his newly vested RSUs. John just lost the ability to deduct $10,000 in losses (which could have saved him $3,000+ in taxes, depending on his bracket).

Why Wash Sales Matter for Your Tax Bill

Capital losses are valuable for reducing your taxes:

How capital losses work:

  • Short-term losses: Offset short-term capital gains (taxed at ordinary income rates up to 37%)
  • Long-term losses: Offset long-term capital gains (taxed at 0%, 15%, or 20%)
  • Excess losses: If you have more losses than gains, you can deduct up to $3,000 per year from ordinary income ($1,500 if married filing separately)
  • Carryforward: Unused losses carry forward indefinitely to future years

What a wash sale does: It disallows the loss deduction entirely. Instead, the IRS adds the disallowed loss to the cost basis of the replacement shares. You don't lose the loss forever—it's deferred until you eventually sell those shares. But you lose the immediate tax benefit.

Understanding the Cost Basis Adjustment

Let's break down what happens to John's cost basis:

Before the wash sale:

  1. John has 100 META shares with a $200 cost basis each = $20,000 total
  2. John sells 50 shares at $100 each, realizing a $5,000 loss
  3. John's remaining 50 shares still have a $200 cost basis each = $10,000 total

After RSUs trigger wash sale (50 shares vest at $100/share):

  1. The $5,000 disallowed loss gets added to the cost basis of the newly vested RSUs
  2. New cost basis per RSU share: $100 (vesting price) + $100 (disallowed loss) = $200 per share
  3. Total cost basis across all shares: $10,000 (old shares) + $10,000 (new RSUs) = $20,000

The impact: John can't claim the $5,000 loss now. He'll only realize it when he eventually sells those RSU shares—potentially years later. If he was counting on that loss to offset this year's gains, he's out of luck.

Tax savings lost: At the 24% tax bracket, that $5,000 loss would have saved John $1,200 this year. If he has capital gains to offset, the savings could be even higher.

How to Avoid the Wash Sale Trap

You have three main strategies to avoid wash sale when RSUs are involved:

Strategy 1: Time Your Sale Before RSU Vesting (Recommended)

Sell your shares more than 30 days before your RSU vest date.

Example: If your RSUs vest on June 15th, sell your shares by May 15th (or earlier). This creates a clean 30-day buffer.

Pros:

  • Simple and effective
  • Guarantees the loss deduction
  • No ongoing risk

Cons:

  • Requires planning ahead
  • Must track RSU vesting schedule

Strategy 2: Wait to Sell After RSU Vesting

Instead of selling before RSUs vest, wait until more than 30 days after they vest.

Example: RSUs vest on June 15th. Wait until at least July 16th to sell your old shares.

Pros:

  • Allows you to hold onto shares longer
  • Gives you time to evaluate the stock

Cons:

  • Stock price could drop further during waiting period
  • Delays your tax loss harvesting benefit

Strategy 3: Sell the Newly Vested RSUs Instead

After RSUs vest, immediately sell those new shares instead of your old shares. This way, you're not selling at a loss (RSUs have a cost basis equal to their vesting price).

Pros:

  • No wash sale concern
  • Diversifies your portfolio (reduces company stock concentration)
  • Provides immediate liquidity

Cons:

  • Doesn't help with tax loss harvesting
  • May have different tax implications

Critical Considerations

Blackout Periods and Trading Windows

Many public companies impose blackout periods when employees can't trade stock—typically around earnings announcements. Factor these into your planning:

  • Check your company's trading window calendar
  • Plan sales well in advance of RSU vests
  • Don't wait until the last minute

ESPP Purchases Also Trigger Wash Sales

If you participate in an Employee Stock Purchase Plan (ESPP), those purchases also count toward wash sales. Track all purchase dates:

  • RSU vesting dates
  • ESPP purchase dates (usually quarterly)
  • Any personal stock purchases

Track Everything

Keep detailed records of:

  • All stock sales (date, shares, price, cost basis)
  • RSU vesting schedule
  • ESPP purchase dates
  • Wash sale adjustments for your tax return

RSU Wash Sale Checklist

Before selling company stock, use this checklist:

✅ Before selling:

  1. Check your RSU vesting schedule for the next 30 days
  2. Check ESPP purchase dates for the next 30 days
  3. Review any automatic dividend reinvestment (DRIP) settings
  4. Confirm you're not in a company blackout period

✅ After selling at a loss:

  1. Don't buy the same stock for 31+ days
  2. Don't let RSUs vest within the wash sale window
  3. Consider selling the RSUs immediately when they vest instead
  4. Document all transactions for tax records

✅ Year-end planning:

  1. Review all sales in November-December for potential wash sales
  2. Check January RSU vests that could trigger wash sales on December sales
  3. Use our wash sale calculator to verify

Use Our Wash Sale Calculator

Trying to figure out if your sale will trigger a wash sale? Our free Wash Sale Calculator helps you:

  • Detect wash sales - Enter your buy and sell transactions to identify potential wash sales
  • Calculate cost basis adjustments - See exactly how your disallowed losses affect cost basis
  • Track the 61-day window - 30 days before and after each sale
  • Avoid costly mistakes - Get alerts before you trigger a wash sale

Don't let a preventable mistake cost you thousands in tax deductions. A few minutes of planning can save you thousands.

Frequently Asked Questions

Do RSUs count as a purchase for wash sales?

Yes. The IRS treats RSU vesting as a purchase of stock. If you sell company stock at a loss and RSUs vest within 30 days before or after, it triggers a wash sale.

What about ESPP purchases?

Yes, ESPP purchases also trigger wash sales. Any acquisition of substantially identical stock within the 61-day window counts, including ESPP purchases, dividend reinvestments, and purchases in different accounts (including IRAs).

Can I sell RSUs immediately after they vest to avoid wash sales?

Yes, this is a good strategy. If you sell the newly vested RSUs immediately (same day), you won't have a loss to disallow. The RSUs have a cost basis equal to their fair market value at vesting.

What happens to my disallowed loss?

The disallowed loss is added to the cost basis of your replacement shares (the RSUs). You'll eventually realize the loss when you sell those shares—it's deferred, not lost forever. But you lose the immediate tax benefit.

Do wash sales apply to crypto?

No, currently. As of 2026, cryptocurrency is not subject to wash sale rules. However, Congress has attempted to change this, so check current regulations.

Related Resources

RSU Guides:

Tax Planning:

Calculators: