BENTONVILLE, Ark. (AP) -- Walmart raised its annual outlook after a strong second quarter for the world's largest retailer thanks in part to strong online grocery deliveries.
Sales at stores opened at least a year rose 2.8%, its 20th consecutive quarter in the right direction.
U.S. online sales increased 37%, driven by grocery sales.
Walmart continues to hold enough sway to keep prices low even as its costs are rising and it's pushing its online operations aggressively to counter Amazon.com.
The company launched limited free next day delivery in May with an order of at least $35 and plans to expand that service nationwide this year.
But an escalating trade war with China is looming.
Walmart and other major retailers have been left largely unscathed by the first several rounds of tariffs since they focused more on industrial and agricultural products.
That is changing.
Retailers are bracing for a 10% tariff targeting goods like toys, clothing and shoes. Those tariffs, scheduled to go into effect in September, have been delayed until December after the Trump administration voiced concern about the impact on consumers and businesses during the holiday season.
Being forced to raise prices, or eat additional costs because of new tariffs, is becoming a significant threat for Walmart and everyone else with indicators flashing warnings signs of a coming recession.
Walmart said Thursday that it continues to monitor the ongoing trade talks has over the last few months been able to manage prices and profit margins.
The big question is whether Walmart's customers will be willing to pay higher prices. Macy's on Wednesday said that its customers are balking at paying more after the company hiked prices on some goods to offset a 25% tariff implemented on them.
Shares of Macy's plunged 13% after it cut its outlook for the year.
Walmart's business appears to be unscathed by the trade wars. It reported quarterly profit of $3.61 billion, or $1.26 per share, after reporting a loss in the same period a year earlier. Per-share earnings, adjusted for non-recurring costs, were $1.27. That's a nickel better than Wall Street had expected, according to a survey by Zacks Investment Research.
Revenue was $130.38 billion.
Walmart is still reeling from a mass shooting at one of its El Paso, Texas stores that killed at least 22 people late last month. The tragedy raised more pressure on Walmart end gun sales in its stores, though it's given no indication that it plans to do so.
CEO Doug McMillon said that company "will be thoughtful and deliberate in our responses," and last week it ordered workers to remove video game signs and displays that depict violence from stores nationwide.
In a presentation Thursday, McMillon said that the company plans to take additional actions to create a safer environment in its stores and is considering broader issues related to gun violence.
Walmart stopped selling handguns in every state but Alaska in the mid-1990s. It stopped selling military-style rifles such as the AR-15 in 2015 and last year it raised the age limit to purchase a firearm or ammunition to age 21.
The company accounts for approximately 2% of all gun sales in the U.S. annually, according to Walmart.
Shares of Walmart Inc. are up more than 5% before the opening bell.
Follow Anne D'Innocenzio on Twitter
Portions of this story were generated by Automated Insights (http://automatedinsights.com/ap) using data from Zacks Investment Research. Access a Zacks stock report on WMT at https://www.zacks.com/ap/WMT