In the past couple of years, Macy's (NYSE:M) has started to get serious about maximizing the value of its real estate. In several cases, this approach has involved closing or downsizing stores that sat on valuable land to sell the underlying real estate.

As a result, many investors have drawn parallels between Macy's and Sears Holdings (NASDAQOTH:SHLDQ), which has also been selling a lot of real estate in recent years. However, the similarities end there. Sears Holdings is selling assets in a desperate attempt to stave off bankruptcy. It's unlikely that shareholders will ever see any benefit from Sears' real estate deals.

By contrast, Macy's is a profitable retail business that also has a lot of great real estate. Long-term investors are likely to benefit from both sides of the Macy's story.

Macy's completes another deal

Last year, Macy's brought in cash proceeds of $673 million from a slew of real estate deals. The highlight was the sale of its Union Square Men's Store in downtown San Francisco for $250 million. A year earlier, Macy's raised $204 million from asset sales.

The exterior of the Macy's flagship store on Union Square in San Francisco

Macy's is consolidating its San Francisco flagship store into one building. Image source: Macy's.

Fiscal 2017 is shaping up to be an in-between year. In the first half of the year, Macy's received $150 million in proceeds from asset sales and booked gains of $111 million. For the full year, it expects to book $275 million-$300 million of gains (excluding the Union Square sale), with cash proceeds likely to be similar or slightly higher.

Macy's recently took a big step toward meeting this guidance by completing the sale of two floors of its downtown Seattle store. Two years ago, it sold the top four floors of the building for $65 million. It has now sold another two floors -- plus some basement space -- to the same buyer for $50 million.

The rest of the company's asset sales for fiscal 2017 are likely to involve mall-based stores or the surrounding land. While Macy's is actively marketing the upper floors of its downtown Chicago flagship store, it probably won't be able to complete any such deal until 2018.

Sears has also been selling lots of property

Between 2014 and 2016, Sears Holdings sold about $3.5 billion of real estate. Of that total, $2.7 billion came from the company's deal to spin off 235 stores and joint venture interests in another 31 properties as Seritage Growth Properties, a publicly traded REIT.

The company hopes to sell at least another $1 billion of real estate during 2017. By April, the company had lined up bids exceeding $700 million for about 60 properties. As of late August, it had realized proceeds of about $620 million from executing some of these deals. Sears still owns hundreds of stores, so it will be able to continue raising cash through real estate sales in the next few years.

But profitability is a big differentiator

While Macy's and Sears have both been closing stores and selling real estate recently, the parallels end there. For example, comparable-store sales declined 2.5% at Macy's last quarter -- compared with an 11.5% plunge for Sears Holdings.

Most importantly, Macy's is consistently profitable, whereas Sears has been bleeding cash at an astounding rate. Sears has burned through about $2 billion of cash in the past 12 months, and it has fairly consistently torched $1.5 billion to $2.0 billion annually in recent years. Thus, the company needs to sell lots of real estate, or other assets, each year just to stay afloat.

By contrast, despite facing some sales and earnings pressure recently, Macy's has churned out about $900 million of free cash flow in each of the past two years. That's more than enough to cover its generous dividend, which currently has a yield around 7%. Macy's is using the rest of its free cash flow -- as well as its asset sale proceeds -- to pay down debt. In the past year alone, it has reduced its net debt by more than $1 billion.

Macy's is also in the early stages of reinventing its merchandise assortment, marketing strategy, and loyalty program. These efforts could lead to better results at its core retail business starting in 2018. Investors should view the company's real estate deals as an effective tool for accelerating its debt-reduction efforts -- not as a sign that it's spiraling toward bankruptcy.