With major U.S. stock indexes near all-time highs, have stocks become too expensive?

The S&P 500 (SPY) crossed above a new high of 1,700 on Aug. 1 and is ahead by almost 20% since the start of 2013. Likewise, the Dow Jones Industrial Average (DIA) is ahead by 20% and trades near its all-time high of 15,650. And as stock prices have edged higher, so have valuations.

The forward 12-month P/E ratio for the S&P 500 has increased to 14.4 from 12.7 at the end of last year, according to FactSet. For historical perspective, it’s worth noting S&P’s current P/E ratio is only slightly above the 10-year average (14.1).

The reason the forward 12-month P/E ratio is not higher is that analysts are expecting record-level EPS over the next four quarters (Q3’13–Q2’14) for the S&P 500, reports FactSet.

Another measure of stock ­valuations is the Shiller PE Ratio, also known as the Cyclically Adjusted PE Ratio (CAPE Ratio).  This particular gauge is the price earnings ratio based on average inflation-adjusted earnings from the previous 10 years and is less prone to dramatic fluctuations in any one year.

The S&P 500’s current Shiller PE ratio is 24.85, which is above its historical median of 15.88 but still shy of its all-time peak of 44.20 in December 1999.

Put another way, the S&P 500 at current levels trades somewhere between cheap and expensive, but closer to cheap.