NEW YORK — Walmart turned out another stellar quarter as the world’s largest retailer powers through a pandemic that has felled other national chains.

Third-quarter profits surged 56% and revenue hit $133.75 billion, a 5.3% increase. Both were better than Wall Street had projected. Online sales spiked nearly 80% after nearly doubling in the previous quarter.

Sales at stores opened at least a year rose 6.4%.

Target and Walmart will be closed on Thanksgiving

It is a promising sign for Walmart ahead of the coming holiday season, and the quarter provides more evidence that its expansion into online grocery is widening the gap with rivals. In September, it launched a membership program to deliver what people want more than ever in a pandemic as they reduce their public exposure: convenience.

Big box stores are thriving even as thousands of retail stores and national chains suffer.

That was on display Tuesday as Home Depot reported a 23% quarterly sales surge. At Kohl’s, a more traditional retailer, sales dropped 13.3%, and it lost money.

More of the same is expected this week in quarterly earnings reports from Target, Lowe’s and Macy’s.

Customer loyalty at big box stores grew stronger even as spring lockdowns were lifted, but infections are surging again and that could deal another round of pain to other retailers.

Walmart is making further accommodations for that surge, spreading its traditional Black Friday sale over three separate events in November. Some of the most enticing offers are going online to encourage customers to stay at home.

Walmart on Saturday will again begin counting the customers that enter its stores, as it did in the spring, to control the number of shoppers inside stores.

While it navigates the surge in infections it many regions in the U.S., it is retreating further from efforts to expand internationally.

Walmart on Monday said it would sell off 85% of its Japanese supermarket subsidiary Seiyu in a deal valued at $1.6 billion. It said earlier this month it was backing out of Argentina.

Last month, Walmart said it would sell its British supermarket chain Asda for $8.8 billion, though it will keep a minority stake and a seat of the board.