At first glance, Macy's (M 0.41%) and Sears Holdings (SHLDQ) might seem very much alike. Both companies are mall-centric retailers that have faced persistent declines in comparable store sales recently and are closing lots of stores. Yet both also have valuable real estate assets that they have been monetizing at a steady pace. Today, some investors see Macy's and Sears as real estate investments just as much as they are retail investments.

Sears' retail business is slowly dying, but at least it owns a lot of real estate. Image source: The Motley Fool.

Yet there is one huge difference between Macy's and Sears. Sears is losing money -- and lots of it. Thus, virtually all of its real estate gains are needed to prop up the ailing retail business. By contrast, Macy's core business still generates lots of free cash flow.

Sears monetizes lots of assets, but to what end?

As I recently noted, Sears has raised $5.8 billion of cash by monetizing a variety of assets over the past four years. Most of that value has come from selling and spinning off various real estate assets.

Even after completing all of these transactions, Sears still owns hundreds of stores and has below-market leases for many others. It also owns other assets, such as the valuable Kenmore, Craftsman, and DieHard brands.

The problem is that Sears' underlying retail business is failing. Over the past few years, it has reported negative free cash flow of around $1.5 billion per year on average. Sears' asset sales have barely been sufficient to cover its operating losses.

SHLD Free Cash Flow (TTM) Chart

Sears Holdings Free Cash Flow (TTM), data by YCharts.

Sears hasn't given investors much reason to believe that it can return the retail business to profitability. As a result, when the company runs out of assets to sell, it is likely to collapse.

Macy's remains solidly profitable

Macy's has certainly faced earnings pressure since its sales started to slip in early 2015. For this fiscal year, Macy's currently expects to post earnings per share of $3.15-$3.40, down from adjusted EPS of $4.40 in fiscal 2014.

Nevertheless, Macy's continues to reliably churn out free cash flow. While free cash flow has declined from the peak reached a couple of years ago, it's already starting to recover as Macy's has been reducing its inventory to match recent sales trends. Macy's cost-cutting initiatives could allow free cash flow to rise further in 2017, even if demand remains soft.

M Free Cash Flow (TTM) Chart

Macy's Free Cash Flow (TTM), data by YCharts.

As a result, while Sears needs to squeeze value out of its real estate just to stay in business, any real estate monetization opportunities for Macy's represent pure upside.

Lots of real estate value to be unlocked

Macy's has the most valuable real estate portfolio of any department-store company. Activist hedge fund Starboard Value estimates that Macy's real estate holdings may be worth $21 billion.

Macy's is in the early innings of a process that could allow it to monetize a lot of its underutilized properties. For example, in 2015, it sold the upper floors of its store in Brooklyn to a developer for $170 million in cash, plus $100 million to be used for a complete renovation of the remaining Macy's store.

Just last week, Macy's announced that it has sold five mall-based stores to General Growth Properties this year. Four of those sales occurred in Q3, bringing in proceeds of $46 million. Macy's will lease back one of the properties, while the others will be redeveloped. This could be the beginning of a long string of smaller real estate deals, given that Macy's plans to close about 100 stores in early 2017.

Macy's is also actively looking to monetize its "flagship real estate assets" in Manhattan, San Francisco, Chicago, and Minneapolis. A few months ago, the company revealed that it was negotiating to sell its men's store building in San Francisco, a property that is probably worth hundreds of millions of dollars.

Macy's is looking to monetize flagship properties such as its Manhattan store. Image source: The Motley Fool.

Macy's may also be close to selling its 1 million-square-foot-store building in downtown Minneapolis. Based on other recent real estate deals nearby, that store could fetch more than $100 million if it's sold outright. Deals for the even larger (and more valuable) Manhattan and Chicago flagships could follow in the next year or two.

With the core retail business still churning out lots of cash, Macy's can be patient in lining up the best deals possible to extract value from its real estate. As various real estate transactions come to fruition, Macy's will be able to return even more cash to shareholders (on top of its already-generous dividend) through share buybacks or a special dividend.

As for Sears, there may be more real estate sales in its future -- but shareholders aren't likely to see a dime. Any cash Sears raises will be needed to offset billions of dollars of losses in the retail business.