NEW YORK (CNNMoney) - A very tough year for retailers ended better than they could have ever expected.
Sales were up 5.5% during the November and December holiday shopping season, according to the National Retail Federation analysis of government data Friday. It's the biggest year-over-year gain since the economy was climbing out of the depths of the Great Recession in 2010.
An 11.5% gain in online shopping was a big driver of that increase. But online still only accounts for an estimated 20% of consumer purchases. Sales at traditional brick-and-mortar retailers rose a healthy 4.1% to push the industry to its best gain in seven years. Every sector of retail, other than sporting goods, posted improved sales.
The overall increase was much better than even the the trade group's best case scenario for the season, said Jack Kleinhenz, NRF chief economist. It had forecast of a rise of no more than 4%.
"This counters the image that retail is dying and is in an apocalyptic situation," he said.
He attributed the gains to strong consumer confidence, unemployment at a 17-year low and a rising stock market. It was a much needed lift for a sector that had its share of trouble in 2017.
"It's good to have this kind of holiday season to provide some substance to some of theses firms," he said.
The analysis reflected some sales figures from leading brick-and-mortar retailers, including Target, Kohl's, Macy's and JCPenney, which all reported better-than-expected sales in the holiday shopping season.
Despite the strong holiday season, the year did see nearly 7,000 store closings, a record level that more than tripled the number of closings the year before. The sector shed 66,500 jobs during the year, far more jobs than any other industry. Bankruptcies were up 30% from 2016.
There have already been some major store closing announcements in the new year, with Walmart closing 63 Sam's Club wholesale outlets and Sears Holdings shutting 103 Sears and Kmart stores.
"This industry continues to go through a transformation," Kleinhenz said. "Most firms are embracing both store sales and online. But online sales are still only a fraction of brick-and-mortar sales, and that will continue to be the case for many years. Consumers still need goods. They need to get them somewhere."