It's only been three months since the start of 2024 but shares of Amazon (AMZN 0.89%) are already up almost 20% year to date. And with this upward move, the stock now sits within a few bucks of its all-time high. This might be surprising for some. But for those who follow Amazon, this was totally predictable.

Since it went public nearly three decades ago, there's one financial metric that's predicted Amazon's stock price better than any other. Allow me to explain what this metric is and what it's predicting next for Amazon stock.

The chart Amazon investors need to see

While revenue growth is exciting (and Amazon has it in spades), investors clearly pay close attention to the company's operating income. Companies have income and expenses that aren't considered core to the business -- taxes, interest income, and depreciation are a few noncore examples. But operating income only accounts for things that are core.

In Amazon's case, its stock price correlates strongly with its operating income. The trend in the 20-year chart below is hard to argue with here.

AMZN Chart

AMZN data by YCharts

The last few years have been perfectly exemplary of the long-term trend. In 2022, Amazon's operating income dropped by 51% year over year. By comparison, shares of Amazon were down 50%. Then in 2023, Amazon's operating income jumped 202%, which was accompanied by an 81% increase in the stock price.

Therefore, the gains and losses for Amazon stock aren't always in perfect proportion with the increases and decreases of its operating income. But directionally there's a relationship.

Amazon's cloud computing platform, Amazon Web Services (AWS), has driven its operating income higher over the last decade. In 2013, AWS generated just $3.1 billion in net sales. In 2023, net sales for AWS had increased to $90.8 billion -- nearly 30 times larger.

In 2023, AWS accounted for 67% of its operating profit and it accounts for most of the operating profit in most years. Therefore, it's clear that growth for this business segment has been the primary driver for Amazon's spectacular stock returns.

And now the prediction

Amazon's management already gave guidance for operating income for the upcoming first quarter. The company says it expects to earn between $8 billion and $12 billion. Now, that's a large range and reflects a lot of moving pieces. In other words, management is saying it has a lot going on and it isn't sure just how good its profits will be exactly.

However, even at "just" $8 billion, Amazon's operating income would be up 67% year over year. And there's typically not much seasonality in the company's profits. Therefore, investors can project that Q1 profits will simply be the start of a really strong year.

The backlog for Amazon's AWS also points to a strong year in 2024 and beyond. The company ended 2023 with contracted performance obligations of $156 billion. For perspective, this was a $45 billion increase from the end of 2022.

These numbers mostly represent future net sales for AWS, sales that will come in over the contracted time period. Considering AWS had a roughly 40% year-over-year increase in contracted performance obligations, it's not a stretch to believe that 2024 and beyond is shaping up well for AWS.

Furthermore, if things are shaping up well for net sales for AWS, then Amazon's overall operating income is also poised to rocket higher. And as I've explained, that's historically been very good for the stock.

Nothing is guaranteed with investing and the future is never certain. Moreover, it would be futile to try to predict Amazon's future stock price to the day and to the penny. However, by all indications, the company's biggest profit driver is headed higher. And that bodes well for Amazon shareholders today.