How do I calculate cost basis for RSU shares I just sold?

Trying to figure out how to calculate cost basis for RSU shares and completely lost. I sold shares from two different vest dates this year and my 1099-B from the broker shows a cost basis way lower than what I think it should be — like it's showing zero or close to it for some lots. My company withholds shares for taxes at vesting so I never see the full grant amount hit my account. I looked at my pay stubs and I can see the FMV was added to my W-2 wages but I'm not sure how that connects to what I put on Form 8949. Already tried looking at the 1099-B box by box but couldn't figure out what adjustments I need to make. Am I going to get double-taxed on the income that already hit my W-2?

32 comments

You're not going to get double-taxed as long as you use the right basis. The income from vesting — the FMV of the shares on the vest date minus anything you paid — already showed up on your W-2. That amount becomes your cost basis in the shares. So your basis per share is the FMV on the vest date, not what you originally paid for anything, because RSUs aren't purchased. The broker often doesn't have that number right, especially if the shares transferred from an equity platform after the fact.

Eric S.

Author

That makes sense. So the basis should equal whatever dollar amount showed up on my W-2 as compensation from that vest? And if the broker shows zero I'd need to adjust it on Form 8949?

Had a similar mess with two vest lots last year. I uploaded my vest confirmations, the 1099-B and my W-2 to taxr.ai and it matched each lot to the right vest-date FMV, then listed the correct basis per share for each one. I still had to enter the numbers myself on Form 8949, but having that breakdown made it straightforward. The key step it flagged was that I needed to enter the broker's wrong basis in column (e) and then correct it with a negative adjustment in column (g) because my shares were covered securities with basis reported to the IRS.

Eric S.

Author

This is exactly the workflow I needed. Did it also catch the difference between shares sold immediately at vest versus ones you held longer?

Yes, it flagged the holding period on each lot — ones sold the same day as vest were short-term, ones held past that anniversary were long-term, so they went in different parts of Form 8949.

The basis calculation itself is: FMV per share on the vest date × number of shares deposited in your account (the net amount after withholding). Don't use the gross shares that vested. The withheld shares are just the company selling some to cover your taxes — the whole vest is still income to you, but your basis covers only the shares you received net.

Wait — so even the withheld shares affect my basis calculation even though I never held them?

No, the withheld shares reduce how many shares you hold. Your basis per share stays the same (vest-date FMV), you just apply it to the net shares actually deposited in your account. The gross vest sets your W-2 income; your basis in the shares you received is vest-date FMV per share on those net shares.

One thing that caught me off guard: my broker reported basis on some lots as covered and others as noncovered. The covered lots (box A or D on Form 8949 depending on holding period) require me to enter the broker's stated basis in column (e) even if it's wrong, then fix it in column (g). For noncovered lots (box B or E), I just enter the correct basis directly in column (e) and put -0- in column (g). The instructions for Form 8949 spell this out pretty clearly.

Eric S.

Author

So for my covered lots where the broker shows zero basis, I'd put zero in column (e) and then put the full correct basis as a negative number in column (g)? That feels backwards but I think I get it.

Yes, that's right. The negative number in column (g) increases your basis, which reduces your reported gain. It looks counterintuitive but that's exactly how the Form 8949 column (g) adjustment works for code B — incorrect basis.

I had three different vest dates across two years of grants and the lot matching was a nightmare. I gave Taxr my equity platform transaction history and it pulled each vest date, matched the closing price the company used, and drafted a basis schedule I could work from when filling out Form 8949. Saved me a lot of spreadsheet time. The holding period question it flagged for me: for shares sold within a year of vest they go in Part I, more than a year they go in Part II, and you count from the day after the vest date to the actual trade date of the sale.

Eric S.

Author

The day-after rule is important — I was counting from the vest date itself and might have miscategorized a lot as long-term when it was actually still short-term. Good catch.

Publication 525 covers the RSU income side. The FMV at vesting minus what you paid (usually zero for RSUs) is ordinary income, it hits your W-2, and that same amount is your basis going forward. Publication 550 and Publication 551 cover basis of property received for services if you want the technical grounding.

My company uses a 30-day average price instead of the actual vest-date closing price. That threw off my basis versus what the equity platform showed. Worth checking your plan documents or grant agreement to see exactly which price the company uses, since that's what flows to your W-2.

Yes, this tripped me up too. My plan used the closing price on the vest date, but a colleague's plan at a different company averaged over the prior 30 days. The number has to match whatever your company used, not just the market close you find online.

If you sold in the same calendar year the shares vested, your holding period is short-term by definition — even a January vest sold in December of that same year is under a year — and if you sold in a later year you need to count carefully from the day after the vest date. Short-term gains get taxed as ordinary income, so the rate difference from long-term matters a lot once the amounts get significant.

Eric S.

Author

Both of my sales were within a few months of vesting so I'm pretty sure both are short-term. At least that simplifies the Form 8949 — everything goes in Part I.

Don't forget to reconcile what's on your W-2 box 12 or box 14 versus your equity platform's vest summary. Some companies put RSU income in box 14 as a memo item; others just fold it into box 1 wages with no separate label. Either way the income and withholding should be there — if the numbers don't line up, that's worth resolving before you file, not after.

I had a lot where I sold immediately at vest — same day — and was nervous the gain would be huge. Because I sold on the vest date, my proceeds basically equaled my basis (vest-date FMV), so the actual capital gain was nearly zero. The W-2 income was already the big number. People stress about the 1099-B proceeds but the real tax happened at vesting.

Eric S.

Author

That's reassuring. My first vest I sold immediately so I was confused why the 1099-B showed a large number as proceeds and thought I'd owe capital gains on the whole thing.

Right — the proceeds on the 1099-B look scary but once you enter the correct vest-date FMV as your basis the capital gain on a same-day sale is usually just a few cents per share from intraday price movement.

For anyone with a large number of RSU lots across multiple years, the adjustment columns on Form 8949 get tedious fast. Under Exception 1 in the Form 8949 instructions, if you have covered transactions with no adjustments at all you can skip Form 8949 for those and report directly on Schedule D line 1a or line 8a. But RSU lots usually have a basis adjustment, so most people can't use that shortcut.

Yes, Exception 1 is only clean if the broker's basis is already exactly right. For RSUs where the broker shows zero or a partial basis, you need Form 8949 with the adjustment columns.

One scenario that changes the calculation: if your company allowed an 83(b) election — which applies to restricted stock (actual shares with a vesting schedule), not to true RSUs (which are unfunded promises). If you have restricted stock and filed the 83(b) within 30 days of the grant, your basis is the FMV at grant, not at vesting, and your holding period starts at grant. Worth knowing the difference before you assume which situation you're in.

Eric S.

Author

Mine are definitely RSUs — no 83(b) was involved. But good to flag for people searching the same question who might have restricted stock instead.

The IRS topic 409 page covers the limit on deducting capital losses and the carryover, and Publication 550 has a section on holding period. For the RSU income side, Publication 525 is the right source. I'd read both before filing if the amounts are material, just so you know the rules you're applying.

I ended up with a wash sale issue layered on top of the basis problem because I sold RSU shares at a loss and then more RSUs vested within the 30-day window — which the IRS treats as an acquisition of substantially identical shares. My broker didn't flag it at all on the 1099-B since the vested shares had a different lot identifier. Something to watch for if any of your lots are in a loss position.

No, that's a real risk. The wash sale window is 30 days before and after the sale, and a vest counts as an acquisition, so a loss sale sandwiched between vest dates is exactly the scenario that triggers it.

And the disallowed loss gets added to the basis of the new shares acquired at vest — per Publication 550. The broker may not catch it if the lots look different in their system, so you have to track it yourself.

If the amounts are large — say several hundred thousand in total proceeds — I'd strongly suggest having a CPA or enrolled agent review your Form 8949 before you file. Getting the basis wrong on RSUs is one of the most common errors the IRS flags on income reconciliation because the W-2 income and the 1099-B proceeds are both visible to them and the numbers have to tell a consistent story.

Eric S.

Author

Mine are significant enough that I'm going to get a CPA to review. Good reminder that both the W-2 and 1099-B go to the IRS and they can cross-reference.