Can I deduct a loss in stock sales?

I bought stock in 2000 and sold in 2016 at a loss.