S&P closed at 1515 on Feb. 22, 2013. Based on the Standard & Poor's data, the aggregate earnings for the 500 companies included in S&P 500 index are 102.71 per share for the last 12 months. Thus, the trailing 12-month P/E ratio is 14.75, very close to the historical average of 15.
Further, the Standard & Poor's estimate for the aggregate earnings over the next 12 months is $112.13 per share, implying the forward 12-month P/E ratio is 13.51. Thus, S&P 500 is correctly priced or slightly undervalued based on the P/E metric.
However, Robert Shiller of Yale University suggests that both of these short-term measures for the P/E ratio can be misleading. He suggests using the inflation-adjusted earnings for the last 10 years as a denominator, in what he defines as a Cyclically Adjusted P/E Ratio 10 (CAPE10). Dr. Shiller provides the data for these measures on his website, (the average CAPE10 from 1871 to 2013 is 15.16)
So what is the current CAPE10? It's 22.91 (see Figure 1)!
Thus, based on the Shiller's CAPE10 measure, S&P 500 (SPY) is about 33% overvalued relative to its historical average.
Bear in mind that the P/E ratio is not a stock market timing tool, as Figure 1 shows, the market can get even more overvalued. However, it is important to point out that, from a fundamental long-term buy-and-hold point of view, the market is expensive. Why? The earnings have not kept up with the prices over the last 10 years, compared to historical averages.
Figure 1. CAPE10 (source: Shiller)