BENTONVILLE, ARK. — Strong grocery sales and continued e-commerce growth in the first quarter led Walmart, Inc. to raise its outlook for the year. The company now expects earnings per share and operating income in the United States to increase in the high single digits.     

Walmart’s net income in the first quarter ended April 30 was $2.73 billion, equal to 97¢ per share on the common stock, down 31% from $3.99 billion, or $1.40 per share, a year earlier. Net sales were $137.16 billion, up 2.6% from $133.67 billion. Adjusted operating income in the first quarter was $6.9 billion, up 32% from $5.2 billion the year before.

Stimulus checks and rising COVID-19 vaccination rates helped offset the impact of severe weather storms across much of the United States early in the quarter, said M. Brett Biggs, chief financial officer at Walmart, during a May 18 conference call with analysts.

“It started out a little challenging with the weather we had in February, but we saw the business strengthening as we went through the quarter,” Mr. Biggs said. “Some of that is going to be stimulus ... but you’re seeing customers get back out again because it feels like things are opening back up, particularly in certain parts of the country.”

Walmart saw more shoppers head to its stores as well as its website as they prepared to socialize again, he added. Comparable sales in the United States grew 6%, driven by a 37% increase in e-commerce sales.

The company’s grocery business benefited from better sales mix, said John R. Furner, chief executive officer and president of Walmart US.

“Food was more balanced this year than what we would have seen last year,” he said. “Last year, we were really heavy in dry grocery and stock-up items as the pandemic began. The strength and share gains that we saw in the first quarter in food, most specifically meat, produce, bakery and grocery, but leading in the fresh areas, is certainly helpful.”

Executives also highlighted growth in the new Walmart+ initiative. Launched in September, the program offers unlimited free delivery on a variety of items, including grocery and household goods, and in-app payment options. The initiative will be key to retaining new customers acquired during the pandemic, Mr. Furner said. The number of Walmart + members reached a record level in the first quarter with significant increases in first-year member renewals, he said.