Should I buy discounted company stock through ESPP and sell immediately?

My employer just opened enrollment for their ESPP and the discount is 15% off the lower of the price at the start or end of the offering period. A coworker told me to just buy in and sell immediately every time the window opens to lock in the discount. That sounds almost too easy so I'm trying to understand what the catch is before I commit a chunk of my paycheck. I've read that there's some tax thing where if you sell too soon you get hit harder than if you wait. But I also don't want to hold company stock forever. My HR packet mentions "qualifying" and "disqualifying" dispositions but doesn't really explain what that means in practice. Should I buy discounted company stock through ESPP and sell immediately, or is the tax hit bad enough that I should rethink the whole strategy?

33 comments

I enrolled in my company's ESPP three years ago and did exactly the sell-immediately strategy from day one. The short answer is: the discount is almost always worth it even after tax, but the type of income you recognize and when you recognize it depends on how long you hold. When you sell immediately (or within two years of the offering date OR within one year of the purchase date), that's a disqualifying disposition. The discount you got — the spread between what you paid and the fair market value at purchase — gets reported as ordinary income, usually through your W-2. The rest, if any, is a capital gain or loss on Form 8949.

Priya C.

Author

So my employer is supposed to handle reporting the ordinary income piece through payroll? I was worried I'd have to calculate that myself.

They should include it in your W-2 box 1, yes. But always cross-check the 1099-B your broker sends — the cost basis reported there sometimes doesn't include the ordinary income piece already on your W-2, which can make it look like you have more capital gain than you actually do.

I did the immediate-sell approach last year and ran into exactly the cost basis confusion the previous commenter mentioned. My 1099-B showed the purchase price I paid out of pocket, not the full FMV at purchase, so Schedule D looked like I had a big short-term gain on top of the ordinary income already in my W-2. I uploaded the 1099-B and my W-2 to taxr.ai and Taxr flagged that my broker was reporting a lower basis than my actual basis, then drafted the Form 8949 adjustment so I wasn't double-taxed. Saved me from overpaying. The fix depends on the box: if basis wasn't reported to the IRS (box B), enter the correct basis in column (e) of Form 8949 with code B in column (f) and -0- in column (g); if it was reported (box A), enter the broker's basis in column (e), code B, and the adjustment in column (g).

Priya C.

Author

This is exactly what I was worried about. So the broker might not "know" that some of the gain is already ordinary income on my W-2?

Correct. The broker reports what you paid, not the compensatory element. You have to adjust the basis yourself on Form 8949. Keep your ESPP purchase confirmation so you have the FMV at purchase date to back up the adjustment.

The 15% discount off the lower of beginning or end price is about as good as ESPPs get. With a lookback provision like that you could theoretically buy shares that have risen all offering period and get an even bigger effective discount. Math-wise: even if the entire discount is taxed as ordinary income at a high marginal rate, you're still coming out ahead. A guaranteed 15% return in a few months before tax beats most alternatives on a risk-adjusted basis. The "catch" is just that it's ordinary income, not a preferential capital gains rate.

The lookback part is key — a lot of people don't realize the discount can be bigger than 15% when the stock has gone up during the period.

I held my ESPP shares for over two years past the offering date once to try for a qualifying disposition. The tax treatment is better in theory — only part of the discount is ordinary income and more of it can be long-term capital gain. But the stock dropped during that time and I ended up with less money than if I'd just sold immediately. For most people holding company stock that long is concentrated risk you don't need. Sell immediately, recognize the ordinary income, move on.

Concentration risk is real. Having both your paycheck AND a big stock position tied to the same company is double exposure.

Priya C.

Author

Yeah that's part of why the immediate-sell idea appealed to me. I don't really want to hold it long term.

I actually had my ESPP sale from two years ago reviewed because I wasn't sure whether I'd hit qualifying or disqualifying disposition status. The dates were close. I gave Taxr my purchase confirmation, the ESPP plan document, and my broker statement, and it compared the dates, laid out which disposition category I fell into, and prepared a summary showing what should be ordinary income versus capital gain. Ended up being disqualifying by a few weeks. The rule to remember: disqualifying means sold within two years of offering date OR within one year of purchase date. Both tests have to be passed to reach qualifying.

Both conditions have to be met for qualifying, yes. A lot of people only think about the one-year holding period from purchase and miss the two-year offering date requirement.

Priya C.

Author

So even if I held a full year from purchase I could still miss qualifying if the offering date was more than two years ago? Or wait — if offering was recent and I sell right away, disqualifying applies automatically?

Selling right away is always disqualifying — you won't have held one year from purchase date. The two-year clock from offering date is the other condition you'd need to satisfy anyway. Immediate sell = disqualifying, period.

I work in payroll and see ESPP entries all the time. When you do a disqualifying disposition the spread at purchase date gets added to W-2 box 1, but not boxes 3 and 5, and you don't owe FICA on it. That's the part people get wrong — it's income tax only, not Social Security and Medicare on the discount amount.

The FICA piece is worth noting. For a qualified ESPP there's no Social Security or Medicare on that ordinary income portion at all, whether or not you're over the wage base — it's income tax only.

To directly answer the original question: yes, buy in and sell immediately if your goal is to capture the guaranteed discount. The tax treatment is less favorable than a qualifying disposition but the guaranteed return on a short timeline is hard to beat. Just make sure you adjust your Form 8949 basis correctly or you'll overpay.

I made the mistake my first year of not adjusting the basis at all. The 1099-B cost basis was my payroll deduction amount. I reported that on Schedule D without adjustment and ended up paying capital gains tax on income that was already taxed as ordinary income through my W-2. Took me until the following year to notice when I was comparing returns.

The IRS instructions for Form 8949 say when basis isn't reported to the IRS (box B or E checked), you enter the correct basis in column (e) directly. When it is reported but wrong, you enter the 1099-B basis in column (e) and correct it in column (g). Which box your broker checks changes how you fill it in.

Mine was reported as covered so the broker checked box A. I should have entered their (wrong) basis in column (e) and then put a negative adjustment in column (g) to bring it up to the correct basis. I just skipped Form 8949 entirely which was the real problem.

One thing nobody mentioned: check whether your company withholds tax on the ESPP income at the time of purchase/sale or whether you're expected to cover it at filing. Some companies do supplemental withholding, some don't withhold enough. If yours doesn't, a disqualifying disposition could leave you with an underpayment situation.

Priya C.

Author

I'll check with HR about their withholding policy. I hadn't thought about owing a big amount at filing time with no withholding to cover it.

I've done this for four consecutive offering periods now. Immediate sell every time. The administrative burden is a little annoying — four separate lots on Form 8949, basis adjustments on each — but the return is worth it. I keep a spreadsheet of each purchase: offering date, purchase date, price paid, FMV at purchase, so I have everything when the 1099-B arrives.

Spreadsheet is essential. The broker confirmation email at purchase has the FMV you need. Don't rely on memory six months later.

I want to flag something for the OP: if you sell before the offering period closes — which some plans allow — the tax treatment is determined by the actual purchase date and offering date under your plan terms, not by when you placed the sell order. Read your plan document to understand exactly when "purchase date" occurs because it varies by plan.

Publication 525 at irs.gov covers employee stock purchase plans and the qualifying versus disqualifying disposition rules. It's worth reading the section on ESPPs before your first purchase so you understand what your W-2 should show.

Publication 551 is also useful for understanding how to establish your adjusted basis in the shares, especially the compensatory element piece.

I'll add a scenario people sometimes ask about: what if the stock drops between purchase and sale so you sell at a loss versus FMV at purchase? You still recognize ordinary income on the actual discount from your purchase price to FMV at purchase, and then a capital loss on the decline from FMV at purchase to your sale price. The ordinary income piece doesn't disappear just because the stock fell after purchase.

This catches people off guard. The W-2 income is locked in at purchase date FMV. The capital loss is a separate item on Form 8949 and subject to the normal capital loss deduction limits if it exceeds your gains.

For what it's worth, I ran the numbers on my own ESPP: even taxed as ordinary income at my top marginal rate, the net after-tax return on the discount was still substantially positive compared to leaving that money in my savings account for the same period. The math almost always works in your favor with a 15% discount plan.

If your plan has a lookback AND a 15% discount, you are genuinely getting a valuable benefit. I've seen people opt out because they heard "it's taxed as ordinary income" and thought that wiped out the gain. It doesn't — it just means it isn't preferentially taxed. Ordinary income tax on a 15% guaranteed discount is still a good deal.

Priya C.

Author

This whole thread convinced me. I'm enrolling. Going to contribute what I can afford to sell at each window and keep records from day one so the Form 8949 adjustments are straightforward.