Amazon (AMZN 3.20%), Microsoft (MSFT 0.73%), and Alphabet (GOOG 1.75%) (GOOGL 1.68%) are the second-, third-, and fourth-largest companies on the U.S. markets today. These tech giants have their niches, but they all compete in one massive industry: cloud computing.

Each company already brings in billions of dollars each quarter from this segment and Precedence Research believes the cloud computing market could hit $1.6 trillion by 2030. That's a massive opportunity that this tech trio is racing toward, but which stock is the best buy? Let's find out.

Azure market share projections are far from certain

Numbers haven't been updated for the fourth quarter, but in the third quarter, the market share looked like this:

Cloud Service Provider Market Share
Amazon Web Services (AWS) 34%
Azure 21%
Google Cloud 11%

Data source: Synergy Research Group.

That's a commanding lead for Amazon, but it doesn't mean investors should count Microsoft and Alphabet out of the picture.

Unfortunately, pinpointing how much Microsoft's cloud computing division, Azure, makes isn't possible. This is because management has chosen not to break out its revenue from the broader intelligent cloud division, although it does report its quarterly growth rate. This leads to estimation errors in calculating Azure's revenue and profitability, which Alphabet zeroed in on last December.

Alphabet utilized some leaked Microsoft memos to estimate Azure's revenue generation, which it calculated at $29 billion for Microsoft's fiscal year 2022 ending June 30. Additionally, it noted that Azure had an operating loss of an estimated $3 billion.

There was skepticism in the Wall Street analyst community about the accuracy of this finding. Still, it shows that Alphabet thinks it's doing much better in the cloud computing arms race than others do, at least internally.

Because of that, Alphabet shouldn't be written off as the smallest competitor.

With all three companies being viable investments, which one had the best results of the most recent quarter?

Google Cloud had the strongest quarter

During the quarter ended Dec. 31 -- the fourth quarters for Amazon and Alphabet, and the second quarter of fiscal 2023 for Microsoft -- each company's cloud computing business grew rapidly.

Company Cloud Computing YOY Growth
Amazon 20%
Microsoft 31%
Alphabet 32%

Data sources: Amazon, Microsoft, and Alphabet. YOY = Year over Year.

The results give Alphabet the edge in the most recent quarter, although it barely squeaked past Microsoft. However, both companies grew their cloud computing divisions significantly faster than Amazon. This could mean two things: First, Amazon's growth is slowing due to its size. Second, Microsoft and Alphabet are taking market share from new entrants. It's likely a combination of the two, but investors must watch this trend throughout 2023.

Furthermore, AWS' operating income fell 2% over last year despite growing sales by 20%. With an operating margin of 24% and falling, that's another critical area to keep an eye on.

Because Microsoft doesn't break out Azure's metrics, it's hard to make a comparison here.

Google Cloud is still unprofitable, although it has significantly improved its operating margin over the past year.

Quarter Google Cloud Operating Margin
Q1 2022 (16%)
Q2 2022 (13.7%)
Q3 2022 (10.2%)
Q4 2022 (6.3%)

Data source: Alphabet. 

By the end of 2023, investors might see some profits from Google Cloud, which could significantly boost Alphabet's earnings.

So which stock is the best buy? I'd say it's the one that moves the needle the most.

AWS makes up just 14% of Amazon's revenue. With the company focusing on e-commerce and related investments, AWS is a cash generator that feeds the other businesses. So while Amazon is a great stock, I'd say it's not the best investment in this cloud trio.

It's hard to analyze Microsoft's Azure because there are only analyst projections and revenue growth results every quarter (which have been stellar for Azure). You'd think if Azure were highly profitable, it might report the segment individually. But with management not doing that and Alphabet potentially calling the bluff, I'm not a Microsoft proponent.

That leaves Alphabet, whose business is heavily focused on advertising right now. However, with the momentum of Google Cloud and its potential to become profitable in 2023, it seems like the best pick. Plus, you can scoop up Alphabet shares at a lower price-to-earnings valuation than Microsoft (Amazon is currently unprofitable).

GOOG PE Ratio Chart

GOOG PE Ratio data by YCharts

All three stocks are likely to be great investments, but Alphabet seems like the best buy right now.