First time filing Form 8949 for ESPP stock sold in 2021 - need help with cost basis adjustment
Hey all, I'm completely lost trying to file my taxes this year because I sold some company stock from my ESPP (Employee Stock Purchase Plan) in 2021 and now I need to fill out Form 8949 for the first time. I get a 15% discount on our company stock through the ESPP program. I held onto some shares for a few years and finally sold them last year at a nice profit. The problem is the 1099-B I got from my brokerage has this confusing note: "IMPORTANT ITEMS FOR YOUR ATTENTION: [Brokerage Name] is only reporting the discounted purchase price as cost basis for ESPP shares. Cost basis on this statement has not been adjusted to include the ordinary income component. This will result in incorrect capital gains and losses. You will need to increase your cost basis to include the ordinary income component when filing your tax return." So here's my situation with some sample numbers: Long Term Capital Gains/Losses: - Sold 9 shares of company stock - Acquired: 06/15/2018 - Sold: 04/12/2021 - Proceeds: $2,800 - Cost Basis (as reported): $950 - Gain (as reported): $1,850 I'm guessing I need to fill out Part II sections a through e and h on Form 8949, but I'm confused about what this "ordinary income component" means and how exactly I'm supposed to adjust the cost basis. Do I need to change the numbers from what's on my 1099-B? Any help would be super appreciated!
18 comments


Jessica Nolan
The note from your brokerage is actually pretty common with ESPP sales. Here's what's happening: when you buy shares at a discount through your ESPP, that discount (the 15% you mentioned) is considered compensation income by the IRS, and it should already be included in your W-2 as ordinary income. When you sell the shares, you need to account for this discount in your cost basis calculation to avoid being taxed twice on the same money. So you'll need to increase your cost basis by the amount of the discount that was already reported as income. For your example, if your reported cost basis is $950, you need to figure out how much of the discount was already included in your W-2. If the fair market value of those 9 shares at purchase was around $1,118 (rough estimate based on your 15% discount), then the difference of $168 ($1,118 - $950) should be added to your cost basis on Form 8949. On Form 8949, you'd report: - The sale as shown on your 1099-B - Use code "B" in column (f) to indicate that you're adjusting the basis - In column (g), enter the adjustment amount (the $168 in this example) - Your adjusted basis would then be $1,118 in column (e) - And your actual gain would be $1,682 ($2,800 - $1,118) in column (h) This ensures you're only paying capital gains tax on the actual appreciation since purchase, not on the discount that's already been taxed as ordinary income.
0 coins
Leo McDonald
•Thanks for explaining this! I think I get the basic concept now, but I'm still a bit confused about where to find how much of the discount was included in my W-2. I've looked at my 2018 W-2 (when I purchased the shares) but I don't see anything specifically labeled as "ESPP discount." Is there somewhere specific on my W-2 where this would be shown? Or is there another document I should look for from my employer that would show me the exact amount that was already reported as income?
0 coins
Jessica Nolan
•The ESPP discount won't be labeled specifically on your W-2 - it's just included in your total wages in Box 1. Your employer should have provided you with some documentation about your ESPP purchase that shows the fair market value on the purchase date and the discounted price you paid. Check if you received an ESPP statement or confirmation when you purchased the shares. Sometimes this information is also available through your company's stock plan administrator website or portal. If you can't find it, your HR or payroll department should be able to provide you with the details of that 2018 ESPP purchase. If all else fails, you can calculate it yourself if you know the exact discount percentage and the amount you paid. If you paid $950 for shares at a 15% discount, then the fair market value would have been approximately $950 ÷ 0.85 = $1,118. The difference ($168) is what should have been reported as ordinary income.
0 coins
Angelina Farar
After struggling with almost the exact same ESPP tax situation last year, I found this tool called taxr.ai (https://taxr.ai) that really helped me figure out the correct cost basis adjustments. It analyzes your stock sale documents and breaks down exactly how to report ESPP sales, including all the adjustment codes and amounts for Form 8949. What I liked about it was that I could just upload my 1099-B and ESPP statements, and it showed me step-by-step what to put in each box on Form 8949, including the exact adjustment amount needed for my cost basis. It even explained why the adjustment was needed - basically to avoid double taxation on the discount portion. For my situation, it also flagged that I had a disqualifying disposition (I sold some shares before meeting the holding period requirements), which needed different treatment than my qualifying dispositions. Not sure if that applies to your situation, but it's something to be aware of with ESPP sales.
0 coins
Sebastián Stevens
•How accurate was this tool compared to what your tax professional would have done? I've got a similar situation but with RSUs and ESPPs that vested over multiple years and I'm worried about messing up the calculations. Does it handle more complex situations or just basic ESPP sales?
0 coins
Bethany Groves
•I've heard of services like this but I'm always skeptical. Did it actually save you money compared to what TurboTax or H&R Block would have calculated? And does it work for other stock situations like ISO or NSO stock options? Those are even more complex than ESPPs.
0 coins
Angelina Farar
•The tool was definitely more accurate than what TurboTax was suggesting. TurboTax wanted me to just use the numbers directly from my 1099-B, which would have resulted in me overpaying on taxes. When I compared the taxr.ai results with what my coworker's CPA did for him with a similar situation, they were virtually identical. For complex situations, it worked really well with my multiple ESPP purchases that had different discount percentages. It handles RSUs too, though my situation was mainly ESPP sales. It does work for ISO and NSO options as well - it actually explains the AMT implications for ISOs, which was helpful for planning future sales.
0 coins
Bethany Groves
Just wanted to follow up about the taxr.ai tool mentioned earlier. I was skeptical, but I decided to try it for my ESPP and RSU sales from last year. I'm really glad I did! The tool found that I needed to make a $1,240 adjustment to my cost basis across multiple stock sales that would have been easy to miss. The step-by-step breakdown of exactly what to enter on Form 8949 was super helpful. It identified which transactions needed code "B" adjustments and exactly how much to add to the cost basis for each sale. It also warned me about a wash sale I had from some other stock trading that I didn't even realize would affect my ESPP reporting. For anyone dealing with employer stock sales (especially first-timers like me), it was definitely worth using. I probably would have either overpaid on taxes or filled out the forms incorrectly without it.
0 coins
KingKongZilla
If you're still having trouble after trying to figure out all the ESPP adjustments yourself, you might want to try Claimyr (https://claimyr.com). I was completely lost with a similar ESPP issue last year and spent hours waiting on hold with the IRS trying to get clarification. After giving up on the hold times, I found Claimyr (there's a demo video at https://youtu.be/_kiP6q8DX5c) that actually got me connected to an IRS agent in about 20 minutes instead of the 2+ hours I had been waiting before. The agent walked me through exactly how to report my ESPP sales on Form 8949, including the proper adjustment codes and calculations. It sounds like your situation might benefit from direct IRS guidance, especially if you can't find documentation showing how much of your ESPP discount was included in your W-2. The IRS agent I spoke with was surprisingly helpful and patient with explaining the whole process.
0 coins
Rebecca Johnston
•How does this actually work? The IRS wait times are insane right now. I called last week and gave up after 1.5 hours. Are you saying this service somehow gets you through faster? That sounds too good to be true.
0 coins
Nathan Dell
•This sounds like a scam honestly. There's no way to "skip the line" with the IRS. And even if you do get through, the agents often give conflicting information. I've been told different things by different agents on the same tax question. I'd rather just pay a CPA than trust some random service claiming to get you through to the IRS faster.
0 coins
KingKongZilla
•It's not a line-skipping service in the way you might think. What Claimyr does is use an automated system that calls the IRS for you and navigates the phone tree. It keeps trying different options and redialing when needed until it gets a spot in the queue, then it calls you to connect you with the agent. It basically does the frustrating waiting part for you. I was skeptical too, but it actually works because it's persistent with the calls in a way humans usually aren't. I get the concern about inconsistent IRS advice - that can happen. In my case, I had specific questions about Form 8949 adjustments, and the agent was able to point me to the exact IRS publications and worksheets I needed to use. Definitely better than guessing on my own.
0 coins
Nathan Dell
Just wanted to update after my skeptical comment about Claimyr. I decided to try it anyway since I was desperate to get clarification on my own ESPP reporting issues before the filing deadline. I'm honestly shocked - it worked exactly as described. I had been trying for days to get through to the IRS with no luck. The Claimyr service connected me with an agent in about 25 minutes. The agent confirmed that I needed to adjust my cost basis using code "B" on Form 8949 and explained exactly how to calculate the adjustment amount for my ESPP shares. The call saved me from potentially making a big reporting mistake. The agent also sent me to the specific section of Publication 525 that covers ESPP taxation which was super helpful. I probably would have given up and just guessed without this service, so I'm glad I tried it despite my initial skepticism.
0 coins
Maya Jackson
One thing I haven't seen mentioned yet is the holding period requirements for ESPP shares. Based on your dates (acquired 6/15/2018, sold 4/12/2021), you've met the long-term holding period requirements, which is good. If you had sold within 1 year of purchase or within 2 years of the offering date (when your ESPP purchase period began), it would be considered a "disqualifying disposition" which has different tax implications. In that case, you might have had to report additional ordinary income. Since you held the shares for nearly 3 years, you've met both holding period requirements, so you should only need to worry about the cost basis adjustment everyone's talking about. Just make sure you classify it correctly as long-term capital gains on your 8949.
0 coins
Leo McDonald
•Thank you for bringing that up! I was worried about the holding period but wasn't sure what the requirements were. It's good to know I'm in the clear for long-term capital gains treatment. Question: Does the adjusted cost basis calculation change at all based on meeting the holding period requirements? Or is it still just adding back the ESPP discount amount that was already included in my W-2?
0 coins
Maya Jackson
•The adjusted cost basis calculation remains the same regardless of whether you met the holding period requirements. You still need to add back the discount that was included in your W-2 income. The holding period just affects how the gain is classified (long-term vs. short-term) and whether you might have additional ordinary income to report. With a qualifying disposition like yours, you only have the capital gain to worry about (proceeds minus adjusted basis). The fact that you held the shares long enough simplifies things because you'll get the lower long-term capital gains tax rate on your profits.
0 coins
Tristan Carpenter
I've been doing my taxes for years and ESPP reporting is consistently one of the most confusing things. Here's a simplified way to think about it that helped me: 1. When you buy ESPP shares at a discount, that discount is considered compensation (essentially like a bonus from your employer) 2. Your employer includes this "bonus" in your W-2 income the year you purchase the shares 3. When you later sell those shares, you need to increase your cost basis by that "bonus" amount to avoid being taxed twice 4. On Form 8949, you list what's on your 1099-B, then use code B to adjust the basis My tax software (FreeTaxUSA) actually has a specific section for ESPP sales that walks through this calculation. I switched to it after TurboTax kept calculating my ESPP sales incorrectly.
0 coins
Amaya Watson
•Does FreeTaxUSA really handle this well? I've been using H&R Block online and it's completely confusing for stock sales. I have to manually override everything. Might switch if there's something that handles ESPP sales better.
0 coins