Which vested RSU shares to sell first for lowest capital gains tax?

Trying to figure out which vested RSU shares to sell first for lowest capital gains tax and I'm going in circles. I have three separate vesting tranches sitting in my brokerage account — one from about 8 months ago, one from 14 months ago, and one from just last month. Each lot has a different fair market value at vest (which is my cost basis), and they've all moved around since then. My broker lets me choose specific lots when I sell. I know the difference between short-term and long-term rates exists but I don't know exactly how to weigh a larger gain taxed at long-term rates versus a smaller gain taxed at short-term rates. I'm not trying to sell everything, just raise some cash. Does the holding period always win, or does the size of the gain matter more?

37 comments

Does it matter whether these shares are all in the same account or spread across accounts? That changes how much control you actually have over lot selection.

Leah S.

Author

All in one brokerage account, same employer grant. I can see each lot labeled by vest date when I go to place the trade.

Holding period is the first filter, not the only one. If your 14-month lot has a tiny gain and your 8-month lot has a big loss, selling the 8-month lot first could wipe out gains elsewhere even if it's short-term. You really have to look at the actual dollar gain per lot, not just the dates.

Leah S.

Author

That's a useful frame. So I should be building a table of gain per lot and then thinking about which bucket (short vs long term) each one falls into before I decide?

Exactly. Map it out: lot date, number of shares, basis per share (the FMV at vest), current price, gain per share, and whether the holding period crosses the one-year mark. Then you can compare apples to apples.

What does your overall capital gains picture look like this year — any realized losses sitting around that could offset a short-term gain? That context matters a lot here. Side note: I had my RSU vest history and brokerage statements in a similar tangle last spring. I uploaded everything to taxr.ai and it mapped each lot's basis against the vest confirmations and flagged which lots were already long-term. Saved me a lot of spreadsheet time.

Leah S.

Author

No realized losses yet this year, clean slate. That's helpful to know about the lot mapping — my brokerage's interface doesn't make it obvious which lots have crossed the one-year line.

Your state matters here too, depending on whether it has its own capital gains rate. Some states tax long-term and short-term gains at the same ordinary income rate, which changes the math on how much you save by waiting for long-term treatment.

Leah S.

Author

Good point, I hadn't thought about state. I'm in California so yes, everything gets taxed at ordinary income rates at the state level regardless. That does reduce the federal long-term advantage a bit in the total picture.

Right, so for CA residents the federal rate difference is the main lever. Long-term federal rates are still meaningfully lower than short-term for most income levels — check Topic 409 on irs.gov for the thresholds — but the state piece won't add extra savings the way it would somewhere with no income tax.

The IRS holding period rule for securities is worth knowing precisely: your holding period starts the day after the trade date you bought (or in your case, the vest date), and ends on the trade date you sell. So if your 14-month lot vested on, say, the 10th of a month last year, the day you sell counts — not the settlement date. Worth double-checking which of your lots actually clears the one-year mark before you place the order.

Leah S.

Author

This is exactly the kind of detail I needed. I was counting from settlement date, which could have thrown off my calculation on the 14-month lot.

Counting from settlement is a common mistake. Use the vest confirmation date as day zero, then count forward — the sell trade date is the last day that counts.

My situation last year: three vesting tranches, wanted to sell partial lots, had no idea how to tell my broker which shares to designate. I pasted my grant summary and vest schedule into Taxr and it walked through which lots were long-term versus short-term and drafted a comparison of the gain on each. Made it easy to hand to my preparer. On the actual question: if two lots have similar gain amounts, the long-term one wins on federal rate. But if the long-term lot has a much larger gain, sometimes selling the smaller short-term gain lot and keeping the large appreciating lot to grow further long-term is the better move.

Leah S.

Author

That last point is interesting — holding the large long-term gain lot longer while only selling what I need. I hadn't thought about the future appreciation angle, only the current tax hit.

Has anyone run into the wash sale issue with RSUs? Like if you sell a lot at a loss and then more shares vest within 30 days — same stock, so does that trigger a wash sale?

Yes, it can. If you sell RSU shares at a loss and within 30 days before or after the sale you acquire substantially identical shares — including through a new vest — that's a wash sale and the loss is disallowed. The disallowed loss gets added to the basis of the newly acquired shares instead. The rule covers acquisitions in the same account and also in an IRA if you buy there.

Wow, so a vest counts as an acquisition for wash sale purposes? That's something I definitely would have missed.

Correct. The 30-day window runs both before and after the sale, so a vest that lands in that window on either side can trigger it even if you weren't planning to buy anything.

To put numbers on the trade-off in general terms: the question is really whether the tax rate difference between short-term and long-term is bigger or smaller than the percentage gain difference between your lots. If your short-term lot has a 3% gain and your long-term lot has a 40% gain, paying the lower rate on the 40% gain might still cost more in dollars than paying the higher rate on the 3% gain.

Leah S.

Author

That framing actually clicks for me. It's not just the rate — it's rate times gain amount. I need to do the actual dollar math per lot.

Does your employer restrict when you can sell? Some grants have a lockup or a trading window policy, which might make some lots unavailable to you even if they're tax-optimal.

Leah S.

Author

We have quarterly trading windows. Next window opens soon so I'm trying to plan ahead. That's why I want to get the lot selection right before I'm in the window and have to decide fast.

Net capital losses for the year have a cap on how much you can deduct against ordinary income — the rest carries forward. The Schedule D instructions and Topic 409 on irs.gov lay out the limit. It's worth knowing so you don't over-plan around generating losses thinking they'll all be usable this year.

Good addition. And losses carry forward indefinitely, so they don't disappear — they just move to future years. Still better to generate them intentionally than accidentally trigger a wash sale that defers them — the disallowed loss gets added to the basis of the new shares instead of being usable this year.

Specific identification is the key feature to confirm with your broker before you sell. You have to designate the specific lot at or before the time of the sale — you can't go back after the fact and reclassify which shares you sold. Some brokers require a written or in-platform election to use specific ID rather than their default method (often FIFO).

Leah S.

Author

Confirmed with my broker — I can select the lot in the order flow screen before submitting. Good to know I have to do it in that moment and not after.

Next step: document the lot you selected with a screenshot or the trade confirmation. If the basis ever gets questioned you want a clear record tying the sale to the specific vest lot.

Worth noting that your basis per lot is the FMV of the shares on the vest date — that's what your employer should have included in your W-2 as ordinary income, and it's what your broker should have on record. If the basis on your 1099-B looks wrong, you can correct it on Form 8949 with code B in column (f): if basis was reported to the IRS (box A or D), keep the 1099-B basis in column (e) and put the correction in column (g); if it wasn't reported (box B or E), enter the corrected basis in column (e).

Leah S.

Author

My 1099-B last year did show a lower basis than expected on one lot — I think the broker used the grant price instead of the vest date FMV. Good to know there's a formal way to fix that on Form 8949.

That's a common RSU basis error. The grant price and the vest date FMV are almost never the same. The vest date FMV is the right number. When you correct it on Form 8949 with box A or D checked (A for a short-term lot, D for a long-term lot, both meaning basis was reported to the IRS), enter the broker's incorrect basis in column (e) and put the correction as a negative adjustment in column (g) if your true basis is higher.

Are you factoring in estimated taxes? If you generate a large short-term gain, depending on your withholding situation you might owe a quarterly estimated payment. Underpaying throughout the year can add an underpayment charge on top of the tax itself.

Leah S.

Author

Not something I'd thought about. I'm salaried so I assumed withholding covers it, but a big sale mid-year might push me over. I'll check my year-to-date withholding before I pull the trigger.

Pulling together everything in this thread, the practical order of operations seems to be — confirm your lot basis matches vest-date FMV, check each lot's holding period using trade dates not settlement dates, build the gain-per-lot table, then compare the dollar tax cost of each option factoring in both rate and gain size. State tax is a separate row in that table.

Leah S.

Author

This is a solid checklist. I'm going to build the spreadsheet this week before the trading window opens. Thanks everyone — this thread answered every piece of the question I came in with.

One scenario people skip: if any of your lots are currently at a loss, selling those first locks in a capital loss that offsets gains elsewhere. Even if they're short-term lots, a loss is a loss and it shelters gains dollar for dollar before the deduction cap kicks in.

Agreed, but watch the 30-day window on either side of that sale if you're still receiving vests. Selling at a loss and then getting a new vest of the same stock within 30 days disallows the loss under the wash sale rules.