Blog Post

Tax Reporting For Employee Stock Purchase Plan (ESPP)

Monday, March 24, 2008. 12:31 pm. Posted by Josh.

I recently discovered that there are special tax laws regarding gains made from selling stock acquired through an Employee Stock Purchase Plan (ESPP). Below is the result of my research to understand these laws.

Normal Stock Transactions

In a normal stock transaction, you report a capital gain and pay tax on any money you make on the sale of the stock beyond what it cost you to buy the stock:
Capital Gain = Total Sale - Total Cost

If you were selling a batch of stock that was all purchased at the same time at the same price, this calculation can be very simple. However, it can become complex when you sell a batch of shares that have multiple purchase dates and prices. Most brokerages will keep track of this information and just tell you what your gain is for that sale thus facilitating tax reporting.

Aside from calculating your gain, the other thing you have to look at is how long the shares were held. If there were held for less than a year (short term), it will be taxed differently than shares held longer than a year (long term). Again, your brokerage's year end report should break this down for you.

Tax Reporting For ESPPs

An Employee Stock Purchase Plan is a program offered by your employer that allows you to purchase shares of the company's stock often at a discounted price. The program will usually have an offer period during which you will have a payroll deduction that goes into a holding account. When the offer period is over, the money in that account is converted to stock.

When you sell the stock, you will have a gain or a loss based on what you paid for the stock and what you sold it for. On the surface, this appears to be just another regular stock transaction, but as I found out, there is a significant difference. The difference is that the amount of discount you received when purchasing the stock will have to be reported as ordinary income (not capital gains).

Consider a plan where you get a 10% discount on your stock. At the end of the offer period, the market price for a share is $10. With your 10% discount, you pay $9 per share. If you bought 100 shares, you just got a discount of $100 ( (10 - 9) * 100 ). That $100 should be reported as ordinary income, and instead of using $9 per share as your cost basis for your shares, you use $10 per share.

The above example is overly simplified to demonstrate the principle. However, the actual law is quite a bit more confusing. Different rules apply if you sell your shares after holding them for at least two years (Qualified Distribution) than if you hold for less than two years (Disqualified Distribution) so we will examine each separately.

Disqualified Distribution

In a disqualified distribution, you held your shares less than two years. If you held less than one year, they are also a short-term gain.

To calculate the total amount of discount that must be reported as ordinary income, you must take the market price on the day the shares were purchased, minus the actual price paid (the discounted price), times the number of shares:
Discount = (Market Price Per Share - Discounted Price Per Share) * Number of Shares

The discount amount should be included in your ordinary income (Wages, Tips, etc). For a disqualified disposition, your employer should INCLUDE this in the box 1 (wages) of your W-2. Mine did, and in box 14 (other), they listed ESPP DISQ DISP and the amount of the discount that was ALREADY included in my box 1.

If you used the actual discounted price as the cost basis, you would be double taxed on the discount amount as it will be included in both your ordinary income AND your capital gains income. When you do your capital gains worksheet (Schedule D), you should use the Market Price as the cost basis of these shares thus avoiding the double taxation.

Qualified Distribution

A qualified distribution is a sale of shares held more than two years. This automatically means it is also a long term capital gain since it has been held for more than one year. The rules for a qualified distribution are slightly different than for a disqualified one.

First, you still have to calculate the amount of discount that your received on your shares. However, this is done by taking the LESSER of two calculations.

First, calculate the actual gain based off of the discounted price:
Actual Gain = (Sell Price Per Share - Discounted Purchase Price Per Share) * Number Of Shares

Second, calculate the discount based off the offering price (this is the market price per share on the beginning of the offer date):
Discount = Market Price on Offer Date * Discount Rate% * Number of Shares

Take the smaller of these two numbers and this is the amount that you must report as ordinary income. However, unlike a disqualified disposition, the amount is most likely NOT already reported by your employer in box 1 of your W-2. That means that you must manually add this to your income (wages, salaries, tips, etc).

Again, you need to adjust the cost basis of your shares upward by the amount you reported as ordinary income so that you are not double-taxed on that amount.


Overall, the wording of the laws is fairly complex. It took me many hours of research to get to a point where I now have a pretty good understanding of what to do for these types of transactions. I have put together a spreadsheet to help me do my ESPP reporting. You can download it here and use it to help you in your own reporting.

I dedicate these two ESPP Tax Calculations files to the public domain so feel free to use them any way you wish.
ESPP Tax Calculations.ods - Open Document Spreadsheet format for
ESPP Tax Calculations.xls - MS Excel spreadsheet


TurboTax Page Regarding ESPP
Fairmark Page Regarding ESPP Qualified Distributions
IRS Publication 525 - PDF File 1.1MB


I am not a tax professional, so this information should not be taken as tax advice. I'm simply stating how I have handled the situation.

Posted in: Finance , Taxes , Tips
This article has been viewed 55991 times.
Comments: 28


Post Comment

Tuesday, April 1, 2008. 3:38 pm. Posted by Josh.

This appears to be a hot topic (at least for my little blog). I guess I'm not the only person out there who realized there was more to an ESPP than meets the eye.

Monday, April 14, 2008. 4:05 pm. Posted by Josh.

Alright! My first post to go over 500 views!
Hope people are finding it interesting!

I will be curious to see what happens after tomorrow (Tax deadline). Will the view drop significantly?

Thursday, April 24, 2008. 10:46 am. Posted by Josh.

Looks like I was right. Interest in this post has dropped off quite a bit since the tax deadline. Now I will be interested to see if it picks up again next tax year.

Saturday, April 26, 2008. 5:25 pm. Posted by Taxed.

Hi Josh,

Thank you very much for your article on calculating ESPP taxes. Your spreadsheets are wonderful! Thank you for sharing them.

Monday, April 28, 2008. 1:24 pm. Posted by Josh.

My pleasure. My goal of writing the article was to give people the benefit of the research I had already done on the topic. Glad you were able find it useful.

Sunday, May 4, 2008. 12:06 pm. Posted by David.

How about commissions/fees? Shouldn't these be subtracted from the sale total?

Monday, May 5, 2008. 10:54 am. Posted by Josh.

Yes, you're correct. Your proceeds from the sale would be your sales dollars - commissions/fees - purchase cost. I think most brokerages supply you with proceed numbers that already have the commissions subtracted. I know TDAmeritrade and Fidelity do.

Thursday, October 2, 2008. 3:23 pm. Posted by PlayHard-PlayFair-HaveFun.

Very well written. I've been meaning to read this, and just got around to doing so today. I hope you didn't explain it so well that people report correctly and reduces another revenue source for IRS (and State) tax auditors. ;}

Tuesday, October 7, 2008. 1:01 pm. Posted by Josh.

That might be, but the way I understand it, the IRS has plenty of money. In fact, I got a call from a "government worker" the other day saying I was going to get $5000 just for paying my taxes on time! Yeah right. To read about this phone scam, see my post:

Phone Scam Claims Government Wants To Give You $5,000 For Paying Taxes On Time

Sunday, February 15, 2009. 1:46 am. Posted by guitarmom.

Thanks for your well-written explanation of tax calculations for ESPP sales. This explains things very well when you sell your stock for a profit. But what happens when you sell ESPP stock at a loss?

Is the loss a Capital Loss or a reduction of Ordinary Income, or some hybrid of the two? (Our sale is a qualifying sale.)

Monday, February 16, 2009. 1:37 pm. Posted by Josh.

guitarmom -

I believe the correct answer is to treat it all as a capital loss and not report any ordinary income.

From IRS Publication 525:

Any excess gain is capital gain. If you have a loss from the sale, it is a capital loss, and you do not have any ordinary income.

Also see the reply in this forum:,182

I am not a tax professional, so this information should not be taken as tax advice. I'm simply stating how I have handled the situation.

Sunday, April 12, 2009. 6:57 pm. Posted by uncle sam's servant.

your explanations confirmed my understanding of handling espp sales. thanks! what i find annoying is one can't really tell if the company includes the discounted amount in box 1 of the w-2 (my box 14 lists a totally different thing casdi amount). an indication that amount has been reported in w-2 is the difference between box 1 and box 3, but i guess a call to payroll definitely gives the right answer.

Tuesday, April 14, 2009. 2:31 am. Posted by DM.

Thanks for this informative post, I keep relearning this stuff every tax season, good to find it all in one place.

Wednesday, April 15, 2009. 10:56 pm. Posted by Mack.


Very good summary - succinct and clear. It helped with my 2008 taxes and made me realize that I overpaid in prior years.


Tuesday, April 28, 2009. 10:04 am. Posted by Josh.

Mack -

If you over paid in previous years, you may want to consider re-filing for those years. I re-filed 3 years and ended up getting about $1000 back. Well worth the few hours it took to do the paperwork.


Saturday, May 16, 2009. 1:10 pm. Posted by Scott.

I have the irs trying to add the entire amount of employee stock that I sold in 2007, but I have already paid taxes on this money because it is an after tax deduction. My total capital gain was only $385. Does the irs have the right to add all of my $2900 on to my tax return or just the gain?

Tuesday, December 29, 2009. 2:47 am. Posted by yazehu.


First off, great post! I've been trying to learn about this topic for some time and you managed to boil it down very nicely!

One quick question, in the section on Qualified Distribution, you refer to Market Price on Offer Date which you explain as being "the market price per share on the beginning of the offer date". Can you clarify this further? Given that ESPP purchases are made bi-annually (at least in the program that I'm enrolled in), are you referring to the price at the beginning of the 6 month period? Or something else?

Monday, April 12, 2010. 7:13 pm. Posted by John,.

2 Comments - If it is a Qualifying disposition (>1yr after purchase AND >2yrs after offer date) then any loss is LTCL, BUT if it is disqualifying, then you still have OI on the discount, even if you lose money!

Also, TurboTax (and you) and others I have seen say that your OI is Either 15% off the Market price at Offer date Or Sale price - Purchase price, whichever is less. However, this has never seemed correct to me. Let me give an extreme example.
The Market price at the beginning of the offering period, the Entry price is say $100. Now the stock tanks, and 6 months later your company uses your money to buy some at 10% off of the current market price of $20, or for $18. Your REAL discount is $2/share - remember this! Now another say 3 years goes by and you sell your stock for $110! You want to calculate what is OI and what is LTCG. According to what this Blog says and Turbo Tax says you have two choices for Ordinary Income:

Monday, April 12, 2010. 7:14 pm. Posted by John.

[[[MktOffer*Discount]) = $12. Here it makes sense because this matches your actual discount. You can make a more extreme example and I have seen it argued both ways, but paying more than the actual discount in OI just doesn't make sense to me.
(YMMV - Not professional Tax advice!)

Monday, April 12, 2010. 7:31 pm. Posted by John again....

It cut out some of what I posted, so I'll try again:
Actual Gain per share = Sell Price Per Share - Discounted Purchase Price Per Share or $110 - $18 = $92, LTCG is 0$ -OR- Discount = Market Price on Offer Date * Discount Rate% = $100 * 10% = $10! Now you really only received a $2 discount, so IMHO that should be the OI per share, not $10; and the other part of the gain, $90 should be LTCG. If you change the example so that the Market-Offer price is BELOW the purchase price then the 'problem' goes away and it all makes sense: $100 Market-Offer, You buy later at say $120 - 10% or $108. You sell 3 years later at $150. OI is LESSER or $42 the Actual gain -OR- $12 MktOffer*Discount = $12. Here it makes sense because this matches your actual discount.
John (part2)

Monday, April 12, 2010. 7:32 pm. Posted by John,.

You can make a more extreme example and I have seen it argued both ways, but paying more than the actual discount in OI just doesn't make sense to me. I don't really think Pub 525 is that clear on this situation - there is no example there.
(YMMV - Not professional Tax advice!)
John (part 3)

Thursday, June 17, 2010. 2:30 pm. Posted by ESPP_Participant_MY.

I came across your site looking for clarifications for the ESSP DISQ Dispositions and found your Excel file very usefull. You may want to update the formula to include Capital Losses for Qualified dispositions so that formula does not produce negative ordinary income.

Thanks again for the writeup and the excel spreadsheet.

Tuesday, January 4, 2011. 3:25 am. Posted by Charlie.

I just noticed these posts, which appear to be about 9 months old and not active anymore. I'm not sure if anyone is still responding to questions but if so I have the same question that was originally asked by John about the treatment of the ESPP discount as ordinary income. It does not appear that John's question was ever answered.

Like John, it also does not seem correct to me that the amount of discount that you must report as ordinary income is based on the offer price in the case when the stock price decreases and the actually discount you receive is based on a purchase price that is lower than the offer price. I also haven't found any clear documented evidence that this is in fact the case. Does anyone know for sure whether the ordinary income received from the 15% discount is always calculated based on the original offer price and never based on the actual discount that was received?

Friday, March 4, 2011. 6:40 am. Posted by Anonymous.

Thanks for posting this! This explains it better than any place I've been so far! Think you just saved me from having to get a tax professional to help me figure it out.

Tuesday, April 19, 2011. 11:12 pm. Posted by stock tips.

I appreciate your post. I also wrote that SMS advertising provides a cost effective method of targeting promotions to specific customer profiles. You might want to remind customers of specific events or promotions, but for whatever reasons, SMS allows you to pass information directly to the right customer at very affordable prices and fast delivery.
Stock Tips

Friday, April 13, 2012. 7:51 pm. Posted by DanKline.

As ESPP_Participant_MY mentioned, I think the formula for O2 (discount amount) should be updated to not go negative. After doing this, i was able to match my employer's (major corp) payroll department calculation. Here's updated O2 calculation:

For O2:

Wednesday, March 27, 2013. 9:05 pm. Posted by Tammy.

Thank you- this was really helpful!

Wednesday, February 4, 2015. 3:32 pm. Posted by Johnny Taxpayer.

Although this is the most clear and simple explanation I've seen yet... it still makes my head explode. And it seems Fidelity's terminology does not jive with Turbo Tax... I had to "rig" the forms to get it to look right, but it makes me uncomfortable. You had me up until the part about adding money onto my W2 income? You mean tack the added up "Ordinary Income" numbers on my Fidelity sheet to my adjusted gross income, so that number will now look different than what's on my W2 Box 1? It appears Turbo tax wanted to put that amount into my INTEREST section, and I'm lost. Long story short... I'm calling an accountant!

Blog News
Building Our House
Compact Fluorescent
Energy Efficiency
Gas and Oil
Global Warming
Human Behavior
Lawn Care
Planting A New Lawn
The Environment
Web Picks
March 2011 (1)
March 2010 (3)
February 2010 (1)
November 2009 (1)
October 2009 (1)
May 2009 (1)
April 2009 (1)
March 2009 (2)
February 2009 (4)
January 2009 (2)
December 2008 (1)
November 2008 (2)
October 2008 (3)
September 2008 (3)
August 2008 (2)
July 2008 (2)
June 2008 (5)
May 2008 (5)
April 2008 (4)
March 2008 (1)
February 2008 (6)
December 2007 (3)
November 2007 (5)
October 2007 (4)
September 2007 (8)
August 2007 (11)
July 2007 (13)
June 2007 (15)
May 2007 (24)
April 2007 (4)
RSS Feed Link
Add to Technorati Favorites