As Microsoft (MSFT -2.32%) CEO Satya Nadella puts it, Microsoft is no longer simply a software company, but instead, a productivity and platform company for the mobile-first and cloud-first world. This shift has led to Microsoft spending heavily on its cloud infrastructure, with total capital expenditures more than doubling since fiscal 2012.

MSFT Capital Expenditures  (Annual) Chart

MSFT Capital Expenditures (Annual) data by YCharts.

Going forward, Microsoft expects to further increase its spending in order to support its cloud and devices strategy. Companies like Amazon (AMZN -1.84%) and Google (GOOG -2.02%) (GOOGL -1.99%) are doing the same, spending billions on building out data centers to support their own cloud ambitions. With the PC no longer being the center of the computing universe, the cloud is Microsoft's ticket to growth, and the massive investments being made by the company are already starting to pay off.

Winning the enterprise
Microsoft is, by far, the largest enterprise software vendor in the world, commanding a 17.8% market share, more than double that of its closest competitor. The rise of cloud-based software from companies like Google, with its browser-based productivity suite, and Box, with its enterprise-focused cloud storage offering, poses a real threat to traditional enterprise software companies.

One of the main benefits of leveraging the cloud is that the software can be used from any device, either through a browser or a native app, with a user's files and settings carried over seamlessly. Microsoft's Office 365, the subscription version of the company's ubiquitous productivity suite, now works on every major platform, and Microsoft's cloud storage service, OneDrive, allows users to access documents everywhere.

This all comes at a cost, though. Microsoft has had to dramatically increase its spending on data centers in order to make all of this seamlessness work. Software that used to be mainly on-premises, such as enterprise email, for example, is now moving to the cloud, and both Microsoft and Google are fighting for those customers. Microsoft has Exchange Online, while Google has Gmail, and both services require the companies to maintain massive data centers to support them.

While the investments that Microsoft is making will take time to pay off, cloud revenue is already growing rapidly. During Microsoft's most recently reported quarter, revenue from commercial cloud services grew by 147% year over year, reaching an annual run rate in excess of $4.4 billion. Gross margin from the "commercial other" segment, which includes commercial cloud services, more than doubled, as well, with the benefits of scale starting to drive profitability.

Battling Amazon
Along with embracing the cloud for its own software, Microsoft is also aiming to be the cloud platform of choice for other companies and developers. Microsoft Azure is the company's cloud platform, which provides infrastructure-as-a-service, or IaaS, and platform-as-a-service, or PaaS, and it competes directly with Amazon's Web Services.

Azure allows companies to replace on-premises infrastructure with cloud-based infrastructure, or combine the two for a hybrid cloud solution. Azure also provides the ability to rapidly create scalable back-ends for mobile apps and websites, as well as a host of other features, from video streaming to big data analysis.

Amazon is Microsoft's largest cloud-computing competitor, and the online retailer has been spending billions of dollars building out its data centers. Amazon recently announced that it would be spending $1.1 billion on a new data center in Ohio, and it doesn't appear that the company will be slowing down spending anytime soon.

While prices for IaaS services have been falling rapidly, with a seemingly unending stream of price cuts, higher-value services will be where the real money is made. Microsoft's huge investments in Azure are, in part, an effort to ensure that its enterprise software, such as Windows Server and SQL server, makes the transition to the cloud, and its services are based around this software. For example, Azure's mobile services product is built around Microsoft's SQL database software.

Azure is a case of investing a lot of money now in order to build out the service in the hopes that it will pay off in the long run. Azure topped $1 billion in revenue earlier this year, and Microsoft's existing relationship with enterprise customers should help the company gain ground against Amazon. Microsoft's investments are necessary to ensure that existing on-premises customers don't defect to competing cloud offerings, as well as to lure in new customers in the hopes that they may eventually buy higher-value services.

The bottom line
Microsoft is spending heavily on building out its cloud computing business, both for its own software like Office 365, and for the IaaS and PaaS services offered through Azure. These investments are necessary to protect Microsoft's enterprise software dominance, and the cloud represents a significant growth opportunity for Microsoft. Microsoft is certainly spending far more on capital expenditures than it has historically, but it's likely to be money well spent.