Investors got a big shock when Alphabet (GOOG 0.81%) (GOOGL 0.76%) reported its first-quarter earnings. The Google parent company is spending a lot more than expected.

Capital expenditures totaled $7.3 billion last quarter, up from $2.5 billion in the first quarter last year. ($2.4 billion of that went toward acquiring the building that houses some of its New York offices.) Total costs and expenses on its income statement climbed 33% year over year, outpacing revenue growth of 26%.

But that revenue growth was the best number Alphabet has seen in four years.

The message to investors was very clear, and CFO Ruth Porat made it crystal-clear during the earnings conference call (emphasis added):

The opportunity set ahead of us is quite extraordinary and we remain focused on investment to support long-term revenue and profit growth. We have both the business confidence to invest appropriately in the next phase of innovation, as well as clarity about some very compelling opportunities that in our judgment will enable us to create shareholder value.

Spending more now to take advantage of a long-term revenue opportunity sounds a lot like another company you might've heard of -- Amazon (AMZN 1.23%).

Google employees wearing colored shirts standing in the shape of the Google G.

Image source: Google.

Extraordinary upside

During the earnings call, Porat called out two markets with "extraordinary upside": cloud and hardware.

Google has seen rapid growth from its cloud-computing division, which requires a lot of capital to keep growing and expand. Google Cloud surpassed $1 billion in the fourth quarter, and management says it continues to see momentum this year.

Google Cloud is still well short of Amazon's Amazon Web Services division, which generated $5.1 billion in net revenue during the fourth quarter and $17.5 billion for the full year last year. But Google says it's the fastest-growing public cloud company, and the rapid growth of even its largest competitors bodes well for the opportunity.

Hardware is another capital-intensive industry. The company acquired the smartphone division of HTC last quarter, bringing on 2,000 new hardware engineers. Those engineers will support the Pixel line of smartphones, the Google Home smart speaker, Nest thermostats, and other hardware products coming down the pipeline. Google CEO Sundar Pichai says the company is still two or three years away from reaching the scale it wants to see, so it's going to keep investing.

Amazon's hardware business has been a major success with its e-readers, tablets, streaming media devices, and smart speakers. Each of those products fosters a deeper relationship with Amazon while providing valuable data for the company to continue improving its core marketplace and services. Google is looking for similar success with its hardware products.

Both cloud computing and hardware fall under Google "other revenues" when Alphabet reports its earnings results. As the company continues to invest more and more into these areas, Google may face pressure to break out its results for those segments individually, just as Amazon was pressured into breaking out AWS results.

It's worth noting that Alphabet has dozens of other areas of investment as well, including YouTube, Waymo, Verily, and others.

Haven't I heard this before?

Alphabet had previously ramped up spending to capitalize on long-term opportunities about five years ago. That spending eventually prompted it to hire Porat as CFO and break out its other bets financials to show investors the financial results of its moonshots. Porat had successfully reined in spending until last quarter.

But unlike last time, Alphabet is already showing that its spending can pay off in revenue growth. As mentioned, its first-quarter revenue growth was its highest year-over-year rate since 2014.

That should give investors confidence that Alphabet will see significant revenue growth as a result of its investments over the next few years. While it might put pressure on its profit margin in the near term, investors should have confidence that the long-term opportunity will be worth it.

Amazon CEO Jeff Bezos famously said, "Your margin is my opportunity." Alphabet finds itself in a similar position as Amazon today, and it should follow the lead of the wealthiest man ever. He might be onto something.