Alphabet's (GOOG 0.56%) (GOOGL 0.69%) Google and Amazon (AMZN -1.11%) are two of the largest and best-known brands in the world. In fact, many people reading this article probably interact with one or both of these companies on a daily basis.

Over the last decade, shares of Alphabet and Amazon have soared 330% and 820%, respectively, leaving the broader market in the dust. And given the critical role these tech companies play in our daily lives, I think there's room for both to grow over the next decade. But which is the better buy today?

Alphabet

Alphabet breaks its business into three segments: Google Services, Google Cloud, and Other Bets. The latter is a collection of unprofitable moonshots -- like Waymo, its autonomous vehicle company. The Google segments are Alphabet's digital ad and cloud computing businesses.

Person holding a clear pane of glass, which displays various cloud computing icons: tablet, laptop, and text bubbles, all surrounding a cloud.

Image source: Getty Imaes.

Last year, the coronavirus pandemic had mixed effects on Google. People spent more time at home, a good thing for Google Search and YouTube engagement. But the pandemic created financial uncertainty for enterprises worldwide, leading to a 1.2% reduction in global ad spend. As a result, Alphabet's total revenue growth decelerated from 23% in 2019 to 18% in 2020.

The first quarter of 2021 was a different story. Revenue growth accelerated to 34%, driving earnings of $26.29 per diluted share, up 166% over the prior year. Management attributed this performance to "elevated consumer activity online and broad-based growth in advertiser revenue."

Despite losing share in recent years, Google remains the leader in the digital ad space, collecting 28% of all digital ad spend worldwide in 2020. Over the long term, that advantage has translated into a solid financial performance.

Metric

2017

Q1 2021 (TTM)

CAGR

Revenue

$110.9 billion

$196.7 billion

19%

Free cash flow

$23.9 billion

$50.7 billion

26%

Source: Alphabet SEC Filings. TTM: trailing 12 months. CAGR: compound annual growth rate.

Going forward, management will focus on expanding Google Search functionality and improving the YouTube experience with artificial intelligence, both of which could bring more ad dollars to Alphabet. Additionally, the company will continue to invest aggressively in Google Cloud, meaning growth is more important than profitability in the near term.

Amazon

Amazon recently ranked second on Fortune's list of most admired companies, and it's not hard to understand why. Since Jeff Bezos founded the business in 1994, it's grown into the largest e-commerce marketplace in North America, and the largest public cloud service provider in the world.

Last year, faced with a global pandemic, Amazon delivered an impressive performance. While other companies were laying people off, Amazon hired over 400,000 new employees to help keep pace with demand. Unit volume accelerated, driving sales growth of 38% in North America and 40% in (other) international markets.

Even more impressively, Amazon's growth accelerated in first quarter of 2021, as North America sales jumped 40% and international sales surged 60%. In cloud computing, Amazon delivered an equally impressive performance in Q1, as Amazon Web Services (AWS) revenue jumped 32%. Like Google Cloud, AWS is growing more quickly than the industry average, which helped the company gain market share.

Market Share

Q1 2019

Q1 2020

Q1 2021

AWS

33%

32%

37%

Google Cloud

5%

6%

9%

Source: Canalys.

Amazon has also become a serious competitor in the digital ad space. As the world's second-largest retailer, Amazon's websites see roughly 215 million unique visitors each year. That means the company has lots of consumer data, and its websites are prime real estate for marketers.

Perhaps most alarming for Alphabet, Amazon is gaining market share in search advertising, while Google is moving in the opposite direction. According to eMarketer, Amazon will collect 19% of U.S. search ad spend in 2021, up from 13% in 2019.

As a whole, Amazon's three quickly growing businesses have translated into incredible financial results -- especially for a $1.6 trillion enterprise.

Metric

2017

Q1 2021 (TTM)

CAGR

Revenue

$177.9 billion

$419.1 billion

30%

Free cash flow

$6.4 billion

$21.8 billion

46%

Source: Amazon SEC Filings. TTM: trailing 12 months. CAGR: compound annual growth rate.

The verdict

Alphabet and Amazon are both impressive  companies, but Amazon seems the better stock to buy right now. Alphabet certainly dominates the digital ad space, but its market share is falling.

Meanwhile, Amazon is gaining share across three high-growth industries: e-commerce, cloud computing, and digital advertising. Moreover, the company is a dominant force in two of those three markets, and it's hard to compete with that type of diversity.