Be careful here. I did my 2013 taxes wrong and will be ammending because I didn't do it right... and seeming employer's aren't doing it right at this point. my w2 had the right info, but did a bad job explaining it. My 1099B was flat wrong.
You need to make sure the W2 reflects the value of the discount you got. Mine included it in the gross pay, but had a section that subtracted that amount out for reporting my social security wages. Since the discount amount is included on the w2, your cost basis is increased to the market price when you acquired the shares. (NOTE - I technically "acquire" my shares on dec 31st of a year, but dont actually get to do anything with them for 2 weeks due to processing and such. In my example, you would use the market price on dec 31st to figure the discount amount, and to determine your actual cost basis.)
So, here's what you do:
-Determine the stock price that you purchased the shares for. This is "A."
-Determine the price of the stock on the day you "acquired" the shares. "B".
-Calculate B-A. This will probably show up on your W2 under the earnings summary, where they calculate your social security wages, as "Misc non-taxable Comp."
Your cost basis is now B. On form 8949, checking box A, put the information provided on your 1099B, but also do adjustments in column G to bring the cost basis up to the correct amounts. Put those calculated amounts on your scedhule D short term gains, and continue as needed.