Supermarket stocks have been suffering lately.

A combination of factors, including food deflation, increased competition, and new channels like meal kit delivery have put a squeeze on a number of stocks. Natural food grocers like Whole Foods Market, Inc. (NASDAQ:WFM) and Sprouts Farmers Market, Inc. (NASDAQ:SFM) have taken it particularly hard, as traditional rivals like Kroger and Costco have horned in on the organic space, taking market share and eroding advantages that natural grocers once had.

A handful of chard

Image source: Whole Foods Market.

Both Sprouts and Whole Foods have significantly underperformed the market since Sprouts' 2013 IPO. 

SFM Chart

SFM data by YCharts

Let's take a closer at look at what each stock has to offer to see which is the better buy today.

Whole Foods in play

Whole Foods shares have rallied lately since activist investor Jana Partners took a stake in the grocer and has begun agitating for a sale. Rumors have circulated about a number of potential buyers, including Amazon.com, which reportedly considered making a bid for Whole Foods last fall; Kroger, which at least one analyst has pushed for; and privately held Albertson's, which held preliminary talks with banks about making a bid for Whole Foods.

It's not surprising to see this push for a sale, and investors have cheered the move, sending the stock up more than 20% since the news broke. Whole Foods' comparable sales have fallen six quarters in a row, and management, despite lowering prices on some items, streamlining management, and introducing a rewards program, seems to have no solution for the shrinking sales. Analyst expect earnings per share to fall by 15% this year, and comps fell 2.4% in the quarter ended January 15 -- and forecasts call for same-store sales falling 2.5% for the full year.

At this point, the potential for a sale seems to be the only thing propping up the stock. If that fails to materialize, the stock is likely to fall.

A piece of pizza and a carton of eggs

Image source: Sprouts Twitter page

Sprouts bounces back

Like other grocers, Sprouts saw comparable sales growth slow significantly last year as management noted "significant deflationary pressure." However, in its most recent report, the company seemed to be recovering. Comparable sales increased 1.1%, marking the company's 40th consecutive quarter of same-store sales growth, and earnings per share rose 10%. The company also recently opened up markets in Florida and North Carolina, a contrast to Whole Foods, which is closing stores and scaling back its expansion plans as the company retrenches. 

Sprouts also boosted its guidance in the report, calling for full-year comparable sales growth of 0.5-1.5% and earnings per share of $0.87-$0.91, up from $0.83 in 2016.

Sprouts shares also soared in March as it took its own turn at the buyout rumor mill when Bloomberg reported that Albertson's was also considering going after the company. The two companies held preliminary talks, according to the news outlet, but sources were clear that a deal may not result from the talk.

Sprouts would be easier for a buyer to stomach than Whole Foods, as its market value is just $3.2 billion, compared to Whole Foods at $11.7 billion.

And the better buy is

Much of the potential value in a Whole Foods acquisition seems to have been squeezed out by the recent spike in share price. The supermarket chain already carries a P/E ratio of 26.5 with falling profits. Selling it at a premium could drive that above 30, which seems too expensive to justify. 

Sprouts, by comparison, is only slightly more expensive at a P/E of 28, and with its smaller price tag would seem to be more appealing as a buyout. Ignoring the prospect of an acquisition, Sprouts is also in a better position to continue growing profits and expanding.

Sprouts is the better buy here. The company's emphasis on value has helped it better weather increased competition and food deflation, and it should have a longer growth runway ahead of it than Whole Foods. At this point, Whole Foods shares offer few, if any, advantages over those of its smaller rival.

John Mackey, CEO of Whole Foods Market, is a member of The Motley Fool's board of directors. Jeremy Bowman has no position in any stocks mentioned. The Motley Fool owns shares of and recommends Whole Foods Market. The Motley Fool has a disclosure policy.