The forward price/earnings (PE) ratio — the price of the S&P 500 divided by the expected earnings of those S&P 500 companies — is probably the most popular way to measure value in the stock market.

But what does it really tell us?

One popular rule of thumb is that when the forward PE is above average, the market is expensive and future returns will be low. And when the PE ratio is below average, the market is cheap and future returns will be high.

That's based on a pretty rough summation of the historical data.

Barclays' Jonathan Glionna offers a much more granular look at the history of PEs and future returns in a note to clients this week. And in an incredible feat, he crammed all of the information into one chart.

Warning: this chart is a bit tough to digest. But we'll walk you through it with a few bullets.

Barclays

Frequency of certain PEs: This is captured by the height of each of the bars. As you can see by the tallest bar, the stock market has spent most months (61) since 1988 at 15x, which also happens to be right around the long-term average. In other words, when the PE is above 15, people often say the market is expensive.

Frequency of next-12-month returns: The blue bars, the light blue bars, the super-light blue bars, and the red bars indicate certain levels of 12-month returns. As you can see by the heights of the darker blue bars, big 10%+ returns occur more frequently when you invest when the PE is lower. But they're certainly not unheard of at higher PE levels.

The average returns: This is captured by that black line that squiggle from the top left to the bottom right of the chart. It's an encapsulation of what the colored bars are telling us. Basically, the lower the PE, the higher your future returns tend to be.

At a PE of around 17x, the S&P 500's valuation is arguably on the high side. But the history since 1988 shows that 12-month returns have always been positive.

"The same is true at 16x and 18x earnings: forward returns have always been positive over a one-year horizon," Glionna notes. "At 17x earnings, the average forward 12-month return is 13%, ranging from 0% to 31%. Based on this data, 17x forward earnings is not expensive."