​Walmart Inc., which had improved its e-commerce operations over the past year in its fierce battle with Amazon.com Inc., stumbled in the fourth quarter after misjudging its online inventory for the holiday season, sending its stock tumbling and slicing more than $31 billion from its market capitalization.

Walmart shares fell more than 10% Tuesday, with the downdraft pulling many retail stocks along. It was the biggest one-day drop in stock price since 1988 for the world’s largest retailer.

...