It wasn't that long ago when it was Macy's (NYSE:M) on the ropes and J.C. Penney (NYSE:JCP) was resurgent, but the pendulum has swung for the old-line department store chains and the tables have seemingly turned again.

However, even though J.C. Penney is struggling to regain its footing once more, it's not as though Macy's is out of the woods. There are still more stores it needs to close to complete the 100 it promised to shutter over several years, and despite a better-than-expected holiday season for the retailer, it must prove its plan for taking its operations back to health is the right one.

Let's take a closer look at Macy's and J.C. Penney to see which is the better investment opportunity today.

How do they stack up?

Macy's is 160 years old this year and J.C. Penney is a more spry 116, but both have weathered war, depression, social upheaval, and ever-changing fashion trends. It's the more modern development of e-commerce that has thrown their survival into doubt, so let's look at their financial standing.

Metric

J.C. Penney

Macy's

Stores

875

690

Employees

100,000

130,000

Enterprise value

$4.7 billion

$13.2 billion

Revenue 

$12.5 billion

$24.8 billion

Operating income

$116 million

$1.8 billion

Operating cash flow

$454 million

$1.9 billion

Free cash flow

$59 million

$1.5 billion

Cash

$458 million

$1.5 billion

Long-term debt

$3.8 billion

$5.9 billion

Data source: Company SEC filings.

Macy's has done a lot of work to shore up its financial failings, and despite the smaller national footprint, squeezes out more sales per square foot of floor space than does J.C. Penney. According to industry site eMarketer, the former generates around $151 per square foot in sales, while the latter only $107, making it a much less efficient operation.

J.C. Penney might be a leaner retailer with fewer employees, but that might actually work against it in helping customers find what they're looking for.

Still, both retailers have sizable debt loads they need to service, and while both are working steadily to pay them down, Macy's generates significantly more free cash flow, which serves to give it greater flexibility.

Macy's Backstage store

Image source: Macy's.

Of good cheer

Both retailers enjoyed better sales this past Christmas, with J.C. Penney seeing comparable store sales rise 2.6% in the fourth quarter, which pushed its full-year comps into positive territory, up 0.1%. Macy's also saw positive fourth-quarter comps, up 1.4% on an owned plus licensed basis, but that was nowhere near enough to make up for a thoroughly lackluster year, which resulted in comps being down 1.7% for the year.

Even so, because of the store closings, both retailers witnessed a decline in net sales. J.C. Penney was down 0.3% for 2017, while Macy's was off 3.7%.

Righting listing ships

Both department store chains have implemented aggressive turnaround strategies that go beyond just closing stores, and both are investing heavily in e-commerce.

J.C. Penney, for example, has completed the process of having 100% of its stores serve as pickup locations for online orders, and over 40% of its e-commerce orders were fulfilled from a brick-and-mortar store. E-commerce was a particular source of strong growth last year; J.C. Penney noted that digital penetration is approximately 18% of sales and growing.

J.C. Penney is also investing heavily in its home department and has made appliance sales a key component of its strategy to differentiate itself. As Sears Holdings (NASDAQ:SHLD) continues to careen toward bankruptcy, it may be J.C. Penney that benefits most from customers looking for an alternative store where they can buy appliances.

J.C. Penney home services and appliances

Image source: J.C. Penney.

Similarly, Macy's said its digital growth continued at a double-digit rate, and it has chosen the off-price market to stake a claim. Its Backstage stores are expected to contribute an even larger percentage of its sales growth going forward than they did in 2017. It expanded the off-price brand to 45 stores last year and would like to open 100 more while experimenting by opening store-in-store boutiques inside some of its premium locations.

The better buy is...

The stocks of both retailers are deeply discounted, trading at just fractions of their value across multiple metrics. Macy's, however, does offer a dividend that currently yields 5.2%, and while its turnaround is in progress, it should be safe. Yet if the retail market heads into another steep downturn, it could be at risk.

Still, from a financial perspective, Macy's seems the better buy. While J.C. Penney has a better target by focusing on home and appliances, its financial position is substantially weaker. With that said, Macy's risks cannibalizing sales from its full-price stores by concentrating on growing its off-price brand.

Factoring in all the above, it's really a toss-up because both are weak players in a weakened industry, but Macy's superior financial footing has to give it the lead.

Rich Duprey has no position in any of the stocks mentioned. The Motley Fool has no position in any of the stocks mentioned. The Motley Fool has a disclosure policy.