Macy's (M 1.99%) stock jumped by 19% on Thursday, May 26, after announcing earnings before the markets opened. The retailer reported better-than-expected profits and raised targets for the rest of the year. But even after soaring on the good news, the stock is not expensive.

Measuring by its price-to-earnings and price-to-free-cash-flow ratios, Macy's is selling near its lowest valuation in a decade. Meanwhile, the company's prospects are improving as management has adjusted the business to better align with current consumer tastes. Let's look closer. 

A person shopping in a department store.

Image source: Getty Images.

A more robust business coming out of economic lockdowns

Several years before the outbreak, Macy's struggled to find sales growth as people shifted their spending to online channels. The company hesitated in adapting the business out of fears it would cannibalize highly profitable sales from its brick-and-mortar stores. At the pandemic's onset, when it shut its stores to in-person shoppers, it was forced to emphasize its digital channels. 

Chart showing Macy's annual revenue falling since 2015.

M Revenue (Annual) data by YCharts

The move is paying off. Online sales soared during the pandemic, and in its most recent quarter, which ended April 30, digital sales totaled 33% of overall sales. Interestingly, Macy's noted that more than 88% of the markets with brick-and-mortar stores saw omnichannel sales growth over the first quarter of 2021. That makes sense. Customers feel more comfortable shopping online if they know there is a brick-and-mortar store near them. That way, if they need to make a return or exchange a size six shoe for a size seven, the process will be smoother and faster.

That was not the only change that happened at Macy's during the pandemic. Management streamlined the business (lots of layoffs), and the company's leaner operating structure is boosting profitability as revenue increases. In the quarter that ended in April, earnings per share (EPS) were $1.08 compared to $0.39 in the same quarter last year. Selling, general, and administrative expenses as a percentage of revenue fell by 200 basis points from last year to 35.1%. That's despite Macy's raising minimum wages in its stores across the U.S. to $15 per hour.

So far, all the signs point to decisions made during the pandemic as being effective and improving the company's longer-term prospects. 

The markets are not yet convinced

Looking back three years, Macy's stock is barely up 9%. That seems like an insufficient sum, considering that business is much improved since before entering the pandemic. However, you can understand investor skepticism toward a company that failed to deliver revenue growth roughly four years before the outbreak. It might take a sustained period of continued revenue and profit growth to assuage concerns over the short-term nature of Macy's success. 

Charts showing Macy's price to free cash flow and PE ratio falling since 2014.

M Price to Free Cash Flow data by YCharts

The stock is trading near its lowest valuation in the last decade when measured by earnings and free cash flow (see chart above). That's creating an opportunity for long-term investors to scoop up shares of the improving retailer before the valuation rises.