We all know just how far the market has rebounded from its 2009 lows, with stocks displaying impressive resilience in the face of big challenges. That leaves investors to wonder: Is this rally already overextended, or could stocks actually regain their 2007 highs?

Getting some perspective
The 80% gains that the S&P 500 enjoyed before last week's 15-minute mini-crash have helped many investors repress their painful memories of the bear market that began in late 2007. With everything that's going on around the world, from riots in Greece and massive European government intervention to the oil spill in the Gulf of Mexico, you might have expected the same kinds of abrupt freefalls that the market experienced so often in the autumn of 2008. Yet the market has held its ground tenaciously, despite these challenges.

However, from another viewpoint, stocks still have a long way to go before they recover their former glory. Even at its April peak, the S&P 500 was still more than 22% below its all-time highs of October 2007. With the economy reviving, and people adapting to the "new normal," it doesn't seem as ridiculous as it once did that stocks could reach new highs in the near future.

A look at earnings
Corporate earnings can provide one decent gauge for the state of the economy. By most accounts, first-quarter earnings reports have been strong, with many companies beating expectations and posting substantial growth. But given that last year's numbers were in many cases extremely weak, making comparisons with those figures may give an unreasonably rosy view of the recovery.

To get a longer-term idea of where corporate earnings are, I took a look back not only at the past year, but also at the first quarter of 2007, before the bull market ended. Doing so reveals three distinct groups of companies that have had varying degrees of success in surviving and growing through the recession.

Cream of the crop
Some stocks have seen earnings growth both in the past year and since 2007. The obvious poster child for the full recovery is Apple (Nasdaq: AAPL). Its net income has grown at nearly a 60% annual rate over the past three years, and its stock price has been hitting all-time highs for months now. The success of the iPhone powered most of its growth since 2007, and both that device and the new iPad may sustain Apple's expansion in the future. You can see that same kind of strength throughout the technology sector, since Google and Amazon.com have also seen substantial earnings gains over the same periods.

But tech isn't the only winner. Coca-Cola's (NYSE: KO) rebound over the past year has been enough to lift its earnings above 2007 levels, thanks largely to continuing growth in emerging markets like China. Similarly, McDonald's (NYSE: MCD) has seen double-digit earnings growth, thanks largely to new stores and strong comps in its international markets. Even within the hard-hit financial sector, standout Visa (NYSE: V) has bucked the trend by avoiding credit-driven problems and focusing on its core transaction business.

Never recovered
On the other hand, some companies haven't even bounced back from last year's levels, let alone the peak of the bull market. General Electric (NYSE: GE) is still struggling to figure out how to manage a massive conglomerate with widely different problems among its business segments, which range from its hard-hit financial business to a long-struggling industrial complex. Big pharma companies Merck (NYSE: MRK) and Pfizer have seen earnings fall as they attempt to assimilate major acquisitions.

Even companies in defensive industries haven't all held up. Colgate-Palmolive (NYSE: CL) has seen double-digit drops in net income, and competition among consumer-oriented companies is only getting tougher.

Stuck in the middle
In between these two groups are the many companies that have seen signs of life, but still lag behind net income levels during better times. Big energy stocks like ExxonMobil and Chevron are putting up impressive gains compared to last year's first quarter, when oil prices had collapsed. But they'll be hard pressed to match their earnings from when oil fetched $100 per barrel and more -- unless oil prices reach triple digits again.

All told, it's difficult to draw general conclusions about where the market will go from here. Different companies' prospects vary wildly. Although passive index investors may not see new highs anytime soon, those willing to seek out potential winners among individual stocks may well succeed in separating the good from the ugly.

If it's stocks you want, should you go with the companies analysts love? Nick Kapur exposes the problem behind Wall Street's screaming buys.

Fool contributor Dan Caplinger thinks at least some record highs are closer than you think. He owns shares of General Electric. Coca-Cola and Pfizer are Motley Fool Inside Value selections. Google is a Motley Fool Rule Breakers pick. Apple and Amazon.com are Motley Fool Stock Advisor recommendations. The Fool owns shares of Coca-Cola, which is also a Motley Fool Income Investor pick. Try any of our Foolish newsletters today, free for 30 days. The Fool's disclosure policy should be in the record books for the most-often-linked friend of investors ever.