The economy has been the defining story of 2022, and consumers and businesses alike have been scrambling to adjust to the ongoing macro headwinds. The most widely followed read on inflation -- the Consumer Price Index (CPI) -- rose 7.7% in October.

While that's an improvement compared to previous months, inflation is still near 40-year highs. That, combined with rising interest rates, has made it tough for shoppers to make ends meet. This would normally be a boon to discount retailers, including Walmart (WMT -0.05%) and Target (TGT -0.91%).

However, when the two companies reported results this week, they painted very different pictures, leaving investors scratching their heads. Let's take a look at the results to see what each company's results say about the state of the economy and their respective businesses.

A person wearing a mask pushing a shopping cart down a grocery aisle.

Image source: Getty Images.

Walmart

Walmart was first out of the gate this week, and its results were impressive, to say the least. For its fiscal 2023 third quarter (ended Oct. 28), revenue of $152.8 billion jumped 8.7%, or 9.8% in constant currency, as the company took a $1.5 billion haircut due to the strong dollar. This resulted in adjusted earnings per share (EPS) of $1.50, up roughly 3%. 

For context, analysts' consensus estimates called for revenue of $147.7 billion and adjusted EPS of $1.32, showing that Walmart results sailed past expectations. 

Further buttressing its performance were equally strong same-store sales, which grew 8.2% year over year, more than double the 3.4% expected by Wall Street. Walmart also saw a significant improvement in its inventory, which was up 12.6% year over year, but far better than the 25% year-over-year increase in the second quarter. Management estimated that roughly 70% of the increase was the result of inflation, making the situation far better than it appears at first glance. 

Management said that consumers shifted their purchasing priorities, focusing more on essentials than discretionary items. Perhaps the most eye-catching revelation, however, was the increase in market share among high-income shoppers. On the conference call, CFO John Rainey said that nearly 75% of Walmart's market share gains in grocery came from households with income of $100,000 or more. 

Finally, Walmart raised its full-year outlook and is now expecting net sales growth of 5.5%, up from its previous forecast of 4.5%. The company also expects a decline in adjusted EPS in a range of 6% to 7%, improved from its previous outlook, which called for a decline of 12% at the midpoint of its guidance. Finally, Walmart expects comp sales for the year to increase 5.5% (excluding volatile fuel prices).

It's important to note that this forecast is being negatively affected by currency headwinds, which management estimates will cost roughly $4.1 billion, the result of its international operations. 

Investors cheered Walmart's results, sending the stock up 7% in the wake of its earnings announcement.

Target

Target painted a very different picture when the company reported its results on Wednesday. For the third quarter, revenue of $26.5 billion grew 3.4% year over year. Slower sales growth and a declining gross margin hammered the bottom line, as EPS of $1.54 slumped 49%. 

To give the results context, analysts' consensus estimates called for revenue of $26.4 billion and adjusted EPS of $2.16, so Target wasn't even in the ballpark. 

While Target's same-store sales grew, it was at a much more modest pace, up 2.7%, driven by 1.4% traffic growth and a 1.3% increase in the average spent per visit. Its inventory levels were also disappointing, rising 14.4% year over year. Management said it's planning to offer deep discounts during the holiday shopping season to reduce excess inventory and attract more customers. 

Things went from bad to worse in terms of Target's outlook. Management noted that consumer spending has been sharply lower in October and November. Shoppers are buying mostly essentials and looking for deals on other items. As a result, Target lowered its guidance for the holiday quarter and is now expecting a low-single-digit decline in same-store sales, and an operating margin of about 3%, down from its previous forecast for low- to mid-single-digit comp gains and an operating margin of roughly 6%. 

Target also announced a restructuring designed to "simplify and gain efficiencies across its business." Management expects these efforts to generate savings of between $2 billion and $3 billion over the coming three years.

As of this writing, Target stock has fallen 13% in the wake of its disappointing financial report.

Which is a better buy?

Target's results were in stark contrast to Walmart, which was better able to attract shoppers trading down to lower-priced products and cheaper substitutes. Furthermore, over the past year, while Walmart shares are hovering near breakeven, Target stock has fallen more than 40%.

Given that performance, investors might be surprised to find that on a price-to-sales basis, Walmart and Target have nearly identical valuations, selling for 0.7 times trailing-12-month sales. Walmart's valuation is more expensive in terms of its price-to-earnings ratio, which is currently 29, compared to 18 for Target.

That said, given Walmart's recent results, and its history of performing well during periods of economic instability, I would argue that you get what you pay for - and Walmart is by far the better buy right now.