At this time last year, investors had left Macy's (M -2.03%) for dead, thinking that the COVID-19 pandemic would finish off the department store chain. Indeed, Macy's lost $4.8 billion before taxes under generally accepted accounting principles (GAAP) in fiscal 2020. Even after removing various one-time charges, it posted an adjusted net loss of $688 million.

Nevertheless, Macy's stock has come roaring back, roughly tripling since April 2020. In fact, while the stock remains well below its 2018 highs, it has recovered all the way to where it stood in early 2020 (before the pandemic).

M Chart

Macy's stock performance, data by YCharts.

Considering the pandemic's impact on Macy's business and the long-term pressure department stores have faced over the past decade, it would be natural to assume that Macy's stock is now overvalued. However, that isn't necessarily true. Let's take a look.

Sales are starting to recover

Macy's sales plunged 29% year over year to $17.3 billion last year. However, the worst damage occurred in the first half of the year, particularly the first quarter, when sales plummeted 45% year over year. By the fourth quarter, sales were down less than 20% year over year.

M Revenue (Quarterly YoY Growth) Chart

In conjunction with its Q4 earnings call in late February, management predicted that sales would come in between $4.19 billion and $4.29 billion this quarter. This guidance implied that sales would be down 22% to 24% compared to the first quarter of fiscal 2019: weaker than the company's Q4 performance.

Fortunately, business trends have surpassed management's expectations. Sales at department stores jumped 13% last month relative to February, according to the Census Bureau's March retail sales report. During a recent TV appearance, CEO Jeff Gennette said the company's most loyal customers -- those who hold its store-branded credit card -- were starting to spend more. And at an investor conference last week, Macy's CFO Adrian Mitchell confirmed that sales trends had improved compared to the fourth quarter.

As more Americans receive their COVID-19 vaccinations over the next few months and the U.S. economy reopens, demand and store traffic should continue to improve. Management hopes that sales will eventually surpass the company's 2019 result of $24.6 billion. This target assumes that digital sales will reach $10 billion within three years, up from around $7.6 billion last year, while in-store sales will make a partial recovery.

Cost cuts bolster earnings potential

Even if Macy's can't quite get sales back to 2019 levels, the company could emerge from the pandemic as a more profitable business. Last year, Macy's identified $2.1 billion of annual savings that it expects to realize by 2022, mainly from slashing overhead, reducing store-related costs, and using technological improvements to boost gross margin.

Macy's will need to use some of that savings to offset other profitability headwinds and some to invest in growth initiatives. Still, a meaningful amount should drop to the bottom line.

The exterior of Macy's Manhattan flagship store

Image source: Macy's.

To be sure, earnings will remain depressed in 2021. Initial guidance calls for earnings per share between $0.40 and $0.90, down from $2.91 in fiscal 2019. However, like the department store giant's initial Q1 sales forecast, that projection is probably very conservative. And EPS could leap higher in fiscal 2022, assuming the economy reopens fully by the end of this year.

The balance sheet is surprisingly solid

Despite posting a big loss last year, Macy's actually generated positive free cash flow. As a result, it ended fiscal 2020 with $1.7 billion of cash on hand: up by $1 billion year over year.

Once the business environment stabilizes, Macy's will be able to use its excess cash to pay down debt. It also expects to receive a $520 million income tax refund in the first half of 2022, adding to its debt reduction potential. By the end of next year, the company will likely have less debt than it had prior to the pandemic, making Macy's stock a less risky investment.

Has Macy's learned its lesson?

While the COVID-19 pandemic decimated business in the short term, it forced management to tackle the retailer's weaknesses with greater urgency. For example, in addition to the deep cost cuts referenced above, Macy's learned how to operate with dramatically lower inventory during fiscal 2020. Operating with lean inventory frees up working capital and supports gross margin by reducing the need for clearance discounts.

The pandemic also drove some competitors out of business, while forcing others to shrink dramatically in bankruptcy. That could allow the department store chain to gain market share, particularly as demand for dressy apparel rebounds over the next few years.

Between its cost cuts, digital sales growth, and improved inventory management, Macy's has a decent chance of emerging from the pandemic with higher margins than it had in 2019. If that happens, Macy's stock could continue rising -- even though it has already recovered all of its pandemic-related losses.