The top chart shows the price to earnings ratio of the S&P 500 Stock Market Index. We are now only down to the top end of the long term range. The ratio is not perfect. It can spike when earnings go down a lot as it did in 2003, 2009, and 2020 so you have to ignore the spikes and look at the levels just before and after, but overall it can be a useful indicator. As you can see, a P/E of 15 would be in the neighborhood of the 2009 low and that would probably entail a further drop of roughly 20% from here. When we start getting closer to that, we can call it undervalued.
A better, more stable indicator is the price to sales ratio on the S&P 500 Stock Market Index. Unfortunately, data is only available back to 2002 but this bottom chart shows even more clearly that the market is still at an elevated price. As you can see here, it would take a drop of about 33% to get back down the 1.5 level and a much larger drop, more than 50%, to get to the 2009 level if sales stayed the same.
So, no – the stock market still can come down a long ways yet before it is undervalued.