Facebook (NASDAQ:FB) and Google, the Alphabet (NASDAQ:GOOG) (NASDAQ:GOOGL) subsidiary, are dominant forces in digital advertising. Even as the public becomes more aware of how these two internet giants handle (or mishandle) user data, consumers can't seem to stop using their services and marketers can't find better places to put their ads.

While many investors are worried about the declining market share of the so-called duopoly over the next couple years, investors need to consider that both are at the forefront of a megatrend of ad budgets shifting from television to digital. The two companies remain among the best ways to capitalize on that trend.

But investors trying to decide between Facebook and Alphabet may have a tough time. To help make that decision easier, let's take a closer look at each company, its financials, and its stock valuation.

The thumbs-up sign at the entrance to Facebook's campus

Image source: Facebook.

Both companies have slowing revenue growth

Facebook CFO Dave Wehner told investors to expect further revenue growth deceleration in the first quarter and throughout 2019. After posting revenue growth of 47% in 2017 and 37% in 2018, Facebook expects revenue growth in the low-to-mid-20s range in 2019. Wehner said revenue growth will slow by mid-single-digit percentage points from the 30% rate the company posted in the fourth quarter.

Alphabet is seeing a slight slowdown in revenue growth as well: On a constant currency basis, revenue growth slowed down around 1 percentage point year over year for the last four quarters. The company's revenue growth stands around 24% for the trailing 12 months.

Facebook's slowing revenue growth comes from its accelerating transition to Stories ads from ads in its feed products. Usage on Facebook's platforms has shifted from posts in feeds to Stories, but ad dollars haven't yet followed. What's more, Facebook and marketers don't have enough experience with Stories ads to maximize their value. As a result, the ads have lower prices than feed ads. This transition will negatively impact Facebook's revenue growth, but ultimately the company should be able to reaccelerate growth.

Google's slowing growth stems from increased saturation of its advertising inventory. Growth in paid clicks on Google's platform has fallen from 62% in the third quarter of 2017 to 10% in the third quarter last year.

Google has numerous other sources of revenue that are growing significantly faster than its advertising business. Its cloud computing business is growing rapidly, as is its hardware business. Alphabet is also growing revenue from its Other Bets division, which houses Verily and Access, as well as Waymo -- which just started generating revenue last quarter.

Both face margin compression

Facebook and Alphabet are also seeing their costs rise faster than revenue.

Facebook is making major investments in security, which have caused operating expenses to outstrip top-line growth. As a result, operating margin fell to 45% from 50% last year. Wehner told investors to continue to expect that trend this year as Facebook invests further in headcount and in research and development, as well as in content creation for its Watch platform. Investors should expect margin compression for at least a couple more years before things get better.

Google, meanwhile, is facing margin pressure on its advertising business despite an increase in revenue from YouTube and mobile. YouTube ad sales have a higher cost of revenue because Google shares revenue with creators. Mobile searches cost Google more because it has to pay greater traffic-acquisition costs. The margin pressure on both will decline as they become bigger sources of revenue for Google over time and the company can produce operating leverage.

Alphabet is also seeing margin pressure from operating lower-margin businesses. Cloud computing, hardware sales, and most of the company's Other Bets have margins much lower than the extremely high-margin digital advertising business.

A woman and boy sitting in a van with the Waymo logo

Image source: Waymo.

Both have big bets on the future of technology

Alphabet has an entire segment of its business devoted to creating the technology of tomorrow. One of its most promising businesses is Waymo, the automated-vehicle business. Waymo could become a massive source of revenue for Alphabet as the global ride-sharing industry balloons to $285 billion by 2030.

Meanwhile, Facebook bought its way to the forefront of virtual reality technology with Oculus. Mark Zuckerberg believes VR will be the next big computing platform after mobile. Owning the platform could be extremely lucrative for Facebook if he's right.

How much do the stocks cost?

The two companies are extremely comparable in terms of outlooks for top- and bottom-line growth, and their potential for significant revenue streams. Determining which is a better buy may come down to which stock offers better value for the money.

Metric

Facebook

Alphabet

EV/EBITDA

14.6

16.2

P/E (TTM)

21.9

41.8

Forward P/E

21.9

23.4

Data source: YCharts. EV/EBITDA = enterprise value to earnings before interest, taxes, depreciation, and amortization; P/E = price to earnings; TTM = trailing-12-month.

Facebook is slightly less expensive than Alphabet stock based on EV/EBITDA and forward P/E ratios. It's significantly less expensive when looking at trailing earnings, but that's because analysts don't expect earnings to grow at all in 2019, given Wehner's comments about operating-expense growth this year.

With comparable profitability and long-term potential earnings growth, and a slightly favorable valuation, Facebook is the better buy, but it's very close.

Suzanne Frey, an executive at Alphabet, is a member of The Motley Fool's board of directors. Adam Levy owns shares of Alphabet (C shares) and Facebook. The Motley Fool owns shares of and recommends Alphabet (A shares), Alphabet (C shares), and Facebook. The Motley Fool has a disclosure policy.