Alphabet's (GOOG 1.25%) (GOOGL 1.27%) Google left China ten years ago, and its departure allowed Baidu (BIDU 1.02%) to conquer three-quarters of China's search market.

When Google left China, many investors thought it was leaving billions of dollars on the table. But over the past decade, Alphabet's stock has soared more than 500% as Baidu's stock has risen just 35%. Let's see why Alphabet outperformed Baidu, and if that trend will continue over the next few years.

Balls painted with the American and Chinese flags.

Image source: Getty Images.

The key differences between Google and Baidu

Google is much bigger than Baidu. In addition to the world's largest search engine, Google also owns the world's biggest online video platform (YouTube), the largest web-based email platform (Gmail), the top mobile operating system (Android), and the most popular web browser (Chrome).

Google holds a near-duopoly in online ads with Facebook across many countries. Its top market is the U.S., which accounted for nearly half its total revenue in the first nine months of 2020.

Google ranks third in the cloud infrastructure market after Amazon and Microsoft, according to Canalys. Google's sister companies within Alphabet include the driverless company Waymo and the healthcare companies Verily and Calico, among others.

A young woman reads while sitting in a driverless car.

Image source: Getty Images.

Baidu is expanding its ecosystem in similar ways, but it still generates nearly all its revenue in China. It owns iQiyi (IQ 6.26%), one of China's largest video platforms; Baidu Cloud, which ranksfourth in China's cloud market, according to Canalys; Project Apollo, the country's leading open source platform for driverless cars; and DuerOS, which integrates voice searches, commands, and skills into various products.

Baidu's core advertising business faces intense competition in China. Last year, research firm R3 claimed Baidu only controlled 17% of China's digital advertising market, putting it in third place behind ByteDance (23%) and Alibaba (33%).

Unlike Google, whose brand is synonymous with online searches, Baidu's search engine is losing relevance in China as users access more Mini Programs within Tencent's WeChat, shop directly on Alibaba's marketplaces, or consume more content on ByteDance's short video app Douyin (also known as TikTok) and Toutiao news app.

Which tech giant is growing faster?

Alphabet and Baidu generate most of their revenue from online ads. Google's advertising business accounted for 80% of Alphabet's top line last quarter, while Baidu generated 72% of its revenue from ads.

Both companies faced slower ad sales throughout the COVID-19 crisis. But Baidu's total revenue growth trailed behind Alphabet's, even though China recovered faster than many other countries where Alphabet operates.

Revenue Growth (YOY)

Q1 2020

Q2 2020

Q3 2020

Alphabet

13%

(2%)

14%

Baidu

(7%)

(1%)

1%

YOY = Year-over-year. Source: Quarterly reports. 

Baidu fared worse because it lost advertisers to Tencent, ByteDance, and other rivals. Its online marketing revenue has fallen year-over-year for six straight quarters, and its revenue only grew in the third quarter because its cloud growth offset its ad declines.

Alphabet's ad revenue fell in the second quarter, but that decline was partly offset by the growth of its cloud business during the pandemic. But by the third quarter, its advertising revenue was rising again.

Which tech giant is more profitable?

Both companies' operating margins expanded significantly last quarter:

Operating Margin

Q1 2020

Q2 2020

Q3 2020

Alphabet

19%

17%

24%

Baidu

(2%)

14%

22%

Source: Quarterly reports. 

Alphabet curbed its spending throughout the pandemic, and the growth of its higher-margin ad revenue boosted its operating margin in the third quarter.

Baidu's margins improved as it throttled its spending and sold higher-margin in-app ads. iQiyi, which generated a quarter of its third-quarter revenue, also narrowed its losses year-over-year over the past two quarters.

However, Baidu's margins could dip again after it closes its planned takeover of JOYY's (YY 0.61%) YY Live video platform. The $3.6 billion acquisition will add over 40 million monthly active users to its mobile video ecosystem, but YY has been bleeding paid users throughout the COVID-19 crisis.

Which stock is the better buy?

Wall Street expects Alphabet's revenue and earnings to rise 11% and 5%, respectively, this year, before accelerating again next year.

Alphabet's stock isn't cheap at 31 times forward earnings, but its core advertising business is growing again, and it still has plenty of irons in the fire. It's also sitting on $132.6 billion in cash, cash equivalents, and marketable securities, which gives it ample fuel for future investments.

Analysts expect Baidu's revenue and earnings to rise 5% and 14%, respectively, this year. Baidu looks cheaper than Alphabet at 14 times forward earnings, and it's still holding $21.5 billion in cash, cash equivalents, and short-term investments.

But investors generally seem less optimistic about Baidu's future because its ad revenue is still declining. Recently drafted antitrust rules in China could also clear the way for even more competitors in China, and U.S.-listed Chinese stocks could still be delisted by tighter auditing rules.

Therefore, Alphabet remains a better overall investment than Baidu right now. Baidu isn't down for the count yet, but it needs to fix its ailing advertising business before it can attract the bulls again.