Amazon.com (AMZN 2.48%) is arguably the biggest competitor for Alphabet (GOOG -1.54%) (GOOGL -1.51%). The two companies vie for valuable product searches, digital advertising, smart-speaker sales, and public cloud computing contracts. Alphabet has even launched its own digital shopping mall by partnering with other retailers to compete against Amazon's core retail business.

It's hard to go wrong with either Amazon or Alphabet, but investors trying to decide between the two stocks may have a tough time. Let's take a closer look at the ways that they compare to help determine whether Alphabet or Amazon is the better buy.

A truck with an Amazon Prime trailer decal.

Image source: Amazon

Two megatrends driving growth

Alphabet is the market leader in the rapidly growing digital advertising market. Global digital ad sales increased about 17% in 2018, according to Magna Global. The relatively mature U.S. market remains a strong source of growth, keeping pace with the rest of world (16.6%). Search and video advertising, two areas where Alphabet is a major force, grew 16% and 29%, respectively, in 2018.

Magna expects growth in digital ad sales to slow to 13% this year. It previously forecast global digital ad spend would reach $348 billion in 2022, implying a compound annual growth rate of just 8.5% over the next four years. That estimate will likely go up after 2018's better-than-expected results.

Meanwhile, online commerce is fueling Amazon's growth. Global e-commerce sales increased an estimated 23% in 2018, according to eMarketer. That growth is expected to slow slightly to 18% in 2021. Growth is slower in the more mature U.S. market, where Amazon dominates. U.S. online commerce grew an estimated 15.6% in 2018, but is projected to slow to 13.3% growth in 2022.

So, Amazon's core business is growing at about the same rate as Alphabet's, arguably even faster. It's also worth noting that Amazon is gaining market share in key geographies like the U.S. and India (although it faces risks from regulation in the latter). Meanwhile, Alphabet is losing share of the digital ad market to smaller competitors, including Amazon.

People in various colored shirts arranged to form the Google logo.

Image source: Alphabet subsidiary Google.

Around the margins

Alphabet enjoys wide profit margins. The company posted a 28.2% operating margin on its core Google business in the third quarter.

By comparison, Amazon's operating margin is extremely thin. Amazon generated an operating margin of 5.2% in the fourth quarter and 5.3% for the full year.

But the trend is in Amazon's favor. The company tripled operating income in 2018 by expanding its margin 3 percentage points. Google's core operating margin contracted about 2.8 percentage points in the third quarter.

Check out the latest Amazon earnings call transcript.

Amazon's expanding margin is driven by growth in Amazon Web Services, its cloud computing division, and its digital advertising sales. Alphabet also has a rapidly growing cloud computing business, but the margin for the business is likely lower than its core advertising business. Amazon is operating on a much bigger scale, and AWS produced an operating margin of 28.4% last year.

Alphabet's declining margin is driven by higher traffic acquisition costs and a greater portion of revenue coming from YouTube.

Amazon is positioned to keep growing revenue at a faster pace than Alphabet, and its expanding operating margin means it ought to show significantly faster earnings growth.

Is Amazon worth the price?

Just because Amazon is more likely to keep growing its bottom line at a faster pace than Alphabet doesn't necessarily make it a better buy. It's always worth taking a look at the company's relative valuations.

 

Amazon.com

Alphabet

EV/EBITDA

29.5

16.3

P/E (TTM)

80.8

42

Forward P/E

60

23.6

Data source: YCharts, Yahoo! Finance. 

Amazon is currently trading for around two to three times the valuation of Alphabet. That means that investors ought to expect Amazon to grow its earnings at least twice as fast as Alphabet over the next few years.

Based on the current trends at each company and within their respective core markets, it's a fair assumption that Amazon can continue expanding its operating margin while growing its top line faster than Alphabet. That will likely result in bottom line growth that significantly outpaces Alphabet's -- although the big wildcard is how well Alphabet assets other than Google, such as Waymo and its Other Bets segment, can add to overall performance.

Indeed, analysts currently expect Amazon to grow its earnings per share about 44% per year over the next five years. By comparison, they expect Alphabet to grow EPS about 16% per year. Based on those estimates and the stocks current valuations, Amazon is a better buy right now.