For the moment, the stock market rout seems to be over.

After several days of weakness and back-to-back gut-punch drops on Friday (666 points) and Monday (1,175 points), the Dow Jones Industrial Average (along with the other big indexes) closed out Tuesday on a high note, with the Dow ending up more than 550 points. It was nowhere near enough to make up for the recent bloodbath losses, but it was at least enough to stop the bleeding.

Everyone more or less agrees that the markets were overvalued. But just how overvalued?

Let's look at price-to-earnings (P/E) ratio. That's how many dollars investors are willing to plunk down for every dollar of a company's profit. If a stock is selling for $50 a share, and that company's earnings-per-share is $5, then the price-to-earnings ratio is 10. You can look at the P/E ratio for an individual company. Or, if you want to get a look at the economy as a whole, you can look at the P/E ratio for a whole index.

If the P/E ratio gets unusually high compared to its historical average, that's generally evidence that we're in for a correction. Obviously, one way to get a correction is for the stock market to tank and prices to fall — which brings the ratio back into its historic bounds.

Here's the P/E ratio for the S&P 500 going back over a century.

(Graph courtesy of Multpl.com.)

As you can see, today's P/E ratio is high compared to the historic norm. But it's not that high. We're nowhere near the stock market crash in 2001 or 2007-08's housing bust, which led to the Great Recession. Judging by the P/E ratio, the stock market today may well be "frothy," as observers love to say, but it's not really a bubble.

Frothy certainly justifies a price correction, which is exactly what we're going through. But it doesn't suggest the need for a massive correction. And remember, the stock market experiences modest panics pretty regularly. While Monday's 1,175-point drop was the single worst one-day points plummet in history, "on a percentage basis, [Monday's] drop doesn't even enter the top 250," Pavel Molchanov, an equity analyst at Raymond James, told The Washington Post. "Also, the past week provides a reminder — painful but timely — that volatility has not been repealed. Nothing goes up in a straight line."

That said, there are still some ominous signals.

The P/E ratio above is calculated using earnings over the last 12 months. But oftentimes, it takes years for a full picture of company earnings to become clear. So economist Robert Shiller came up with a tweak: He calculated the P/E ratio of the S&P 500 using the average earnings over the last 10 years. The idea was to smooth out the fluctuations and give a better read on fundamental long-term value.

It's called the "cyclically-adjusted price-to-earnings ratio" (or CAPE). Here it is.

(Graph courtesy of Multpl.com.)

That's a lot scarier. At a ratio just over 30, we're well above the historical average of 15 — and above where we were just before the 2008 bust.

But don't panic just yet. Because the CAPE is inherently backward looking, it can be thrown off by weird stuff that came before. And stock markets have been on a bizarre rollercoaster over the last 10 years. Furthermore, Shiller's ratio is designed to predict long-term outcomes, not short-term crashes. "The current level of CAPE suggests a dim outlook for the American stock market over the next 10 years or so, but it does not tell us for sure nor does it say when to expect a decline," Shiller wrote in March 2017.

"There is no clear message from all of this," he continued. "Long-term investors shouldn't be alarmed and shouldn't avoid stocks altogether." They shouldn't get over-excited about bull markets under President Trump either. And they should probably be shifting their risk calculations and moving a bit more money into bonds. But that was about it.

It's worth noting, too, that while an unusually high P/E ratio will generally correct, a collapse in stock prices isn't the only way to correct. Earnings could also surge, raising the denominator, and thus bringing the ratio down.

Could future earnings possibly justify such a high current Shiller CAPE? "Big American companies are wielding increased market power, enabling them to earn outsized profits at the expense of America's customers," The Economist pointed out late last year. Industry has become more concentrated, with the biggest firms accounting for larger shares of all revenue. All of which suggests growing monopoly power, and more barriers to competition. That, along with the decreased power of unions, helps companies increase earnings.

Companies have gotten very good at exploiting workers and customers to pocket ever-higher profits. And that suggests that the stock market's recent sky-high valuations have real, concrete justifications. The plunge over the last few days may not be a necessary correction so much as one of the market's regular-but-temporary panics.

That would be good news for the minority of Americans with robust investment portfolios. But not for anyone else.