Shares of Whole Foods Market (Nasdaq: WFM) hit a 52-week high this week. It wasn't the only premium grocer reaching new peaks, as The Fresh Market (Nasdaq: TFM) hit its own 52-week high yesterday. Let's take a look at how these two companies got here to find out whether there are still clear skies ahead.

How it got here
Both Whole Foods and Fresh Market have posted the impressive gains this year, the kind that growth investors crave. Despite warning the market that high margins might shrink, Whole Foods' latest quarterly earnings impressed, with double-digit growth in net income and revenue to go with 8% same-store sales growth. Fresh Market had similar results, with the same high level of same-store sales growth that's a hallmark of growth-stock retailers.

The two companies have been bright spots in a sickly grocery sector, and their outperformance relative to other grocers highlights a trend toward premium retail that's taken many sectors by storm:

WFM Total Return Price Chart

WFM Total Return Price data by YCharts.

The only real competition for grocery gains was Roundy's (NYSE: RNDY), until its latest earnings confirmed what SUPERVALU (NYSE: SVU) investors have known for over a month -- discount groceries aren't bringing in the big bucks. Both companies disappointed investors this summer with lousy forward guidance and may have further drops ahead. Mid-range Kroger (NYSE: KR) has done respectably of late, and is the sort of good corporate citizen that Whole Foods is often held up to be, but its bottom-line results haven't gone anywhere in recent years:

WFM Total Return Price Chart

WFM Total Return Price data by YCharts.

That helps explain why Whole Foods is up, but can it and Fresh Market keep growing? Let's dig into the details to find out.

What you need to know
It's not very hard to spot the difference between these grocers. The premium brands have the best net margins, the most bullish analyst sentiments, and the highest valuation ratios. Kroger, as the middle-of-the-pack player, occupies a statistical middle ground. Then there are the discount disasters:

Company

P/E Ratio

Price-to-Free-Cash-Flow

Net Margin (TTM)

Projected Growth Rate (2013)

Whole Foods 40.6 47.1 3.8% 15.1%
The Fresh Market 50.9 912.2 4.9% 24.3%
Roundy's 6.6 NM 1.1% 4.3%
SUPERVALU NM 1.1 (3.0%) (5.5%)
Kroger 20.7 12.8 0.6% 6.3%

Source: Yahoo! Finance. NM = not meaningful due to negative results. TTM = trailing 12 month.

Both Whole Foods and Fresh Market sport eye-popping P/E ratios, and could be subject to a pullback if they fail to live up to high expectations. We at the Fool have pointed out this risk before -- my colleague Jeremy Bowman wrote a high-level view of the growth-stock slowdown last month.

What's next?
Premium grocers run the same risks as any high-flying food-centric retailers. If prices keep going up, will consumers keep paying? Is the organic trend strong enough to resist another recession? How much growth is enough to satisfy the Street? These questions are critical to Whole Foods' and Fresh Market's futures, and it may not be long before we get answers.

The Motley Fool's CAPS community has given Whole Foods a four-star rating, but The Fresh Market only merits two stars from our CAPS players. Will there be room for two long-term winners, or will Whole Foods be the last grocer standing?

Looking for detailed coverage of Whole Foods? The Fool's got a premium research service covering the high-end grocer, and you can get a year's worth of updates for less than the cost of a trip to the Whole Foods salad bar. Start your investigation now with the help of our top retail analysts.