You wouldn't know it from all the attention on the "Magnificent Seven" stocks, but Walmart (NYSE: WMT) has quietly trounced the market in recent years.
Over the last three years, the retail giant is up 140%, compared to just a 52% return for the S&P 500. It has easily outperformed archrival Amazon as well, which is up 92% during that period.
Where to invest $1,000 right now? Our analyst team just revealed what they believe are the 10 best stocks to buy right now. Continue »
Walmart has made smart investments in e-commerce and omnichannel fulfillment, including adding grocery pickup stations. It has also begun unlocking the potential of advertising on its e-commerce marketplace and beyond.
The company has executed well within its stores, managing inventory effectively and keeping prices low, which has helped it grab market share from competitors like Dollar General. It has also outperformed the retail sector during the recent inflationary period, as most of its sales come from consumer staples like groceries, for which it's easier to pass along price increases.
However, Walmart, which receives nearly one out of every 10 non-automotive retail dollars in the U.S., is back in the spotlight after it addressed the effect of tariffs.
Speaking on the recent earnings call, CEO Doug McMillon said: "We will do our best to keep our prices as low as possible. But given the magnitude of the tariffs, even at the reduced levels announced this week, we aren't able to absorb all the pressure given the reality of narrow retail margins."
He also noted that the cost pressure from tariffs began in late April and has accelerated through May.
Walmart's announcement caught the ire of President Donald Trump, who said in a Truth Social post that the company "should STOP trying to blame tariffs as the reason for raising prices," and said Walmart should "EAT THE TARIFFS."
Image source: Walmart.
Like any retailer, Walmart would prefer not to have to deal with tariffs. But the company is in a better position than its peers to pass along higher costs, and to perform well in an inflationary or recessionary environment.
First, Walmart makes most of its revenue from food. The company said, "We won't let tariff-related cost pressure on some general merchandise items put pressure on food prices," though it noted cost pressure on some imported items like bananas, avocados, and coffee.
Thanks to its economies of scale and ability to move around supply chains, Walmart will likely do a better job of managing the additional costs around tariffs than smaller retailers. Its strength in food also gives it an advantage, as customers will continue to visit its stores for groceries.
Since it can bring in customers with groceries, driving customer frequency, it can more easily sell general merchandise products like electronics, toys, or clothes than a competing retailer that doesn't offer groceries, like Best Buy or Kohl's.
Walmart has significant China exposure -- about 60% of the manufactured products it sells -- but its reputation for "everyday low prices," economies of scale, and strength in groceries make it more resilient in a trade war or a down economy than most of its retail peers.
While investors sent the stock briefly lower after Trump called out the retailer, its first-quarter earnings report showed that the company continues to operate like a well-oiled machine.
Same-store sales at U.S. stores rose 4.5% in Q1, and the company maintained its guidance for the year despite pressure from tariffs.
Plus, gross margin ticked up at U.S. stores, operating profits rose, and e-commerce and advertising sales were up 22% and 50%, respectively. This shows that Walmart is executing in its key growth categories.
The stock's valuation could put the brakes on growth in the share price, but the business looks as strong as ever. Even with the disruption from tariffs, the company's competitive advantages look poised to get stronger. The retail giant continues to look like a buy for long-term investors.
Before you buy stock in Walmart, consider this:
The Motley Fool Stock Advisor analyst team just identified what they believe are the 10 best stocks for investors to buy now… and Walmart wasn’t one of them. The 10 stocks that made the cut could produce monster returns in the coming years.
Consider when Netflix made this list on December 17, 2004... if you invested $1,000 at the time of our recommendation, you’d have $642,582!* Or when Nvidia made this list on April 15, 2005... if you invested $1,000 at the time of our recommendation, you’d have $829,879!*
Now, it’s worth noting Stock Advisor’s total average return is 975% — a market-crushing outperformance compared to 172% for the S&P 500. Don’t miss out on the latest top 10 list, available when you join Stock Advisor.
See the 10 stocks »
*Stock Advisor returns as of May 19, 2025
Jeremy Bowman has no position in any of the stocks mentioned. The Motley Fool has positions in and recommends Walmart. The Motley Fool has a disclosure policy.