Walmart has today forecast a smaller fall in annual profit as demand for groceries holds up despite higher prices, while discounts on clothing and electronics attract more inflation-hit shoppers to its stores.
The company also raised its full-year net sales expectations and announced a new $20 billion share buyback plan, pushing its shares up 7% in premarket trading.
Its results boosted stocks of other major retailers including Target and Macy's.
Sales of food and other essentials that fill much of Walmart's shelf space have proved resilient, even as shoppers cut back on discretionary spending amid decades-high inflation.
Average transactions at its Walmart US business rose 2.1% in its third quarter ended October 31, compared with a 1% rise last quarter, while average bills rose 6%, mainly due to inflation.
"Walmart US continued to gain market share in grocery, helped by unit growth in our food business," chief executive Doug McMillon said in a statement.
"We significantly improved our inventory position in the third quarter, and we'll continue to make progress as we end the year," he added.
Walmart enters the key Christmas quarter with inventories valued at nearly $65 billion, up from about $60 billion three months ago.
Chief Financial Officer John David Rainey told Reuters the 13% rise in value of the inventories was 70% inflation driven but on a unit basis was "much lower."
The company also forecast its holiday quarter US same-store sales, excluding fuel, to increase about 3%, below estimates of a 3.4% increase. Rainey attributed the forecast to a cautious outlook on the consumer.
FedEx and Amazon have warned of a slump in holiday season demand in recent weeks.
Fourth-quarter adjusted earnings per share for Walmart are expected to decline 3% to 5%, compared to analysts' estimates of a 4.5% fall.
For the full-year, the Arkansas-based chain said it expects fiscal 2023 adjusted earnings per share to fall 6% to 7%, compared to its previous forecast of a 9% to 11% decline.
Net sales, however, are expected increase 5.5%, compared to its previous forecast of a 4.5% increase.
Walmart swung to a third quarter loss of $1.8 billion due to $3.3 billion in legal settlements to resolve US state and local lawsuits accusing it of mishandling opioid pain drugs.
Reuters reported Walmart's settlement, along with those of CVS Health and Walgreens Boots Alliance earlier this month.
Total third-quarter revenue rose 8.7% to $152.81 billion, beating analysts' estimates of $147.75 billion, according to Refinitiv IBES data, while adjusted earnings per share came in at $1.50, above the consensus of $1.32.