The S&P 500 currently trades exactly where it did in December 1998. That's nearly 13 years of stagnation, and a top reason so many have become disenchanted with stocks.

But here's another number that might be just as shocking: During that 13-year period, earnings among S&P companies increased by an average of 6.3% per year, more than doubling in value. By comparison, between 1980 and 2000 -- often seen as the most prosperous period of American business history -- earnings grew by 6.1% a year. The past 13 years have been a terrible time for stock prices, but a glorious time for stock earnings.

That stock returns have underperformed earnings growth likely means that some stocks are as cheap (or close to it) as they've ever been. Do some digging, and you'll find that's exactly the case. Here are four.

(Nasdaq: AAPL) shares have actually been one of the best performers of late, gaining 340% over the last five years.

But what's grown far faster? Apple's earnings, which have jumped over tenfold since 2006.

Put those two together, and you get a remarkable figure: Apple now trades at the lowest valuation it's seen in over 10 years. Its current P/E ratio of 16 is less than half the multiple to normalized earnings shares commanded in late 2009, and one-third the level of 2007.

Those figures might overstate Apple's valuation. Since the company doesn't pay a dividend or buy back shares, cash is piling up on its balance sheet. If you back out a conservative amount -- say, half -- of Apple's cash from its current market capitalization, shares trade at less than 10 times forward earnings.

(NYSE: WMT) shares increased all of 2.5% over the past decade. During that time, its earnings grew by nearly fourfold. That's caused its P/E ratio to collapse by over 70%.

In fact, Wal-Mart's P/E ratio is now about the lowest it's ever been -- lower than it ever got during the depths of the 2008-2009 market sell-off.

Maybe that's rational? A falling valuation doesn't always mean a cheap valuation, after all. Wal-Mart, however, looks plainly cheap at these levels. Between dividends and share buybacks, cash returned to Wal-Mart shareholders provides a yield of 7.5%, or almost four times the yield on 10-year Treasury bonds.

Wells Fargo
Here's something to think about: In March 2009, Warren Buffett said that if he had to put his entire net worth into one stock (besides Berkshire Hathaway (NYSE: BRK-B)), it would be Wells Fargo (NYSE: WFC). At the time, the bank traded at a price-to-tangible-book ratio of about 1.2. Today, with shares down 20% year to date, Wells Fargo trades at 1.3 times tangible book.  

Indeed, Wells Fargo shares are nearing an all-time low valuation. The banking industry has a mountain of challenges and headaches to deal with, but the most important question for investors is: How much of that is already priced in? At these prices, the answer could be all of it and then some.

(NYSE: HPQ) might go down as one of the most mismanaged companies of recent times. Thankfully, it can boast another record: one of the cheapest stocks of recent times.

After burning through CEOs, bumbling acquisitions, and backpedaling on spinoffs, HP's stock is down 35% this year. That's pushed its valuation to an obnoxiously low 5.9 times forward earnings -- up slightly from this summer's trough, but otherwise the lowest ever in the company's history.

Consider this: HP has a market cap of $53 billion, yet it generated more than $9 billion of free cash flow over the last year. Assume HP's new management squanders half of that cash flow on more misguided acquisitions, and shares would still be a bargain.

Your move
Investing might look dreadful these days. The economy is in awful shape, and stocks have been flatlining for a decade. But how misleading and misguided those feelings can be: Corporate profits have never been higher, and the fact that stocks have been stagnant for a decade simply means they're better bargains.

If you're looking for more of those bargains, check out The Motley Fool's free report: "Secure Your Future With 11 Rock-Solid Dividend Stocks.” Just click here to grab a copy.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.