Alphabet's capital expenditures in the latest quarter almost doubled, as Google continues to build out data centers for products like its cloud services.

In the second quarter, those costs jumped to $5.48 billion from $2.48 billion a year earlier, Alphabet said in its earnings report after the close of trading on Monday. Analysts on average were expecting capital expenditures of $4.19 billion, according to FactSet.

The spending surge is the latest sign that Google's cloud division, under the leadership of Diane Greene, remains committed to growth as it tries to chase down larger rivals Amazon and Microsoft. Google is also expanding its data centers for internal use, whether it's search or YouTube.

"Our view is it gives you a lens into our outlook for growth," said Ruth Porat, Alphabet's chief financial officer, in a briefing with reporters on Monday. "It's search and ads, it's newer businesses, it's also the importance of machine learning. We’re looking for additional compute capacity given our outlook for growth."

On the call with analysts on Monday, Porat elaborated on those remarks and specifically cited cloud as a new growing business with major computing needs.

"While we're ensuring that we're well-positioned to support the growth we see, we do constantly remain focused on efficiency per unit of compute," she said.