Walmart (NYSE:WMT) just ended a record year on a high note. The world's leading retailer revealed this week that sales growth sped up over the holiday season as consumers consolidated shopping trips while spending more in areas like home furnishings and consumer electronics.

The company handled fewer customer visits in the fourth quarter, while peers like Costco continued to see higher traffic. But Walmart offset that slump with far higher spending per trip. Its outlook for the next year, meanwhile, includes a spending surge aimed at paving the way for more growth ahead.

A woman shopping for groceries.

Image source: Getty Images.

Growing quickly

Comparable-store sales gains landed at 8.6%, which kept Walmart's growth just below that of peers including Costco and Target. But the boost was a solid rebound from last quarter's slowdown to 6.4%.

Walmart credited stimulus checks for lifting demand in consumer discretionary areas like home furnishings, electronics, and sporting goods. Its grocery segment expanded quickly, too, as annual revenue rose by $35 billion to $560 billion.

But the biggest factor was increased spending per visit, which jumped 22% to more than offset an 11% drop in customer traffic as the pandemic changed the way people shopped over the holidays. Walmart got another big assist from its e-commerce division, which expanded 69%. "We completed a strong year and a strong Q4," CEO Doug McMillon said in a press release, "thanks to our amazing associates."

Soaring cash flow

Walmart's finances were just as impressive. Gross profit margin rose in Q4 as the digital division became more profitable and as shoppers tilted spending toward higher-priced merchandise. Expenses ticked lower, too, so that overall operating income jumped 17%.

The chain added more than $10 billion to its annual free cash flow as that metric jumped to $26 billion from $14.6 billion in the prior year. Earnings ended up 11% higher for the year. "The capabilities we've built in previous years put us ahead," McMillon said, "and we're going to stay ahead."

Looking out to 2021

Management is bullish about the new year, predicting that sales will rise in the low single digits, year over year, despite having soared in 2020. Earnings might trail that result a bit as the retailer spends more on priorities like higher wages and faster online fulfillment. McMillon signaled no impending slowdown in Walmart's growth posture, either. "This is a time to be even more aggressive," he said, in explaining why annual capital spending will jump to $14 billion from $10 billion.

That spending outlook might have contributed to the modest dividend hike Walmart announced for 2021. Its 2% uptick was the same rate investors saw last year and looks meager compared to the surging sales and profit metrics Walmart notched in the past year.

But shareholders can expect to see higher stock repurchase spending as they wait for Walmart's bold investments to start paying off in 2022 and beyond. The chain resumed aggressive buyback spending this quarter, and executives just approved a major repurchase plan that will cover the next few years.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.