Renowned retailer Walmart (WMT 1.32%) doesn't need much introduction; it's the largest retailer in the world when ranked by revenue, and it has stores located within 10 miles of 90% of Americans. It's part of the Dow Jones Industrial Average, an index containing 30 of America's most prominent businesses.

People flock to familiar places when times get tough, and 2022 has been a tough year for the markets. That's made Walmart a popular name (as measured by the stock's hot valuation right now). But can Walmart justify its high price tag?

Walmart's low prices and massive size make it a haven for consumers, but the numbers show that it might not be a safe pick for your portfolio. Here is where shares could trade three years from now.

Losing ground to inflation

Walmart is a fascinating business; its $611 billion in annual sales makes it one of the world's largest companies by revenue. However, it generates only $12 billion in cash flow on all those sales; the company sells its goods at the lowest possible prices to squeeze out competitors who aren't large enough to match those prices.

But outsized inflation is proving to be a threat; Walmart's operating margin plummeted as inflation ramped up throughout 2022. Margins fell from about 4% in 2019 to just 3.3% today, falling 70 basis points (a 17% decline). It might not matter if Walmart was a tech company with fat margins. But since every basis point matters for such a razor-thin business model, it hurts.

WMT Revenue (TTM) Chart.

WMT Revenue (TTM) data by YCharts.

Revenue has grown by an average of 5% annually over the past three years, not an easy feat for such a large number. However, you'll see below that declining margins are more than offsetting revenue growth, making profits the more critical focus.

Dragging down earnings growth

Looking at the bottom line, the problems begin showing up; Walmart recently closed out its fiscal 2023 year on Jan. 29 and released fiscal 2024 guidance. Earnings-per-share (EPS) is poised to decline from $6.29 per share in fiscal 2023 to between $5.90 and $6.05 in fiscal 2024. Declining profits present two problems to shareholders.

First, declining earnings immediately make the stock more expensive. When valuing a stock using earnings -- the price-to-earnings ratio (P/E), for example -- investors divide the share price by EPS. A smaller denominator (EPS) makes the ratio go higher. Second, slowing growth (or declining EPS in Walmart's case) makes it less likely that investors will pay a higher valuation for the stock.

Unfortunately, Wall Street isn't expecting a quick rebound for Walmart's bottom line. Analysts expect an average of 5% annual EPS growth over the next three to five years. In other words, investors can expect the stock to return an average of 5% in annual price appreciation (plus 1.6% from the dividend), a mediocre return (assuming no stock valuation changes).

What Walmart's valuation means for investors

You might be disappointed if you hoped that Walmart's valuation would position investors for better returns. It could be the opposite, with the valuation dragging returns below Walmart's already pedestrian growth outlook. Using management's EPS guidance, the stock's P/E ratio is 23; do declining earnings and potential low-single-digit earnings growth justify that valuation?

Consider that the broader market, which averages 10% annual returns over the long term, trades at a forward P/E of 18; that's a 27% difference. That could mean virtually no investment returns over the next few years if Wall Street decides the stock deserves a multiple on par with the broader market. Does that mean it will happen? I wish I had the crystal ball to tell you, but the data doesn't look promising.

If you're looking for safe mid-single-digit returns, two-year Treasury bonds yield 5% today. The U.S. government guarantees the face value at maturity, so you wouldn't have to worry about volatility if you hold it. Walmart is an undisputed blue chip stock and one of the world's most dominant companies; however, the valuation you pay matters in investing. Walmart's current price doesn't match the harsh reality investors likely face moving forward.