With every uptick of the S&P 500, it's getting more difficult to find undervalued stocks to buy. Nevertheless, a few great businesses have been left behind amid the market's surge, particularly Apple (AAPL -0.57%) and Baidu (BIDU 1.24%). Though both companies are definitely facing turbulence, a contrarian look reveals two excellent market leaders up for grabs at bargain prices.

Apple
"It seems like the company has been making headlines for all the wrong reasons lately," wrote Fool contributor Travis Hoium. With more than 200 days since the company's last major product launch, he suggested that Apple needs to wow investors with a new product in order to change Wall Street's narrative.

Obviously, this is easier said than done, but don't count Apple out in 2013 yet. The company's product launches happen on a much faster timetable than its peers. For instance, Microsoft's Xbox One, announced last week, won't be available to consumers until "later this year." Even Samsung runs on a slower launch schedule than Apple. After a March 14 announcement, its Galaxy S4 won't reach U.S. carriers until April 26. Comparatively, the iPhone 5 was announced on Sept. 12, with pre-orders beginning Sept. 14, and shipments and availability in nine countries including the U.S. and Canada on Sept. 21. In other words, Apple could turn the tables on its skeptics very quickly.

Meanwhile, Apple maintains a clear position as an industry leader and trades at a valuation so cheap, it's hard to justify it. In fact, Apple trades on par with Dell, a company with revenue down more than 8% in the trailing 12 months.

Ratio

Apple

Dell

Cheaper?

Price-to-earnings

10.6

12.5

Apple

Price-to-free cash flow

9.5

8.4

Dell

Baidu
The "Google of China" continues to trade at a remarkably conservative valuation after a massive 2012 and 2013 sell-off. Despite a 40% increase in first-quarter revenue from the year-ago quarter, Baidu trades at a P/E of just 19.9.

So what's the catch? Why is there such a huge disconnect between revenue growth and valuation? Baidu's net income was up only 8.5% as research spending and marketing expenses grew 83% and 77%, respectively, weighing on the company's operating margin. Management is making heavy investments in software engineering hires and customer education, in addition to promotional events to drive mobile app installation.

But what will happen to year-over-year net income figures when today's new levels of spending and investments become last year's numbers? Net income growth rates could once again match the company's monstrous revenue growth rates. How? Today's higher levels of spending will be the new norm; spending, as a percentage of revenue won't have as much room to increase. This will make comps look healthier. Of course, this might take another 12 months (an eternity for Wall Street). But for truly Foolish investors, 12 months is a breeze.

A bit of patience
Apple and Baidu will likely post poor performance in upcoming quarters as they face off against some insanely tough comps. In fact, analysts expect current-quarter EPS to decline 21.6% and 0.8% for Apple and Baidu, respectively. But zoom way out, and the story looks far better. For both companies, analysts expect EPS growth rates in excess of 20% per annum during the next five years.

If they're not two stocks to buy outright, Apple and Baidu at least deserve a spot on your watchlist.