Digital advertising is expected to surpass television advertising in the U.S. this year -- that is, if it hasn't already. The two main beneficiaries of the growth in digital advertising are Facebook (NASDAQ:FB) and Alphabet (NASDAQ:GOOG) (NASDAQ:GOOGL), which owns Google.

Sign with the "like" symbol at the entrance to Facebook's campus.

Image source: Facebook

Indeed, the two companies completely dominate the digital advertising market, combining to take about 60% of the market. Both companies are growing rapidly, especially considering their size, but which is the better buy right now?

A look at valuation

Both Facebook and Alphabet trade for relatively high valuations, which would leave them off the buy list of many investors. But both companies arguably deserve their high valuations because of their rapid growth and the industry trend supporting them.

Company

P/E (forward)

P/S (TTM)

P/FCF (TTM)

PEG

Facebook

24.9

15.2

43.2

0.95

Alphabet

20.0

6.8

24.8

1.06

Source: Yahoo.

Investors are valuing Facebook's expected earnings and earnings growth near the same levels as Alphabet, but that puts a premium on Facebook's trailing-12-month sales and free cash flow compared to Alphabet's.

Facebook does sport a significantly larger operating margin compared with Alphabet (45%, versus 26% in the third quarter), which makes its sales more valuable, but no more than twice as valuable. Likewise, Facebook's free cash flow doesn't deserve to be given nearly twice the value as Alphabet's.

For investors looking for a growth stock with a good valuation, Alphabet shares definitely take the title here.

Google employees in various colored shirts standing arranged in the shape of Google's logo.

Image source: Alphabet

What about growth?

A great growth stock, however, will produce significant earnings growth for its shareholders. You'll notice the one valuation where Facebook outshines Alphabet (albeit just barely) is in its PEG ratio -- the only metric shown that accounts for growth.

Indeed, analysts expect Facebook to continue growing rapidly over the next five years, with a compound annual earnings growth rate of 35.5%. Analysts expect Alphabet to produce EPS growth of just 18.6% on average through 2021. That's nearly half the rate of Facebook's growth -- and that's what you get for the premium price you'll pay for Facebook.

Facebook's management recently warned that advertising revenue growth on its flagship platform will slow about midway through 2017, but it still has several other major potential revenue drivers.

Instagram is still in the early days of advertising, and analysts at Credit Suisse estimate it could generate $6.4 billion in 2017 (double 2016) and $12 billion by 2021. For reference, Facebook is expected to produce $27.3 billion in sales this year.

Facebook's Oculus just started selling hardware a bit over a year ago, and Mark Zuckerberg expects VR to be the next big computing platform. Not to mention Facebook has 1 billion users for both Messenger and WhatsApp left to monetize.

Meanwhile, Alphabet's growth will come mainly from the continued trend of growing digital advertising spend, which largely benefits Google. YouTube may also help drive revenue growth, but it's a much more mature advertising platform compared to Instagram and carries lower margins than Google's main ad products. While the company has several moonshots that could turn out to be huge profit machines in the future, even Alphabet's small wins are dwarfed by the size of Google.

For investors looking for a growth stock with the most potential for growth, Facebook is a better buy than Alphabet.

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