This chart shows Microsoft's 5-year stock performance compared to Apple's and the S&P 500. IBT / Statista

Five years ago, Satya Nadella took over as CEO at Microsoft, following in the footsteps of Bill Gates and Steve Ballmer. It wasn’t an easy situation to come in for Nadella, considering that Microsoft had missed the transition to mobile devices, Windows 8 had flopped miserably and the PC market had started its decline, putting Microsoft’s core business, Windows, into question.

“Having worked with him for more than 20 years, I know that Satya is the right leader at the right time for Microsoft,” said Steve Ballmer, when Nadella was announced as his successor. And right he was. Having managed the transformation to the cloud infrastructure and services business before being appointed CEO, Nadella doubled down on this transformation as CEO, turning Microsoft’s cloud business into an industry-leading powerhouse that generates $30 to $40 billion a year in revenue and billions in profit.

Back in 2014, most people given the choice to invest $1,000 in either Microsoft or Apple, probably would have invested in the latter, considering the huge success that Microsoft’s old foe was having with its mobile devices, most importantly the iPhone. And yet, here we are, five years into Nadella’s tenure and Microsoft is not only the most valuable public company on the planet, it has also outperformed Apple over the past five years. As the following chart shows, Microsoft’s share price grew by 228 percent since Nadella took over, beating Apple’s 177-percent increase, not to speak of the wider market which grew by 55 percent, as represented by the S&P 500 index.