There are numerous technical and fundamental indicators one can use to try to determine if the market is anywhere from cheap to overvalued. The Price/Earnings Ratio of the S&P 500 is one of those indicators. From Investopedia: "The price-to-earnings ratio (PE ratio) is the ratio for valuing a company that measures its current share price relative to its per-share earnings (EPS). The price-to-earnings ratio is also sometimes known as the price multiple or the earnings multiple.
P/E ratios are used by investors and analysts to determine the relative value of a company's shares in an apples-to-apples comparison. It can also be used to compare a company against its own historical record or to compare aggregate markets against one another or over time."
When we aggregate those prices and earnings for the S&P 500, we create a view of the market as a whole. We usually get the PE ratio on an end of quarter basis and it is given current, not constant dollars. To get a more consistent measure that also takes out the effects of inflation we use Schiller's CAPE ratio - cyclically adjusted price-to-earnings ratio, which uses both the 10yr average of earnings and inflation.
CAPE ratio = -------------------------------------------------------------
10−year average of inflation−adjusted earnings
In the chart below, we have the CAPE for the S&P 500 in the upper panel and the price of the S&P 500 in the lower panel. We've cut the period down to the last 40 years. We can see that 'tops' and 'bottoms' in the CAPE tend to correspond to highs and lows in the S&P 500.
The issue is that the tops in the CAPE are at various levels that don't necessarily correspond as well to each other. One relatively consistent thing we do see is that they do tend to grow gradually and retract more rapidly. Therefore a contraction in percent might be a better guide to the markets' view of 'value' to 'buy' rather than the outright level of CAPE at higher levels to sell.
PE Ratios (using CAPE or not) are currently in a range associated with the market being full to overpriced - but, that condition can go on for quite a long time as we have seen previously. Yet, one might be cautious about becoming too overweight in stocks at these price levels as better relative prices are likely if history is a guide.