By Luis Santiago and Suzanne Kapner

U.S. retailers are on track to close as many as 25,000 stores this year as the coronavirus pandemic upends shopping habits. That is more than double the 9,832 stores that closed in 2019, according to Coresight Research. So far this year major U.S. chains have announced more than 5,000 permanent closures.

More buying is shifting online, and consumers are spending less than they did a year ago as they shelter at home, get furloughed or lose their jobs. A growing number of chains that were struggling before the health crisis have filed for bankruptcy protection in recent months.

"Bankruptcies are driving a lot of the closures," said Deborah Weinswig, chief executive of Coresight Research, which compiled the data.

Here is a sector-by-sector look at net changes in store counts as of July 10 at major U.S. retailers:

Apparel

Many clothing retailers were in bad shape before the pandemic as consumers shifted spending to travel, entertainment and other experiences, and new online startups siphoned sales from established players. Gap Inc. and Victoria's Secret, owned by L Brands Inc., which once dominated the nation's malls with hundreds of stores, are shrinking. Brooks Brothers Group filed for bankruptcy in July and plans to close 51 stores.

Discount

The dollar stores and discounters are bucking the trend. Dollar General Corp. is moving ahead with nearly 1,000 new stores this year, and its rivals Dollar Tree and Family Dollar also adding hundreds of new locations. With high unemployment and other workers furloughed, these chains are benefiting as shoppers tighten their purse strings. "It's cool to be frugal right now," Ms. Weinswig said.

Health/Drug/Beauty

The health, drug and beauty closings were driven by GNC Holdings Inc., which filed for bankruptcy protection in June and plans to close up to a sixth of its stores. Drugstore chains also have pulled back on new openings, after years of expansion, seeking to counter a drop in prescriptions by adding health services.

Home

Pier 1 Imports Inc. filed for bankruptcy in February and plans to permanently shut its stores, accounting for most of the closings in this category. Bed Bath & Beyond Inc., which was struggling before the pandemic, is also closing hundreds of locations. On the flip side, furniture and hardware chains have benefited from an uptick in spending on home improvement.

Department Stores

Department stores were in decline before the pandemic as shoppers shunned indoor malls. J.C. Penney Inc. and Stage Stores Inc. filed for bankruptcy in May and are pulling back from many malls, and Macy's Inc. plans to close a fifth of its stores over the next three years.

The owner of Sears and Kmart filed for chapter 11 in 2018, and although its assets were bought out of bankruptcy in 2019, it has continued to close stores this year.

Other Retail

Sporting goods chain Modell's and the operator of Papyrus stationery stores are closing locations after filing for bankruptcy earlier this year. Mall favorites Signet Jewelers and GameStop are also slimming down. Software giant Microsoft Corp. has decided to abandon its bricks-and-mortar locations after opening its first store more than a decade ago.

Grocery/Food

This is another area that is showing growth, though much of the openings are coming from Aldi and Lidl, two German chains that have been expanding in the U.S. Specialty food purveyor Harry & David decided not to reopen most of its stores after the pandemic, while Fairway Market filed for bankruptcy in January.

Write to Suzanne Kapner at Suzanne.Kapner@wsj.com