Flush with cash and eager to get out after being cooped up at home for much of 2020, U.S. consumers have come back in full force this year. Retail sales have surged, and the rising tide has lifted all boats: even previously struggling department stores.

On Thursday, Macy's (M 0.44%) became the latest retailer to release a stellar second-quarter earnings report. The company's massive earnings beat caused Macy's stock to jump 20% yesterday. Let's see if these gains look sustainable.

M Chart

Macy's stock performance. Data by YCharts.

A full sales recovery

Three months ago, Macy's reported first-quarter results that crushed its own forecast and analysts' expectations. That said, the company's sales still lagged its Q1 2019 total by 14.5%. Adjusted earnings per share ticked up modestly to $0.38 from $0.34 two years earlier.

Macy's completed its recovery last quarter. Comparable sales increased 5.9% relative to the second quarter of 2019, while total sales rose 1.8% to $5.65 billion. (Store closures over the past two years account for the discrepancy.) Not surprisingly, these results blew past the company's guidance and the analyst consensus. Macy's had projected total sales of $4.9 billion to $5 billion, and even the most bullish analyst on Wall Street had expected a top line of just $5.13 billion.

Comp sales grew compared to 2019 for each of Macy's three banners, including a double-digit gain for the upscale Bloomingdale's chain. Digital sales declined 6% year over year but jumped 45% from the second quarter of 2019, reflecting a partial return to in-store shopping by customers. Management also noted that many hard-hit merchandise categories like luggage, denim, and dresses are rebounding strongly.

Incredible margin expansion

Macy's initial guidance for the second quarter called for adjusted EPS between $0.03 and $0.12. Analysts were only slightly more bullish, calling for adjusted EPS of $0.14 (on average).

But like its smaller peer Dillard's, Macy's capitalized on the strong demand environment to cut back on discounting, driving gross margin higher by 1.8 percentage points compared to Q2 2019. Meanwhile, expenses remained well below 2019 levels, due to a combination of permanent cost-cutting measures and temporary understaffing related to the tight labor market. As a result, adjusted EPS surged to $1.29: nine times the analyst consensus and more than quadruple the company's second-quarter 2019 profit.

The exterior of the Macy's Manhattan flagship store.

Image source: Macy's.

Thanks to its resurgent profitability, good working capital control, and temporarily reduced capital spending, Macy's generated over $700 million of free cash flow in the first half of 2021. That helped it end the second quarter with over $2.1 billion of cash and equivalents. This week, it used most of that cash balance to redeem $1.3 billion of high-cost debt ahead of schedule, reducing future annual interest expense by about $120 million.

Looking ahead

Macy's estimates that third-quarter sales will come in between $5.04 billion and $5.19 billion, compared to $5.17 billion two years ago. It continues to expect significant earnings growth, with adjusted EPS of $0.17 to $0.26, up from $0.07 in Q3 2019. This forecast implies a sequential slowdown in growth, presumably due to the recent surge in U.S. COVID-19 cases associated with the delta variant.

The iconic department store giant also increased its full-year sales guidance by nearly $2 billion at the midpoint, to a new range of $23.55 billion to $23.95 billion. It now expects to generate adjusted EPS between $3.41 and $3.75 this year. In fiscal 2019, it recorded adjusted EPS of $2.91 on sales of $24.56 billion.

Macy's also reinstated its quarterly dividend at $0.15 per share. While that's 60% lower than its pre-pandemic payout, it translates to a solid 2.8% yield annually. Moreover, with Macy's on track to reach its long-term debt reduction target by year end, the board has approved a new $500 million share buyback program.

Many analysts and pundits remain skeptical of Macy's long-term competitiveness. However, the company is investing in numerous growth initiatives, including new brands, enhancements to its e-commerce channels, off-mall store formats, and a new partnership with Toys R Us. And while Macy's is clearly benefiting from pent-up demand this year, its stores in urban centers and big tourist markets won't recover until workers return to offices in greater numbers and international tourism to the U.S. resumes.

These opportunities could enable further growth in sales and EPS over the next few years. Even after its rally on Thursday, Macy's stock trades for just six times the company's updated 2021 EPS outlook. That bargain valuation leaves plenty of upside for risk-tolerant investors despite the challenges facing department stores.