Few technology companies have been as consistently successful as Microsoft (MSFT -1.27%). The largest tech stock at the height of the dot-com bubble, Redmond is the only top-five finisher that still sports one of the market's five largest market caps in 2023. Don't get me wrong -- the next four runner-ups from 1999 are still respectable businesses with significant and often market-leading operation two decades later. They just can't keep up with Microsoft's game-changing success:

MSFT Market Cap Chart

MSFT Market Cap data by YCharts

Microsoft is running neck-and-neck with Apple (AAPL -1.22%) at the very top of the mountain. Those are the only two market caps north of $2 trillion right now.

The rest of the former champions on my list never reached a trillion-dollar market cap, let alone the two trillion Microsoft is worth today. The next-largest name nowadays is energy giant ExxonMobil (XOM 1.15%), with a relatively small $416 billion market value. Retail titan Walmart (WMT 0.46%) follows close behind at $380 billion. Both of these names are still in the top 20, ranked Nos. 12 and 15, respectively.

Computer networking veteran Cisco Systems (CSCO 0.44%) has fallen far behind, watching the 35th position with a $209 billion market value. And the industrial Godzilla known as General Electric (GE -3.19%) has lost most of its heft, falling all the way to No. 101 with a market cap below $100 billion. Ouch.

The changing face of Microsoft

Much of Microsoft's success can be attributed to its ability to adapt to the changing landscape. In the early days, Microsoft focused on software development and grew into a major player in this space. Windows dominated the operating system space and Microsoft Office was the only suite of office productivity tools that mattered.

But as mobile devices became more popular, the company shifted its focus to business software and services, and then to the cloud. Perpetual licenses are not the standard option anymore, replaced by cloud-based services and monthly subscription fees. Familiar names like Windows and Office are still important, but in very different forms. Moreover, cloud computing is Microsoft's strongest growth driver year after year.

And by being open to dramatic change, Microsoft held on to its position as a leading technology company.

In 1999, Microsoft was a software company with a market cap of $606 billion, but today it's a cloud company with a much larger market cap of $2.02 trillion. The Azure public cloud is the fastest-growing part of Microsoft and is one of the most important cloud platforms on the market. This is the future and Microsoft is pulling every available lever to get deeper into the cloud computing sector.

Microsoft's not-so-secret weapon: Satya Nadella

So, what happened in between? Microsoft had to change and adapt its offerings as mobile devices became more popular. The visionary leader Satya Nadella also took over the CEO role from the combative Steve Ballmer in 2014, which turned out to be a pivotal move.

Under Ballmer, Microsoft was ready to start a fight over every possible setback. Nadella's more flexible leadership style lets the company roll with the punches instead, adapting to changing circumstances as needed. When mobile devices became popular, the Ballmer version of Microsoft missed the boat with Windows Mobile. Nadella shrugged off that challenge to double down on cloud-based services that also happen to work well on mobile devices. Nowadays, Microsoft's Windows even includes support for Linux code. Nadella's company is embracing its former foes without taking the once-mandatory next steps of attempting to "extend" and "extinguish" them.

And here we are in early 2023, as the AI market looks ready to explode. Once again, Microsoft is taking a proactive approach and teaming up with the privately held OpenAI lab's innovative ChatGPT platform. A next-generation version of GPT is included in the next major release of the cloud-based Microsoft 365 office suite.

Two technicians walk and talk down a data center aisle.

Image source: Getty Images.

The Nadella effect in full force

I'm not even surprised anymore at Redmond's willingness to try radically new ideas that were invented somewhere else. None of this would have been possible if Steve Ballmer still ruled Microsoft's C-suite.

By being willing to change, and play a leading role in an evolving market with room for many winners, Microsoft has come out on top. If you're looking for an investment that has the potential to generate long-term growth, then Microsoft is definitely worth considering. It's big today, but will almost certainly be even bigger in the future.