Alphabet (GOOG 0.74%) (GOOGL 0.55%) and Twitter (TWTR) have both changed how we use the internet. Alphabet's Google is the world's most popular search engine, and its sprawling ecosystem includes YouTube, Gmail, Chrome, Android, and Google Cloud. Meanwhile, Twitter's platform has become a soapbox for politicians, celebrities, and journalists, making it a major source of real-time news.

Both stocks have remained resilient through the COVID-19 crisis. Alphabet's stock has risen nearly 30% over the past 12 months, while Twitter's stock has advanced about 15%. Let's dig deeper into these two internet gatekeepers and see which stock has more room to run.

A laptop user conducts an online search.

Image source: Getty Images.

How do Alphabet and Twitter make money?

Alphabet generated 80% of its revenue from Google's advertising businesses in the first half of 2020. Within that total, YouTube's ads accounted for 12% of Google's total ad revenue.

Google Cloud, which includes its cloud platform and services, generated 7% of Alphabet's revenue. Another 12% came from Google's non-advertising businesses, which include hardware sales. The remaining 1% of Alphabet's revenue came from its "other bets," including Waymo's driverless cars, its healthcare efforts, and other investments, along with its hedging gains.

Twitter generated 83% of its revenue from online ads in the first half of 2020. The remaining 17% came from its "data licensing and other" business. Its data licensing segment allows companies to analyze historical and real-time data across its platform, while its "other" segment mainly includes revenue from its MoPub mobile ad exchange.

How fast is Alphabet growing?

Alphabet's revenue rose 18% to $161.9 billion last year. Google's ad revenue grew 16%, Google Cloud's revenue surged 53%, and Google's non-ad revenue increased by 21%. Its operating margin expanded by a percentage point to 21.1% and its diluted EPS increased 12%.

But in the first half of 2020, Alphabet's revenue rose just 6% year-over-year to $79.5 billion. Google's ad revenue grew less than 1% as the COVID-19 crisis throttled ad purchases, but Google Cloud's revenue surged 47% and Google's non-ad revenue increased 24%. However, the slowdown in its higher-margin ad business reduced its operating margin by nearly three percentage points to 18.1%, and its diluted EPS dropped 16%.

Wall Street expects Alphabet's revenue to rise 7% this year as its earnings decline 10%. But looking further ahead, analysts expect its revenue and earnings to rise 21% and 28%, respectively, next year, assuming the pandemic ends and ad purchases accelerate again. But investors should be mindful of Google's antitrust challenges across the world -- which could limit its ability to expand its advertising and mobile ecosystems.

How fast is Twitter growing?

Twitter's revenue rose 14% to $3.46 billion last year. Its advertising revenue rose 14%, primarily driven by the U.S. market, as its data licensing and other revenue rose 10%. Its operating margin declined 430 basis points to 10.6% as it ramped up its investments, but its diluted EPS still grew 20%.

A woman uses a smartphone.

Image source: Getty Images.

In the first half of 2020, Twitter's revenue fell 8% year-over-year to $1.49 billion. Its ad revenue declined 12% due to pandemic-related headwinds, and offset the 11% growth of its data licensing and other business. Its operating margin turned negative, and it posted a net loss of $1.39 billion -- compared to a profit of $1.31 billion a year earlier.

That slowdown seems dire, but Twitter's mDAUs (monetizable daily active users) rose 34% year-over-year to 186 million in the second quarter. Therefore, Twitter's platform is still expanding -- even as advertisers temporarily purchase fewer ads.

Analysts expect Twitter's revenue to decline 5% this year as its earnings stay in the red. But if the pandemic ends, they expect its revenue to rise 24% next year, with a full-year profit -- which indicates its slowdown could be short-lived. The upcoming U.S. election could also bring more users to Twitter -- even though the company has banned political ads.

The valuations and verdict

Alphabet trades at 27 times forward earnings and five times next year's sales -- which are reasonable valuations relative to its growth. Twitter trades at 63 times forward earnings, assuming it becomes profitable again, and nine times next year's sales -- which make it a much pricier pick.

Therefore, the choice between Alphabet and Twitter is a simple one. Alphabet generates stronger revenue and earnings growth, has a better-diversified ecosystem, and trades at lower valuations. Twitter's mDAU growth is encouraging, but it faces an uphill battle and doesn't deserve a premium valuation yet.