The two largest digital advertising companies in the world have continued to earn investors good returns in recent years, despite their enormous market capitalizations. Shares of Facebook (META -10.56%) and Alphabet (GOOGL -1.97%) (GOOG -1.96%) have risen 133% and 141% over the last three years, respectively. This compares to the S&P 500's 53% rise over this same timeframe. Even more interesting, the two tech stocks' valuations remain compelling following their strong performance.

But which of these two tech stocks looks like the better buy for investors who are buying shares today?

A person looking at charts on a laptop.

Image source: Getty Images.

Growth

Both of these digital advertising juggernauts are growing rapidly. But social networking leader Facebook is the clear winner on this front.

Facebook's trailing-12-month revenue of $105 billion, for instance, is up 48% from the company's $71 billion of revenue in 2019. This compares to Google parent Alphabet's 36% top-line growth over this same time frame. 

The social media platform operator's bottom line is growing especially fast as Facebook benefits from significant operating leverage. Its trailing-12-month net income is up more than 115% from 2019 levels, rising to $39 billion. Alphabet's trailing-12-month net income of $63 billion, meanwhile, has also risen rapidly, albeit at a slower 85% growth rate.

Valuation

Interestingly, Facebook trades at the more conservative valuation -- particularly when viewed next to its faster growth.

Alphabet has a price-to-sales ratio of 8.8, and Facebook's isn't much higher at 10.4. This delta is arguably more than justified by Facebook's more rapid growth. Meanwhile, Facebook and Alphabet have the same price-to-free cash flow ratio of 33, and Facebook actually trades at a lower price-to-earnings ratio than Alphabet; its price-to-earnings ratio is 28 while Alphabet's is 31.

Making the case for Facebook stock over Alphabet stock even more compelling, analysts expect Facebook's earnings per share to grow at an average annualized rate of 29% over five years, while the consensus forecast for Alphabet's is 24% annualized growth.

The verdict

While every investment comes with risks, the conservative valuation of both of these companies relative to their growth potential makes them both seem like investments that could perform well over the long haul.

Not only do their financials and valuations look attractive, but both companies benefit from very powerful competitive advantages: Alphabet has scale and technological leadership in search and Faceboook benefits from an unrivaled network effect in the social media space, with a total of 3.5 billion unique monthly active users across its social networking platforms.

But Facebook seems to have the edge when it comes to both growth and valuation, making it the more attractive investment today for investors considering buying any of these digital advertising specialists.