Macy's (M -1.47%) sales during the holiday season soared as its comparable-store sales growth beat all its competitors. The company's third-quarter earnings marked its 15th consecutive quarter of earnings-per-share growth. Does this make Macy's a buy? Let's have a look at Macy's and compare it to Kohl's (KSS -2.54%) and Gap (GPS -3.46%).

Third-quarter report
Despite facing economic challenges, Macy's had an admirable third quarter as comparable-store sales grew 3.5% and revenue increased 3.3% from the same quarter last year. Third quarter earnings stood at $0.47, representing a 31% jump from the year-ago quarter. The company's consistent growth in earnings and same-store sales suggest that it is heading in the right direction.

What is Macy's up to?
Macy's has been repurchasing its shares on a regular basis for the last few quarters, thus creating value for its shareholders. In 2013, the company increased its buyback authorization by $1.5 billion. During the third quarter, the company repurchased 10.1 million shares of common stock worth $447 million; the company's remaining share repurchase authorization stands at $1.75 billion.

Macy's enjoyed healthy sales during the holiday season as its same-store sales for the months of November and December rose 3.6%, while the industry had comparable-store sales growth of 2.7% according to ShopperTrak. In terms of sales growth, Macy's outperformed other retailers such as J.C. Penney, Kohl's, Wal-Mart, and Target. This strong performance was attributed to an increased selection of low-priced items and aggressive advertisements by Macy's.

Moreover, Macy's is looking to enhance its profits even further through various cost-cutting measures. Macy's expects its new cost-cutting program will save the company more than $100 million annually. As part of this program, Macy's will realign, combine, and reduce some positions at its stores. Moreover, the company will also cut central office, administrative, and back-of-the-house expenses. More than 2,500 employees will be laid off, but the company will continue to hire people for its online operations and new stores as it plans to keep its workforce at approximately 175,000 associates.

Macy's is also closing its underperforming stores and opening new stores in more lucrative areas for even further sales growth. The company plans on shutting down five Macy's stores in early spring this year. Moreover, the company will open three new Bloomingdale's stores along with five Macy's stores. The cost-cutting initiatives undertaken by the company will surely reduce its operating costs, making it one of the top retailers in the industry.

As per the consensus estimate, Macy's is expected to post EPS of $2.17 in the fourth quarter. Macy's expects its full-year earnings to be in the range of $3.80-$3.90, while for the next fiscal year it anticipates its EPS to be somewhere between $4.40 and $4.50.

Macy's has a price-to-earnings ratio of 14, which is much lower than those of its competitors Ross and Gap, which have P/E ratios of 17.7 and 15, respectively. Moreover, when we analyze the forward price-to-earnings ratios of these three retailers, we see that Macy's forward P/E of 11.9 is once again lower than those of Ross at 15.9 and Gap at 14. This reiterates my belief that Macy's is a value stock. The year-over-year return for Macy's was 32%, which beats the returns for Ross at 15% and Gap at 30%.

Ross Stores performed quite well in its recent quarter but lowered its earnings guidance amid macroeconomic challenges. In comparison to Ross' year-ago quarter, EPS grew 12% to $0.80 while sales increased 6% to $2.4 billion. Comparable-store sales grew 2% primarily due to an increase in average basket size.

Ross consistently rewards its shareholders through buyback programs. Furthermore, the company plans to open new stores this year and it opened 88 stores last year, which shows that it is confident about its future prospects. The company expects earnings per share for the fourth quarter of $0.97-$1.01 while its full-year earnings guidance stands at $3.83-$3.87 per share.

In the third quarter, Gap posted strong profits as its earnings per share increased 14% to $0.72. Sales grew 3% to $3.98 billion but same-store sales growth slowed to just 1% from 6% in the year-ago quarter. Net sales for the month of January were also down to $899 million from $1.13 billion in the same month of last year.

Gap plans on growing its franchise business in international markets that include China, Japan, Philippines, Brazil, Peru, and Costa Rica. Moreover, Gap continues to focus on its online business which grew 20% during the third quarter. Overall, the company is moving in the right direction as it keeps capturing more market share.

Final thoughts
At a time when most retailers aren't generating healthy incomes, Macy's had a strong earnings report. The company is expected to post even more profit for the fourth quarter, as it had a great holiday season. Macy's latest cost-cutting program will ensure that it continues to reduce its costs, which is the key to profits during these economic doldrums. Financially, the company is sound and it appears to be undervalued at this moment. Considering all of this, I believe Macy's presents a great investment opportunity at this point in time.