Last week, Macy's (NYSE:M) reported strong sales and earnings results for the second quarter of fiscal 2018 and raised its full-year forecast. Nevertheless, Macy's stock plunged 16% on the day of the earnings report, although it has recovered some of that ground over the past week.

Analysts had a variety of explanations for the decline, mostly revolving around the fact that Macy's stock is up sharply year to date. However, one analyst -- Neil Saunders of GlobalData Retail -- argued that the share-price decline was justified because Macy's is losing market share.

It's true that Macy's continues to give up market share -- and has been losing share for most of the past several decades. There's no reason to expect this trend to reverse, although Macy's sales growth initiatives could stem some of the bleeding. However, it doesn't really matter. Macy's stock is priced at an ample discount relative to competitors that are gaining share.

Another strong performance wasn't good enough for some pundits

In the second quarter, comp sales rose 0.5% at Macy's, while earnings per share (excluding asset sale gains and special items) surged to $0.59 from $0.37 a year earlier. For the first half of the year, comp sales rose 2.3% year over year and adjusted net income more than doubled.

Indeed, Macy's Q2 sales growth was held back by a shift in the timing of a major promotional event. On a like-for-like basis, Macy's would have posted a 2.9% comp sales gain last quarter.

The exterior of a Macy's store

Macy's has posted solid sales and earnings growth in recent quarters. Image source: Macy's.

However, Saunders noted (correctly) that Macy's has continued to lose market share across multiple merchandise categories despite returning to comp sales growth. He observed that U.S. retail sales growth was very strong last quarter, making Macy's comp growth less impressive. Saunders recommended that the company significantly increase its investments in its stores. In short, it was clear that he didn't see the dip in Macy's stock as a buying opportunity.

Declining market share -- but a cheap stock

The observation that Macy's is still losing market share is 100% correct. Sales at U.S. clothing and clothing accessories stores surged 6.6% year over year in the May to July period (which roughly corresponds to Macy's second fiscal quarter), according to preliminary government statistics. Sales at furniture and home furnishings stores rose 4.1%. Both figures easily outpace Macy's 2.9% adjusted comp sales gain.

One retailer that is gaining market share -- at Macy's expense, to some extent -- is off-price leader TJX Companies (NYSE:TJX). On Tuesday, TJX reported that comp sales surged 6% last quarter, smashing analysts' estimates. Including the impact of new stores, total sales for its U.S. divisions rose 11% year over year. Year to date, TJX's revenue in the U.S. is up a little more than 10%, compared to a 1.1% total sales increase at Macy's.

Macy's is working on a variety of initiatives to boost sales growth, most notably an accelerated rollout of its promising Macy's Backstage off-price concept. This could drive faster comp sales growth as soon as the second half of this year. Nevertheless, under any plausible scenario, Macy's will continue ceding some amount of market share to TJX and other fast-growing rivals.

An exterior entrance to a Macy's Backstage department

Macy's plans to expand its Backstage off-price concept to about 120 more stores in 2018. Image source: Author.

However, even though Macy's stock has more than doubled since last November, it is still priced at a massive discount relative to shares of TJX and other faster-growing companies. Macy's stock currently trades for about nine times its projected earnings for this year. Even if you exclude real estate gains, the stock trades for less than 12 times earnings. By contrast, TJX trades for nearly 22 times its projected earnings.

In other words, TJX stock is pricing in a considerable amount of future growth. Macy's stock could perform well just based on the value of future dividends and share buybacks, even if the company achieves little or no long-term earnings growth.

Macy's can also fall back on its real estate value

The most legitimate fear related to Macy's ongoing market share losses is that they could cause profit to plunge in a recession. Today, market share losses just mean slower growth than rivals like TJX; if the market as a whole were contracting, market share losses would imply deep sales (and presumably earnings) declines.

This fear may be overstated. Macy's and its mall-based department store peers have been losing market share for decades, but the company has done an admirable job of rebuilding its profitability after each market downturn.

In any case, even if the profits from Macy's retail operation eventually erode toward zero, the company controls a massive amount of real estate that it can sell to return capital to shareholders. Macy's Manhattan flagship store is by far its most valuable asset -- followed by its San Francisco flagship store -- but it also owns big buildings in many of the most desirable U.S. malls, plus acres upon acres of buildable parking lot land.

Macy's shareholders should recognize that the retailer is still losing market share and will likely continue to do so over the next decade. But there's no reason to be overly concerned about this fact.