Even as the coronavirus pandemic has devastated much of the retail industry, some of the nation’s largest chains are thriving as customers stock up on groceries, home appliances and other essentials at unprecedented rates.

Retail giants Walmart and Home Depot on Tuesday reported big boosts in quarterly sales, propped up by panic-buying as Americans hunkered down at home. Walmart said online sales surged 74 percent, lifting overall sales by nearly 9 percent from February to April. Meanwhile, Home Depot said its revenue rose 7 percent.

On the other side of the spectrum: Kohl’s. The department store chain posted a 41 percent drop revenue for the quarter, offering a stark reminder of how the pandemic is boosting some retailers while hastening the demise of others.

Consumer spending has dropped precipitously in the weeks since the pandemic took hold. U.S. retail sales fell a record 8.3 percent in March, then plunged 16.4 percent in April, according to Commerce Department data, as Americans stopped spending on clothing, furniture, housewares and other nonessentials.

Retailers temporarily closed more than 260,000 stores because of the coronavirus outbreak, all but bringing business to a halt for many companies that rely on in-store shoppers to drive the bulk of their sales. Four major retailers — J. Crew, Neiman Marcus, Stage Stores and J.C. Penney — have filed for bankruptcy this month, and analysts say they expect others to follow as more companies run out of cash and the economy continues to sour.

Pier 1, which had filed for bankruptcy weeks before the shutdowns, announced Tuesday it would cease operations altogether. It had planned to closed 450 of its 936 stores and shed 40 percent of its workforce and find a buyer, but the pandemic ended those hopes.

“It’s a self-fulfilling prophecy: the bigger, stronger players are taking even more market share,” said Mickey Chadha, senior credit officer at the rating agency Moody’s. “And the companies that were weak to begin with, they are only going to become weaker.”

But spending on groceries has continued to climb. Walmart, the country’s largest grocer, said profits rose 4 percent, to $3.99 billion, during the first quarter. Demand has been so brisk that Walmart has hired more than 235,000 workers since mid-March, according to chief executive Doug McMillon. All 5,355 of the company’s U.S. stores have remained open during the pandemic.

“More than ever, the news this quarter is our amazing associates,” he said in a statement. “They are rising to the challenge to serve our customers and our communities.”

But worker advocacy groups say the company’s gains have come at the risk of employees’ health. At least 22 Walmart employees have died of covid-related complications since March, according to labor advocacy group United for Respect.

Walmart said it is providing free masks and gloves to employees and has installed sneeze guards at its checkouts. It has also announced two rounds of bonuses — $150 for part-time workers, $300 for full-timers — who work through the pandemic. It said it spent nearly $900 million on employee bonuses and other covid-related costs.

The retail giant also announced Tuesday that it is discontinuing the e-commerce site Jet.com “due to the continued strength of the Walmart brand.” Walmart paid $3.3 billion for Jet.com in 2016 and continued to invest heavily in the site in hopes that it would help win over younger, more affluent, big-city shoppers from Amazon. (Jeff Bezos, the founder and chief executive of Amazon, owns The Washington Post.)

Home Depot, meanwhile, said sales at U.S. stores open at least one year rose nearly 8 percent. Profits fell nearly 12 percent to $2.25 billion, as the company spent more on wages and cleaning stores.

Although the pandemic has shrouded the retail world in gloom, Home Depot’s results are something of a bright spot,” Neil Saunders, managing director of GlobalData Retail, wrote in a note to clients on Tuesday.

That was not the case at Kohl’s, which was one of thousands of retailers that shut its stores and furloughed the majority of its workers in March. The department store chain posted a $541 million quarterly loss, compared with a $62 million profit in the same period last year.

Kohl’s results show the extent of the damage the pandemic has caused to nonessential retailers,” Saunders said. Though he said a number of factors worked in the company’s favor, including its focus on fitness apparel and the location of its stores in strip centers instead of shopping malls, “the toll on the financial health of Kohl’s should not be underestimated.”

“If a reasonably well positioned retailer like Kohl’s is posting such bad numbers, it does not bode at all well for much weaker players in the market,” he said.