Last week, Dillard's shocked investors by reporting a record first-quarter profit. Macy's (M -1.40%) couldn't quite match that performance, but the department store giant did post extremely strong results despite the continuing impact of the COVID-19 pandemic on store traffic. This rapidly progressing turnaround should help Macy's sustain recent gains in its share price.

The sales recovery continues

Macy's sales surged 56% year over year last quarter, reaching $4.71 billion. Of course, the company faced a very easy comparison. Its stores were closed for about half of the first quarter in fiscal 2020, and consumer spending on discretionary items plummeted in the early part of the pandemic.

Compared to the first quarter of 2019, sales declined 14.5%. However, sales trends improved throughout the quarter as more Americans became fully vaccinated and the U.S. economy began to reopen. Digital sales surged 32% compared to the first quarter of 2019, whereas brick-and-mortar comps fell 24% over the same period.

Notably, Macy's Q1 sales easily surpassed the guidance range of $4.19 billion to $4.29 billion that management had provided in late February. Analysts had been slightly more bullish, calling for sales of $4.37 billion (on average), but in hindsight, they also underestimated Macy's sales recovery.

The exterior of the Macy's Manhattan flagship store

Image source: Macy's.

Strong margins

Macy's sales beat led to an even more impressive earnings beat. Gross margin improved to 38.6% from 38.2% in the first quarter of 2019 and a meager 17.1% in Q1 2020. The retail icon recorded a strong increase in its underlying merchandise margin, partially offset by higher delivery costs (largely driven by the big increase in digital sales).

Meanwhile, Macy's reduced its operating expenses by 17.2% compared to the first quarter of 2019. Additionally, credit card revenue held up well at $159 million: down just 7.6% from Q1 2019 despite lower credit card penetration, fewer new account openings, and lower average balances.

Adding it all up, Macy's adjusted earnings before interest, taxes, depreciation, and amortization (EBITDA) improved to $473 million from $447 million two years earlier. Earnings per share decreased to $0.32 from $0.44 in Q1 2019. However, excluding special items and asset sale gains, EPS increased by $0.04 to $0.38.

This result crushed management's initial Q1 guidance for a quarterly loss of $0.45 to $0.52 per share as well as the analyst consensus, which called for a loss of $0.41 per share.

Strong cash flow and improving balance sheet

Macy's generated $395 million of free cash flow last quarter ($119 million after adjusting for a decrease in outstanding checks). This represented a strong result, considering that Q1 tends to be a seasonally weak period for cash flow.

The exterior of a Macy's store

Image source: Macy's.

As a result, Macy's ended last quarter with $1.8 billion of cash. That's more than enough to cover an upcoming $294 million debt maturity and any near-term working capital needs. In fact, given that Macy's is likely to generate plenty of additional free cash flow over the next year, the company should be able to pay off $1.3 billion of high-cost debt issued last year when it becomes eligible for optional redemption next June. That will dramatically reduce future interest expense.

Guidance rises

Following its strong Q1 performance, Macy's raised its full-year sales guidance by more than $1.7 billion at the midpoint. It also lifted its adjusted EPS forecast to a new range of $1.71 to $2.12: dramatically higher than its initial guidance range of $0.40 to $0.90. For the second quarter specifically, Macy's expects sales between $4.9 billion and $5 billion and EPS of $0.03 to $0.12.

Macy's updated outlook calls for sales to remain at least 10% below 2019 levels in the second quarter and for fiscal 2021 as a whole. It also implies that adjusted EPS will retreat to below 2019 levels for the rest of the year. That may explain why Macy's stock retreated slightly on Tuesday despite the massive earnings beat.

M Chart

Macy's stock performance, data by YCharts.

This guidance may be overly conservative, though. Management is building in room for volatility in sales trends going forward. Yet with the economic reopening process set to accelerate this quarter, demand for seasonal items, dressy clothing, luggage, and other merchandise categories that struggled last year will probably improve further.

Macy's share price is now higher than it was at the beginning of 2020. Considering that sales and earnings came under pressure long before the pandemic, many investors are wary of Macy's stock today. But between its rapid earnings recovery -- driven in part by permanent cost reductions -- strong cash flow, and improving balance sheet, Macy's could be poised to return to profitable growth. That could unlock plenty of additional upside for shareholders.