Microsoft (MSFT -1.84%) and Alphabet (GOOG 0.37%) (GOOGL 0.35%) are two of the mega-cap technology companies that currently dominate the stock market. Both stocks are up over 700% in the past decade (compared to the S&P 500 at 200%) and now have market caps of $1.9 trillion (for Microsoft) and $1.5 trillion (for Alphabet).

Microsoft has continued its dominance of the workplace software market and also ventured into other profitable businesses like Azure (its cloud computing division) and business-focused social network LinkedIn, while Alphabet continues to lead the search and online advertising markets. But which stock is the better buy going forward? Let's take a look.

A globe with red lasers going across to different cities.

Image source: Getty Images.

Alphabet is a juggernaut

Alphabet's search and advertising business is a juggernaut, growing substantially over the past few years even though it is now larger than a small nation's GDP. The search and ad segment is the majority of Alphabet's current business and houses search, YouTube, and other Google media properties. Last year, Google services operating income hit $54.6 billion, up from $49 billion in 2019 and $43.1 billion in 2018.

However, Alphabet's overall operating income in 2020 was only $41.2 billion, which was significantly less than its search and advertising division. How did this happen? Because the company's two other subsidiaries (Google cloud and "other bets") are currently generating heavy operating losses. This shouldn't scare investors, though. Google cloud lost $5.6 billion in 2020 on $13 billion in revenue, but this is to be expected with all the upfront spending that is required to run a cloud computing service, especially when the company is trying to compete with the market leaders in Amazon's Amazon Web Services and Microsoft's Azure.

"Other bets" is a bit different, as it is a collection of moonshot start-ups that Alphabet is trying to build and potentially spin off as separate companies. One example is Waymo, the leader in self-driving technology, which was spun off from Alphabet in 2016, but there are many start-ups within this segment.

Right now, Alphabet stock currently trades at a price-to-earnings ratio (P/E) of 35.8. This looks high, but if you just look at Google services operating income of $54.6 billion (ignoring other bets and Google cloud), that P/E comes down to a more reasonable 27, which is well below the average market multiple at the moment.

Microsoft is growing at double-digit rates

Microsoft has seen many of its business lines grow at double-digit rates over the past few years since it transitioned to cloud-based services at the end of Steve Ballmer's tenure and expanded them under current CEO Satya Nadella. Microsoft 365 Business, which puts more emphasis on secured cloud services, grew revenue by 21% last quarter, while the personal computing division grew by 12% to $15.1 billion. That is some impressive growth at the scale Microsoft is already operating in.

Microsoft's fastest-growing division is its cloud computing unit Azure. Last quarter, Azure's revenue grew 50% year over year. Azure falls under Microsoft's intelligent cloud division, so investors don't know its nominal revenue numbers. However, intelligent cloud as a whole grew revenue 23% last quarter to $14.6 billion, and you can assume Azure made up the majority of that growth.

Microsoft is also seeing solid growth from its Xbox and LinkedIn subsidiaries, plus it has acquired software collaboration hub Github and is rumored to be looking to acquire the social network Discord. This week it announced that it bought voice-to-text specialist Nuance Communications for $16 billion in the hopes of expanding its healthcare vertical. Finally, Microsoft just signed a multi-billion dollar contract with the U.S. Army to provide it 182,000 HoloLens augmented reality goggles.

Clearly, Microsoft is busy, with many different business lines humming along. Its valuation reflects that although its trailing P/E of 38 is still just below an inflated S&P 500 average hovering around 42.

Verdict

There's a reason Microsoft and Alphabet both have market caps over $1 trillion. As you can see from the examples above, the businesses are phenomenal and are currently firing on all cylinders. But if I had to choose one company to own over the next decade, it would have to be Alphabet, mainly due to its cheaper valuation. I don't think investors can go wrong owning either one of these stocks, but the odds currently tilt in Alphabet's favor.