Get your taxes done using TurboTax

You may have a very small amount of gain/loss on the sale if you sold them the same day.  This is due to pricing fluctuations throughout the day.  Your 1099-B may or may not have the accurate cost basis reported, so make sure it is correct.  Most companies will also send you an Advice of Sale (or similar form) showing the Fair Market Value, taxes, etc.  which can help you determine the basis for each particular lot sold.

There is a difference between Restricted Stock and Restricted Stock Units (RSUs).  I'm going to assume you have the latter.  In this case, your "cost basis" is generally the Fair Market Value on the date your options were vested. (which is the same amount that is included on your W-2). 

What's the difference between restricted stock and a restricted stock unit (RSU)?

https://ttlc.intuit.com/replies/5366545