Walmart (WMT  ) reported fourth quarter earnings that exceeded analysts' expectations on the top and bottom-line, sending shares 4% higher. The company also reiterated its long-term guidance for mid-single-digit earnings growth over the next 5 years.

Walmart was a major beneficiary of the pandemic as it saw a big spurt in growth due to stimulus payments, and many outlets for shopping being unavailable.

Inside the Numbers

In Q4, Walmart reported earnings per share of $1.53 which was better than estimates of $1.50 per share. Revenue also topped expectations at $152.87 billion vs. $151.53 billion.

Walmart's same-store sales increased by 5.6% which was in-line with expectations. The biggest contributor was grocery sales. E-commerce sales U.S. increased 1% but are higher by 70% on a 2 year basis. Overall, both website traffic and foot traffic to stores was higher by 3% and the company gained market share in groceries.

The company said that supply chain issues added $400 million to costs in addition to $300 million due to coronavirus-related impairments.

In 2022, Walmart expects 4% revenue growth and 3% same-store sales growth. It sees growth slowing in Q1 and Q2 due to higher comps from the stimulus.

Walmart's fastest-growing segment is Walmart Connect, which is its advertising business. This reached $2.1 billion with advertisers increasing by 130%. It also has some other promising endeavors with its fintech business and delivery network which is adding more stores and merchants including an expansion into India.

Walmart raised its dividend to $0.56 per share, and it plans to repurchase $10 billion of its stock in 2022. Walmart's stock could certainly keep underperforming in 2022 especially if consumer spending does slow. But, if the Fed pivots towards a more dovish direction, then that could signal a change in trend.

Over the last decade, Walmart has been a major outperformer due to rising consumer spending and low inflation. Over the past year, Walmart's stock price has been range-bound, while markets kept moving higher. Walmart tends to underperform in environments with accelerating economic growth as companies in other sectors offer more opportunities for earnings growth.

Now, the environment is marginally improving for Walmart. It tends to do better in inflationary environments as consumers prefer value and bulk. Also, defensive stocks like Walmart tend to see inflows in environments with heightened economic and monetary uncertainty.