Walmart has averaged a 4.9% increase in monthly visits since the start of 2022 compared to the same period in 2021, Placer.ai data showed, despite supply chain challenges and pricier fuel that have led shoppers to make fewer grocery store trips.

Analysts have also been upbeat about Walmart's ability to diversify its revenue base through advertising and to keep prices low when compared with rivals that are struggling.

"What we found is pricing is still lowest at Walmart and they've done a very good job of keeping prices low to maintain and widen the price gaps with the competition and providing the best value for the consumer, even in an inflationary environment," Telsey Advisory group analyst Joseph Feldman said.

Guggenheim analysts said Walmart is a "top pick" during inflationary times, in a note on Monday.

"We believe Walmart will continue to deliver impressive top- and bottom-line performance amidst the evolving pandemic environment regardless of tougher consumer spending patterns."

Investors are already piling in. Walmart's stock is up about 2% on the year to Friday, in contrast to the S&P 500's nearly 16% decline.

Grocery prices shot up 10.8% in April, the largest year-over-year jump since 1980, while the cost of a gallon of gas fell 6.1% but was still up nearly 44% from a year ago.

Walmart Chief Financial Officer Brett Biggs in March said that consumers were keeping their eyes on inflation and that rising fuel prices would cause consolidation in shopping trips.

"You'll tend to see fewer trips. You'll tend to see bigger baskets, which again, bigger baskets is really our sweet spot," Biggs said at a Bank of America Conference.

Refinitiv estimates the Bentonville, Arkansas-based retailer will eke out gross margins of 24.55% in the quarter, up from 24.43% in the previous quarter, with revenue rising 0.4% to $138.883 billion. Earnings per share are estimated to be $1.48, down from $1.69 last year.

"Walmart stands to benefit from increasing trip consolidation, a healthy price gap to national chains, and accelerating inflation trends," Gordon Haskett analyst Chuck Grom said.

The company has set its sights on growing its $12.99-a-month Walmart Plus membership to challenge Amazon's Prime, priced at $14.99 monthly. Walmart Plus, which launched in September 2020, offers delivery services and gas discounts but is still struggling to make ground against Amazon.

A recent report by eMarketer citing Bizrate showed that only 15% of U.S. adults used Walmart's Plus service compared to 62% for Amazon's Prime.

(This story corrects last name of Walmart CFO to "Biggs" from "Briggs" in paragraph 9 and 10)

(Additional reporting by Siddharth Cavale; Editing by Bernard Orr)

By Arriana McLymore and Aishwarya Venugopal