Facebook (NASDAQ:FB) and Alphabet's (NASDAQ:GOOG) (NASDAQ:GOOGL) Google hold a near duopoly in internet advertising in the U.S. and other major markets. The two companies could capture 56.8% of all U.S. digital ad investments this year, according to eMarketer -- with Google claiming 37.2% and Facebook grabbing 19.6%.

Both stocks are considered solid long-term tech investments, but Facebook's near-700% rally over the past five years crushed Alphabet's 150% gain. Will that trend continue over the next few years? Let's compare these two tech giants' core businesses to find out.

Money signs appear over a smartphone.

Image source: Getty Images.

The differences between Facebook and Alphabet

Facebook and Alphabet both generate most of their revenues from targeted ads, but their strategies are different. Google crafts targeted ads based on users' search or location histories, but Facebook leverages users' social connections to create ads.

Google's attempts to counter Facebook's growth with its own social platforms all flopped, but it remains an internet powerhouse. It owns the most popular search engine in the world, the biggest video-streaming site (YouTube), the top mobile OS (Android), and the top web browser (Chrome). It also owns one of the top cloud infrastructure platforms in the world. Its parent company, Alphabet, holds investments in next-gen technologies like driverless cars and digital healthcare.

Facebook is also expanding its ecosystem. It acquired Instagram, WhatsApp, and Oculus VR over the past few years. It spun out Facebook's Messenger as a stand-alone app and started expanding it as a platform for mobile payments, games, ride-hailing services, and e-commerce connections.

A young woman uses a smartphone.

Image source: Getty Images.

Facebook's user numbers are jaw-dropping: Its core social network reached 2.2 billion monthly active users (MAUs) last quarter, Messenger hit 1.3 billion MAUs last September, WhatsApp topped 1.5 billion MAUs in January, and Instagram crossed a billion MAUs in June. Facebook is generally more popular with older users, while Instagram is more widely used by younger users -- which counters the notion that the company is "losing" teen users.

The similarities between Facebook and Alphabet

Both companies face similar challenges regarding privacy concerns and the spread of false information. Facebook faced a massive backlash earlier this year after it revealed that a breach compromised the data of up to 87 million users, and that its platform had been used by Russian propaganda agencies to spread fake news stories during the 2016 election.

Google was also implicated in spreading fake stories through its Google News aggregator. Facebook and Google both face tighter restrictions on the usage of personal data in Europe, where the EU Commission fined both companies in separate antitrust probes.

Which company is growing faster?

Between the first quarters of 2014 and 2018, Facebook's MAUs rose 72%. That growth, along with its rising average revenues per user, enabled the company to consistently generate higher sales growth than Alphabet.

Company

FY 2014 Annual Revenue Growth

FY 2015 Annual Revenue Growth

FY 2016 Annual Revenue Growth

FY 2017 Annual Revenue Growth

Facebook

58%

44%

54%

47%

Alphabet

19%

14%

20%

23%

Data source: Company quarterly reports.

Wall Street expects this trend to continue, with Facebook's revenue rising 40% this year as Alphabet's revenues climb 23%. Facebook also consistently reports higher operating margins than Alphabet.

FB Operating Margin (Quarterly) Chart

FB Operating Margin (Quarterly) data by YCharts.

This is due to the fact that Facebook mostly concentrates on expanding its high-margin advertising business (with the exception of Oculus VR). Alphabet, though, invests in a wide range of hardware projects (like its Pixel phones and Pixelbooks), "other bets" ("moonshots" like driverless cars, digital healthcare, and smart homes), and loss-leading efforts to chase Amazon in the e-commerce space.

Facebook's earnings rose 54% in 2017, and analysts anticipate another 43% growth this year and 20% growth next year. Alphabet's earnings fell 35% last year due to the aforementioned EU fine and tax changes. However, analysts expect that figure to rebound 146% this year (38% on an adjusted basis, which excludes the EU impact) and rise 8% next year.

Facebook currently trades at 22 times forward earnings, which is surprisingly low relative to its earnings growth potential. Alphabet trades at 25 times forward earnings.

The better buy: Facebook

I think Facebook and Alphabet are both solid stocks, but I think the former will keep outperforming the latter for the foreseeable future. Facebook owns multiple market-dominating social platforms, and it has better sales growth, higher margins, and a lower P/E ratio than Alphabet.

John Mackey, CEO of Whole Foods Market, an Amazon subsidiary, is a member of The Motley Fool's board of directors. Suzanne Frey, an executive at Alphabet, is a member of The Motley Fool's board of directors. Leo Sun owns shares of Amazon. The Motley Fool owns shares of and recommends Alphabet (A and C shares), Amazon, and Facebook. The Motley Fool has a disclosure policy.