I sold stock this year (2016) and am not sure I figured out the tax correctly.
value of stock at time of death. There are web sites that will show history of stock values. if stock price at market close on date of death was 45 and you sold at 50 per share then you have gains. if you sold at 35 per share then you have losses