Walmart (WMT 0.22%) made waves last week when it reported better-than-expected earnings results, and the stock is up around 10%.

There is a lot to like with Walmart right now. It is favorably positioned to benefit from a consumer base continually getting squeezed by inflation. The low-price model of the business, coupled with the mounting convenience of its e-commerce segment, makes the stock a compelling play.

A growing e-commerce business

The big news in Walmart's fiscal 2025 first quarter was its growing strength in e-commerce. In particular, the home delivery part of the business grew at a rate that outpaced store pickups for the first time.

In all, global e-commerce sales were up 21%. I love to see this, as it shows that Walmart can compete with Amazon (AMZN 0.39%) online. The combination of its traditional in-store business, coupled with their rising e-commerce business, continues to make Walmart one of the most compelling plays in retail.

The second big piece of news that I like for Walmart is the growing gap for consumers between eating in and dining out. According to an article from CNBC, Chief Financial Officer John David Rainey summed it up: "It's roughly 4.3 times more expensive to eat out than it is to eat at home, and that's benefiting our business."

The effect of this gap is visible in the results of some restaurants and fast-food chains. Starbucks, for instance, had disappointing sales results early this year.

This is how Walmart stands to win as consumers have to make decisions around their spending habits. According to a CNBC article, foot traffic for fast food restaurants and fast-casual restaurants declined by 3.5% in the first quarter.

The most competitive

In an economy where inflation is still prevalent, investing in a retailer that can provide the essentials (food, toiletries, and the like) at the lowest prices is the best bet.

The retail giant beat estimates on earnings and revenue in its most recent quarter, with revenue gains of 6% year over year to $161.5 billion, and adjusted earnings per share gaining 22.4% to $0.60 per share.

For the full fiscal year, Walmart's original guidance was for adjusted earnings of $2.23 to $2.37 per diluted share. In its latest report, Walmart revised that estimate to be at the high end of the range, or even slightly above.

That would give Walmart a forward P/E ratio of around 27 times earnings. For reference, the 5 year average according to Y charts has been around 31 times earnings.

Bag of groceries

Image source: Getty Images.

Difficult to ignore

With inflation still an economic factor impacting the consumer, especially in the United States, Walmart is just too well positioned to ignore.

According to CNN, some analysts have said Walmart's pricing advantage is roughly 25% below traditional supermarkets, and is bringing in new demographics. While the low price nature of the retailer has always been of benefit to low and middle income households, Walmart noted that part of its sales gains last quarter were due to an increase in higher income shoppers choosing to shop at Walmart.

To me, the titan of retail just checks all the boxes. It is growing its comp store sales. It is expanding its e-commerce game at double digit rates with strong performance in both order/pick-up and delivery, and most importantly, its main products it sells are the products people need the most. Groceries.