For a business expected to lose nearly $2 billion this year, Wall Street sure is high on Walmart.com.
On Thursday the company reported its second-quarter earnings, which topped expectations and raised its outlook for the full year, building on the momentum in its core U.S. business, online operations and investments into grocery.
For nearly 20 years now, Walmart, the world's largest retailer, has struggled to pull its online act together while rival Amazon.com seized nearly half of the U.S. online shopping market, as well as building a big presence abroad. But in recent years the Bentonville, Arkansas-based behemoth has begun to evolve toward the online giant it can become.
The company's multibillion-dollar investment campaign — from the acquisitions of U.S. etailer Jet.com in 2016 and a 77% stake in India-based web marketplace operator Flipkart last year, to a doubling of its spending on e-commerce and other information technology to $5 billion a year since 2014— seems to be paying off in the form of online sales that are beginning to rejuvenate the entire long-slumbering colossus.
"Walmart.com seems to be changing the conversation among shoppers," Morgan Stanley analyst Simeon Gutman said. "Traditionally, there's been a stigma among a high percentage of the population that doesn't shop its stores. Walmart's progress indicates that it's broadening its customer base. What Walmart stood for five years ago is different today. Now they'll be seen as a broad-based consumer market like Amazon, not a discounter."
So how did Walmart turn its ocean liner of a business in a better direction — one that has let shares rise nearly 24% in the last year versus 0.02% for the S&P 500? Fiscal 2019 online sales gains of 40%, and another 37% in the first half, accounted for about half of Walmart's entire U.S. growth in same-store sales.
Walmart didn't respond to requests for an interview with Walmart.com CEO Marc Lore, who came to the company from Jet.com. Amazon also declined to make senior executives available.
The key, for now, has been to pay less attention to Amazon and instead focus Walmart.com more on grocery, a category Walmart dominates in physical stores, CFRA Research analyst Garrett Nelson said. Its goal is less to catch up to Amazon than to join the Seattle online giant in clobbering other offline stores as retailing in general consolidates — something Walmart has done since its big boxes first spread across the U.S., Goldman Sachs' Kate McShane said.
Then the final key to turning profitable will be to expand Walmart.com's reach into categories like apparel and shoes that have wider profit margins than groceries, Morgan Stanley analyst Gutman said.
"We think they have been successful," Nelson said. "They have found their footing in e-commerce and focus — and that's mostly grocery so far. They've been spending a lot of capital expenditures, and it will pay off in higher same-store sales growth."
The change traces to when CEO Doug McMillon took over Wal-Mart Stores in 2014, Gutman said. The company began investing much more heavily in its Web site, and getting to work in earnest on integrating its site with in-store pickup of groceries, a move now expanding rapidly into delivery.
By next January, Walmart will offer in-store grocery pickup at 3,100 stores and delivery from 1,600 dedicated logistics centers, Nelson said — numbers well ahead of the 500 Whole Foods stores Amazon has, or the nearly 90 metro areas where spokeswoman Carly Golden said Amazon offers two-hour delivery from Whole Foods.
"When it comes to grocery, Walmart doesn't need to adapt to Amazon," Forrester Research analyst Brendan Witcher said in an interview. "In grocery it's quite the opposite.''
About half of Walmart's U.S. sales are in groceries, or consumable goods, Gutman said. But Witcher points out that the 2% of U.S. grocery sales now made online, where most consumers shop only occasionally, has far more room to grow than the 15% of sales made online overall.
"People will use buy-online and pickup at the store to do their general shopping, and then go to the store to pick up items they want to touch and feel, like most meat and produce," Witcher said.
Walmart's first edge in grocery is size. Nelson said its total sales are bigger than the No. 2 through No. 25 grocery store chains put together. That means more ability to invest in warehouses and more refrigeration points where the company can keep meat or vegetables closer to consumers, he said, helping omnichannel plans like in-store pickup and delivery.
"For Amazon to win would require a substantial investment, especially in refrigeration," Nelson said. "And they don't seem inclined to do that, because Amazon Web Services is a much higher-margin business.''
Then there are projections that more grocery business will move online as consumers get used to the idea. As many as 70% of households will regularly buy packaged-goods groceries online by 2024, says a 2018 study by the Food Marketing Institute and Nielsen.
Walmart has always been a savvy user of technology in its stores, driving productivity gains that helped it cut prices, which in turn made it the dominant retailer in America by the time Amazon launched in the mid-1990s. The Food Marketing Institute study says many of those same characteristics — especially the ability to control inventory management and crunch consumer data, at which Walmart excels — are the keys to success in online grocery.
That push to invest in back-end technology is continuing now and will help the push to build up Walmart's e-commerce business. By fall, Walmart.com will be testing a new, in-home grocery delivery service that would allow the retailer to deliver items directly to a customer's refrigerator, even when the customer isn't home. The service, called InHome Delivery, works by way of "smart entry technology," combined with proprietary cameras worn by the delivery associates that let the customer closely watch the delivery take place. Walmart associates will even go so far as organizing customers' refrigerators and accepting returns of previously bought items the customer leaves on a kitchen counter.
The service will roll out first in Vero Beach, Florida; Pittsburgh; and Kansas City, Missouri, with a potential reach of 1 million customers, the company said. A pilot test of automated vehicle grocery delivery in Arizona was announced in July.
In the stores, efforts like using artificial intelligence to monitor meat inventory and technology that lets associates stack groceries to the stores' ceilings are expected to help the online business as well.
All of this will help turn Walmart.com toward profitability, and slowing down the wave of investment that has gotten Walmart to this point will add a second boost to the parent company's pocketbook, Gutman said.
But the next step will be to build up the general merchandise part of Walmart.com, especially in higher-margin categories like apparel and shoes, Gutman said. Flipkart will help Walmart learn tricks of building high-profit marketplaces for other merchants to use Walmart's sites as a platform, a business in which Walmart is much smaller than Amazon, he added.
Only then will the e-commerce losses at Walmart disappear, he said. In the meantime, Walmart's size and financial resources give it staying power.
"You have to believe in the concept that this is not a game with one winner," Gutman said. "This is the moment of truth. Their earnings before interest and taxes have been down 20% (largely because of e-commerce investment) since Doug's first year, and it's just turning this year."
It may not sound like much, but for a ship as large as Walmart, with sales expected to top half a trillion dollars this year, mid-single digits is a lot of money. And as Gutman said, aiming for growth in that range is how a big player like Walmart can balance the near-term profitability Wall Street wants now and the growth it needs for the future.
For more on iconic global companies and executives embracing change and transforming for the future, join us live at CNBC Evolve, a summit for business decision makers seeking to innovate.