Microsoft (MSFT -0.25%) has been on a tear so far in 2019. The tech colossus' stock price is already up more than 40% this year, and its shares are trading near all-time highs. But could this $1 trillion behemoth still be undervalued?

Cloud-based growth

Microsoft's transition to the cloud has been impressive. Its decision to offer its Office suite of productivity applications as a cloud-based service was brilliant. Rather than receiving a one-time up-front sale and then trying to convince users to upgrade several years later, as was historically the case with the traditional packaged software model, Microsoft's Office 365 service helps to lock users into its ecosystem with a relatively small, but recurring, monthly fee . Microsoft is able to deliver upgrades via the cloud, which helps to keep its software up to date and  users on the same and best version of its software. This provides a better experience to users and gives Microsoft a consistent source of high-margin, recurring revenue.

Digital charts and a digital cloud

Microsoft's cloud services are fueling its growth. Image source: Getty Images.

Microsoft has also built a powerful cloud infrastructure business. Microsoft Azure gives businesses access to top-tier cloud computing resources. Instead of spending huge sums to build their own data centers, these companies rent Microsoft's cloud computing assets on an as-needed basis. In turn, they enjoy cost savings and increased operational flexibility.

Cloud computing has grown into a massive industry, one that's projected to exceed $623 billion by 2023, according to research firm MarketsandMarkets, up from $272 billion in 2018. Microsoft is currently the No. 2 player in this enormous market, behind Amazon Web Services, and it's quickly gaining share on its rival. Microsoft recently won a $10 billion contract from the Defense Department, edging out Amazon in the process. 

In its fiscal 2020 first quarter, Microsoft's productivity and business processes revenue rose 13% year over year to $11.1 billion, driven by a 25% jump in Office 365 commercial sales. Meanwhile, revenue in its Intelligent Cloud business leapt 27% to $10.8 billion, fueled by a 59% surge in Azure sales. 

Bountiful capital returns

Better still, Microsoft excels at turning sales of its software services into cash for investors. The company recently boosted its quarterly dividend by 11% to $0.51 per share. On an annualized basis, Microsoft's $2.04 payout currently represents a yield of about 1.4%.

The tech titan is also buying back its shares in droves. Microsoft repurchased nearly $20 billion worth of its stock in fiscal 2019, and its board of directors approved a new $40 billion share repurchase program in September. 

In all, Microsoft returned more than $33 billion to investors in 2019, including nearly $14 billion in dividends. Incredibly, the tech powerhouse's free cash flow exceeded these huge capital returns by approximately $5 billion during this time. Microsoft also has more than $60 billion in net cash in its coffers. This fortress-like financial position -- along with the strong likelihood that its cloud businesses will continue to drive its cash flow production even higher -- makes it a safe bet for investors to expect many more dividend increases in the coming years.

A gold miniature bull on top of a black keyboard button labeled buy

Image source: Getty Images.

So, is Microsoft a buy?

Some investors may balk at paying 27 times Microsoft's projected earnings for fiscal 2020, but I'd argue it's a fair price to pay for an elite enterprise that should be able to grow its earnings by more than 15% annually over the next half-decade. 

Thus, I believe that Microsoft's stock is a buy -- and that investors who buy shares today are likely to enjoy solid gains from this point forward.