How to calculate adjusted cost basis for ESPP shares when you sell
Sold my ESPP shares this year and my 1099-B from the broker shows a cost basis that I know is wrong — it's way lower than what I actually paid after the discount and the ordinary income piece. My W-2 had an amount added for the ESPP discount when the shares vested/were purchased, but I can't figure out how that feeds into what I report on Form 8949. I've read that I need to adjust the basis upward by the compensation income already reported, otherwise I'm going to get double-taxed on the same amount. I tried matching the numbers on my supplemental broker statement but the figures don't line up with the 1099-B box 1e at all. Is there a step-by-step way to figure out the correct adjusted cost basis for ESPP before I fill out Form 8949? Does it matter whether this is a qualifying or disqualifying disposition?