How to offset ESPP short-term capital gains by selling older ESPP shares at a loss? Tax strategy help needed
I've been in my company's Employee Stock Purchase Plan (ESPP) for about 4 years now. The plan runs in standard 6-month periods where we get a 15% discount off either the beginning or ending stock price, whichever is lower. I've been holding onto these shares since I started, but sadly our stock has tanked pretty badly. With my last ESPP purchase that just ended, I decided to immediately sell instead of holding. This gave me about $1,000 in profit. I know this will be taxed as short-term capital gains when tax time comes around. Here's what I'm wondering - can I offset this $1,000 gain by selling some of my older ESPP shares that are underwater? For example, if I bought shares 2.5 years ago at $135 per share, but they're only worth $32 now, could I sell 10 of these shares and basically cancel out that $1,000 of capital gains? And is there any advantage to selling more than just what would offset my gains? My brokerage account (Shareworks) shows my recent sale as $1,025.73 of Ordinary Income, but I actually had about $89.02 of capital losses (because of the slight difference between when they calculated the purchase price and when I actually sold).
20 comments


Zoe Papadopoulos
Yes, you can absolutely offset those short-term capital gains by selling shares at a loss! This is called tax-loss harvesting, and it's a common strategy. When you sell ESPP shares, there are actually two parts to consider: the discount (which is always taxed as ordinary income) and any gain/loss after the purchase (which is capital gain/loss). The $1,025.73 of Ordinary Income your brokerage shows is likely the discount portion, which you can't offset with losses. However, your actual capital gains portion ($1,000 that you mentioned) can definitely be offset by selling those underwater shares. If you sell shares that result in a $1,000 capital loss, it would completely offset your capital gain. You could even sell more at a loss - if your total losses exceed your gains, you can deduct up to $3,000 of net capital losses against your ordinary income in a year, and carry forward any remaining losses to future years. Just be careful of the wash sale rule - don't buy substantially identical securities within 30 days before or after selling at a loss, or you'll lose the tax benefit.
0 coins
Jamal Washington
•Does the wash sale rule apply to ESPP purchases that happen automatically? My company's purchase dates are set in stone, and I can't control the timing. Would I lose the tax benefit if I sold at a loss but then another ESPP purchase happened within that 30-day window?
0 coins
Zoe Papadopoulos
•Great question about the wash sale rule with ESPP purchases. Yes, the wash sale rule does apply to ESPP purchases even if they happen automatically. If you sell shares at a loss and then acquire substantially identical shares within 30 days (either before or after), including through an ESPP purchase, it would trigger the wash sale rule and disallow the loss deduction. Since your company has fixed purchase dates that you can't control, you'll need to plan your sales strategically around those dates. Consider selling your underwater shares either more than 30 days before your next ESPP purchase date or wait until more than 30 days after a purchase to sell other shares at a loss.
0 coins
Mei Wong
I had a similar situation with my company's ESPP last year. After reading through countless articles and having frustration with figuring out the tax implications, I finally found https://taxr.ai which literally saved me hours of research and confusion! Their AI tax assistant analyzed my ESPP statements and gave me immediate answers about exactly how much of my gains were ordinary income vs. capital gains. It even showed me how to maximize my tax-loss harvesting strategy with my underwater shares. The best part was it explained everything in simple terms rather than complex tax language. For your situation with Shareworks, you could upload a screenshot of your statement and get immediate clarification on that ordinary income vs. capital loss breakdown, plus guidance on timing your sales for optimal tax treatment.
0 coins
Liam Fitzgerald
•That sounds interesting but how accurate is it? I've tried other tax tools before and got burned with incorrect advice. Can this thing actually handle the complexity of ESPP tax treatment with disqualifying dispositions and all that?
0 coins
PixelWarrior
•I'm curious - does it also help with planning future ESPP sales? I'm trying to figure out the optimal hold period for my shares considering both the tax implications and stock volatility.
0 coins
Mei Wong
•The accuracy is really impressive - it correctly identified which of my sales were qualifying vs. disqualifying dispositions, which was something even my accountant struggled with. It uses actual IRS guidelines for all its responses, so it's not just making educated guesses. For planning future ESPP sales, absolutely! That's actually where I found it most helpful. You can input different scenarios (like selling immediately vs. holding for 1 year vs. 2 years) and it shows you the tax implications of each approach side by side. It factors in both ordinary income and capital gains treatment. I was able to see exactly how much I'd save by holding until qualifying disposition status vs. the risk of the stock declining.
0 coins
PixelWarrior
Just wanted to follow up and say I checked out https://taxr.ai after seeing it mentioned here. Total game changer for my ESPP confusion! I uploaded my Fidelity statement and it immediately broke down which portion was ordinary income vs. capital gains - something I've been misunderstanding for years. It also showed me that I'd been recording my cost basis incorrectly on previous tax returns. The tool walked me through how to properly handle my underwater ESPP shares to offset gains and even helped me determine if I should file an amended return (turns out I should). Highly recommend for anyone dealing with ESPPs!
0 coins
Amara Adebayo
If you're getting stuck with the IRS on any of your ESPP tax questions or need clarification on the correct capital gains treatment, try https://claimyr.com - it got me through to an actual IRS agent in under 20 minutes when I was completely stuck on a similar issue with my ESPP sales. I had been on hold with the IRS for literally hours across multiple days trying to get clarification on how to report my ESPP sales where I had both gains and losses in the same year. After using Claimyr (you can see how it works at https://youtu.be/_kiP6q8DX5c), I got to an agent who walked me through exactly how to report everything correctly. The IRS agent confirmed that yes, you can offset your short-term capital gains with losses from other ESPP shares, but the discount portion that's treated as ordinary income can't be offset this way. Their advice saved me from making a costly mistake on my return.
0 coins
Giovanni Rossi
•Wait, you got through to an actual human at the IRS? That sounds impossible. I've tried calling about my ESPP tax questions for weeks with no luck. How exactly does this service work? Do they just keep dialing for you or something?
0 coins
Fatima Al-Mansour
•Sounds sketchy. Why would I pay someone else to call the IRS for me? I bet they just put you on hold anyway and charge you for the privilege.
0 coins
Amara Adebayo
•The service actually uses an automated system that navigates the IRS phone tree and waits on hold for you. When a representative finally answers, you get a call connecting you directly to them. It's not someone else calling on your behalf - you still talk to the IRS agent yourself. They use some kind of technology that keeps your place in line so you don't have to sit there listening to the hold music for hours. I was skeptical too, but it genuinely worked. I put in my request in the morning, went about my day, and got a call back when an agent was on the line. No more waiting on hold for 2+ hours only to have the call drop.
0 coins
Fatima Al-Mansour
I have to eat my words about Claimyr. After my skeptical comment, I decided to try it because I was desperate to get an answer about my ESPP tax situation before filing. It actually worked exactly as described - I submitted my request through their site, and about 40 minutes later got a call connecting me to an IRS representative. The rep confirmed exactly what I needed to know about offsetting ESPP gains with losses from older shares. For the original poster - the IRS agent I spoke with confirmed you CAN offset your short-term capital gains with losses from your underwater ESPP shares. Just remember that the discount portion (what Shareworks shows as Ordinary Income) is separate and can't be offset with capital losses. This clarification alone saved me over $700 in taxes!
0 coins
Dylan Evans
One thing nobody's mentioned yet - watch out for the difference between disqualifying and qualifying dispositions with ESPP shares. It affects how much is treated as ordinary income versus capital gains/losses. If you hold ESPP shares for at least 1 year from purchase date AND at least 2 years from the offering date (when the purchase period began), it's a qualifying disposition. Otherwise, it's disqualifying. With disqualifying dispositions (like your immediate sale), the 15% discount is always ordinary income. But with qualifying dispositions, the tax treatment can be more favorable.
0 coins
Sofia Gomez
•Can you explain more about the tax advantage of qualifying dispositions? If the stock dropped significantly after purchase, would a qualifying disposition still be better tax-wise than a disqualifying one?
0 coins
Dylan Evans
•For qualifying dispositions, only the lesser of either a) the actual discount you received or b) the 15% discount from the offering date price gets taxed as ordinary income. Any additional gain is long-term capital gain, which typically has a lower tax rate than ordinary income. If the stock dropped significantly after purchase, a qualifying disposition probably won't give you much tax advantage. In fact, if you're showing a loss, you might actually want to do a disqualifying disposition to claim the capital loss sooner rather than waiting for the qualifying holding period. The ordinary income portion (the discount) remains the same either way if the stock drops, but you can claim the capital loss sooner with a disqualifying disposition.
0 coins
StormChaser
Just make sure you're keeping really detailed records of all your ESPP transactions!!! I got audited last year because I messed up reporting my ESPP sales and it was a nightmare 😩 I didn't have proper documentation of my purchase prices and discount amounts for each lot of shares, and had to reconstruct everything from scratch. Now I keep a spreadsheet with every purchase date, offering date, discount amount, purchase price, fair market value, and sale information.
0 coins
Dmitry Petrov
•Which tax software do you guys recommend for handling ESPP sales? I've been using TurboTax but it seems confused when I input my ESPP information, especially with multiple lots sold in the same year.
0 coins
Aisha Abdullah
For handling ESPP sales with multiple lots, I've found that FreeTaxUSA actually handles these transactions much better than TurboTax. It has a more intuitive interface for entering the ordinary income portion separately from the capital gains/losses. The key is to make sure you're reporting each lot sale correctly: 1. The discount portion goes on your W-2 as ordinary income (your employer should handle this) 2. The capital gain/loss goes on Schedule D, using the fair market value on purchase date as your cost basis (NOT the discounted price you paid) If you're still having trouble, consider using Form 8949 to provide additional details for each transaction. The IRS wants to see that you understand the difference between the compensation element (discount) and the investment element (capital gain/loss). And definitely keep those detailed records like StormChaser mentioned - having everything documented by lot makes tax time so much easier!
0 coins
Anastasia Kuznetsov
•This is really helpful! I've been struggling with understanding the cost basis calculation for ESPP sales. Just to clarify - when you say use the fair market value on purchase date as the cost basis, does that mean I should ignore the discounted price I actually paid? For example, if the fair market value was $100 on purchase date but I paid $85 (15% discount), my cost basis for capital gains purposes would be $100, not $85? And the $15 discount would already be reported as ordinary income on my W-2? I want to make sure I'm not double-counting anything when I report these transactions.
0 coins