You don't pay taxes on the full amount of the sale, just the difference between what you sold the stock for and what you paid for the stock (cost basis).
Your first step will be to figure out your cost basis in the Walmart stock. Your cost basis will consist of your stock purchases plus your stock dividends throughout the years.
For example, let's say you paid $200 for 10 shares of Walmart stock during 2016 and $150 for 10 shares during 2017. You received $25 in Walmart dividends in 2016 and $20 in Walmart dividends in 2017. In 2017 you sold all 20 shares of stock for $500. Your cost basis of the stock will be [$200 + $150 + $25 + $20 = $395]. Therefore you will pay capital gains tax on $105 [$500 sales price - $395 Cost Basis]
You will receive a Form 1099-B for the sale of your Walmart Stock. When you put that into TurboTax, it will walk you through the process of reporting the sale of your Walmart Stock.
See the TurboTax FAQ below for more details:
https://ttlc.intuit.com/replies/3300454