Bloomingdale's at the Westfield mall in San Francisco, Calif.

The pandemic took a steep toll on Macy’s Inc. in the fourth quarter, but the retailer said it performed better than expected and that 2021 will be a year of recovery.

Macy’s also predicted that its digital sales will reach $10 billion in three years.

Fourth-quarter net income fell to $160 million, or 51 cents per diluted share, from $340 million, or $1.09, in the year-ago period, as comparable sales declined 17.1 percent.

Operating income came to $401 million last quarter, versus $559 million in the year-ago period.

According to the company, however, results at all three of its brands — Macy’s, Bloomingdale’s and Bluemercury — beat its expectations and that overall, the company continued to show improvement from quarter to quarter last year.

Macy’s executives view 2021 as a year of “recovery and rebuilding” with continued pandemic-related challenges in the spring season and momentum building in the back half.

Digital sales grew 21 percent in the quarter ended Jan. 30, and represented 44 percent of net sales. About 25 percent of Macy’s digital sales were fulfilled from stores, including curbside pickup and same-day delivery.

“Macy’s Inc.’s fourth-quarter results exceeded our expectations across all three of our brands, as we showed continued quarter-to-quarter sales performance improvements and returned to profitability,” said Jeff Gennette, chairman and chief executive officer.

“Performance was driven by the home, beauty, jewelry and watch categories, growth in digital sales and by acquiring new customers. Our investments in digital innovation continued to pay off in the quarter, with digital sales up 21 percent from 2019. We anticipate annual digital sales to reach $10 billion within the next three years, and that digital will become an even more profitable contributor to our business. Additionally, we exited the quarter with a lower cost base and a strong liquidity position, supported by a $3 billion asset-based lending facility that we have not drawn upon.

“We have made progress on the Polaris transformation strategy we introduced a year ago,” Gennette added. “We are accelerating several elements, including our focus on digital and omnichannel sales, improving customer value and building the infrastructure to support the growth of our business. We believe these actions will propel us to stronger performance in 2021 and beyond.”

Gennette characterized 2020 as “a year of unprecedented disruption,” adding, “We are incredibly proud of our team for their hard work to make our customers feel safe and comfortable when shopping with us. And we are grateful to our brand partners for navigating through the pandemic with us.”

Macy's CEO Jeff Gennette.

Macy’s CEO Jeff Gennette  Thomas Iannaccone/WWD

For all of last year, Macy’s lost $3.94 billion, compared to a profit of $564 million in 2019. The company reported $3.58 billion in restructuring, impairment, stores closings and other costs. Sales totaled $17.34 billion in 2020, versus $24.56 billion in 2019.

For 2021, Macy’s anticipates between $19.75 billion to $20.75 billion in sales, adjusted diluted earnings per share of between 40 cents and 90 cents and asset sale gains between $60 million and $90 million.