Walmart said its comparable store sales rose 4 percent in the three months ending in late January compared with a year earlier. The number of transactions at Walmart increased 4.3 percent, but the average ticket price decreased slightly 0.3 percent, a sign that shoppers spent slightly less on shopping trips.

The retailer’s U.S. online sales increased 17 percent and its global online sales increased 23 percent, surpassing $100 billion. Losses for the e-commerce business were slowing as the company spends less on fulfillment costs, John David Rainey, Walmart’s chief financial officer, said in an interview. He added that more customers were using Walmart’s delivery services, which helped reduce costs.

“Instead of delivering a Walmart delivery to one house on a cul-de-sac, we now deliver it to two or three houses on that cul-de-sac,” Rainey said.

Walmart is one of the first major retailers to report fourth-quarter earnings. Companies like Target, Macy’s and Kroger will do so in the coming weeks.

Compared to recent years, the last holiday season was largely free of the disruptions of the pandemic. Supply chain bottlenecks had eased, customers had returned to stores and inflation had slowed. Industrywide, holiday sales increased 3.8 percent, according to a National Retail Federation release in January. That was within the range the trade organization predicted in November.

At the same time, many retailers, including Walmart, focused on value last year as the economy cooled and shoppers became more selective. Walmart’s large grocery business and its emphasis on low prices helped protect it from sales declines reported by other retailers. The company said Tuesday that its strong comparable sales were supported by sales in its food business.

“In food, prices are lower than a year ago in places like eggs, apples and snacks, but higher in other places like asparagus and blackberries,” Walmart CEO Doug McMillon said during an earnings conference call.

Rainey said Walmart now carries a wider variety of private brands than it did two years ago as it catered to shoppers looking for lower-priced items.

Walmart also said it would acquire TV maker Vizio in a deal valued at $2.3 billion as it continues to grow Walmart Connect, its fast-growing advertising and media business.

Analysts expect retail sales to continue to moderate this year after a surge in consumer spending during the early stages of the pandemic.

Some signs are already appearing. Retail sales in the United States fell 0.8 percent in January from the previous month, according to data released by the Commerce Department last week. It was a bigger loss than expected. Inflation last month also cooled less than expected.

Still, Walmart sees this as a time to expand. On Tuesday, he said he expected both net sales and operating income to increase this year. Last month he said he planned to open 150 new locations, a big jump from recent years. He has also increased salaries, bonuses and benefits for store managers in an attempt to retain them.