TheStreet's Jim Cramer says although the stocks are about the same price, Whole Foods Market  (WFM)  is a better buy than Kroger (KR) .

The supermarket chain has "kind of lost its mojo," Cramer says.

"I do, by the way, like Whole Foods," he added. "Notice the stock has bottomed at $30. They continue to do a buyback. I prefer Whole Foods at this price more than I do Kroger."

Whole Foods is in the middle of rolling out its new low-cost 365 format. However, its shares are down about 40% over the past 12 months. In first-quarter 2016, same-store sales dropped 1.8%, worse than analysts' projection of 1.6%.

Kroger has moved toward healthier offerings. Sources told The Deal's Sarah Pringle that Kroger unsuccessfully bid for Fresh Market  (TFM) , which was acquired by Apollo Global Management  (APO)  on March 14 for $1.4 billion.

The Cincinnati-based chain has struggled to please Wall Street. After releasing its fiscal 2015 earnings on March 3, the stock fell 7%, and an additional 2.5% the next day. Kroger reported lower-than-expected same-store sales and weaker 2016 guidance.

On April 1, Kroger announced it had invested in Colorado indoor farmers' market concept Lucky's Market. A source told Pringle that the investment is around $20 million. Lucky's may help Kroger compete with the likes of Whole Foods and other competitors like Sprouts Farmers Market.

Even without Fresh Market, Kroger has been acquisitive recently, buying Bob Mariano's grocery company Roundy's  (RNDY) on Nov. 11 and completing its $2.44 billion acquisition of Harris Teeter Supermarkets on Jan. 29. Those deals increased Kroger's presence in the Midwest and the South, respectively, just as Lucky's will make Kroger a bigger player in the Colorado and Florida markets.

Whole Foods, meanwhile, is expanding its e-commerce presence in addition to its lower-priced concept. Last month, the company announced a deepened partnership with grocery delivery start-up Instacart to expand its joint delivery service's geographic reach.

More from Investing

Berkshire Hathaway Loosens Buyback Rule to Help Spend $109 Billion

Berkshire Hathaway Loosens Buyback Rule to Help Spend $109 Billion

Nucor Shares Retreat Despite Nearly Doubling Q2 Earnings

Nucor Shares Retreat Despite Nearly Doubling Q2 Earnings

Investors Trample Skechers After Disappointing Earnings

Investors Trample Skechers After Disappointing Earnings

Tilray's Stock Lights Up Following First U.S. Marijuana IPO

Tilray's Stock Lights Up Following First U.S. Marijuana IPO

Domino's Stock Dips After Revenue, Same-Store Sales Miss

Domino's Stock Dips After Revenue, Same-Store Sales Miss