Alibaba Group Holding (BABA 2.92%), and Tencent Holdings Ltd (700 -1.28%) are China's two largest technology companies. Both have hundreds of millions of users who use their software and services every day, immense scale, and seemingly unlimited financial resources.

Tencent dominates gaming, social media, and is a close second to Alibaba in mobile payments in China. Around 1.13 billion people use Weixin and WeChat monthly. Alibaba leads in e-commerce and has around 755 million mobile monthly active users.

Young woman holding a credit card and smartphone.

Image Source: Getty Images

Both are wildly profitable. Alibaba's e-commerce business and Tencent's WeChat each have network effects that make them difficult to unseat. The more people that use WeChat or Taobao/Tmall, the more useful it is for everyone.

With the profits generated from their core businesses, the two companies have pushed into other sectors including the cloud and artificial intelligence. But which of these two titans is the better buy for the long term?

Valuation and growth

Alibaba and Tencent trade for around the same valuation. Currently (as of the time of writing), Alibaba trades at a forward price-to-earnings (PE) ratio of 24x while Tencent trades at a forward PE ratio of 23.8x.

In terms of growth, Alibaba has grown faster than Tencent recently. For the most recent quarter ended 30 June, Alibaba's year-on-year total sales rose 42% and the company reported US$3.8 billion in adjusted free cash flow. Meanwhile, for Tencent's second quarter, total sales rose 21% year-on-year and free cash flow was RMB 20.7 billion (US$2.93 billion), up 27% year-on-year.

In terms of future growth, Tencent might have an edge in terms of its core business. According to Statista, China's e-commerce sales are expected to rise at a compound annual growth rate (CAGR) of 10.9% from 2019 to 2023. Meanwhile, according to Research and Markets, the CAGR for the China digital gaming market is expected to be 15.4% from 2018-2023.

Given that both companies have expanded into other sectors beyond their core, the two companies' growth rates will likely be faster than their core growth rate.

Winner: Alibaba

Competition

Alibaba has competition in the lower-tier cities from group buying app, Pinduoduo, which has gained a lot of market share in a short amount of time. The company also has competition in higher tier cities from JD.com Inc.

Given how hard it is to take market share away from a company with a strong network effect and financial resources like Alibaba, the company's market share won't likely change that much in a short amount of time. At least not in the same way that Tencent's social media market share can.

Currently Tencent is facing increasing competition from ByteDance, which specializes in artificial intelligence (AI) apps. The company has successfully used AI to make a hit news aggregator app, Jinri Toutiao, and wildy-popular short video app, TikTok. More and more people are spending ever more time on the apps and that's taking eyeballs away from Tencent's products.

ByteDance also arguably has more resources than Pinduoduo and JD.com. ByteDance raised money at a US$75 billion valuation last year – more than Pinduoduo's US$38 billion and JD.com's US$43.5 billion market caps, respectively.

Winner: Alibaba

Cloud computing

China's cloud market will be so big and potentially lucrative that it will arguably prove to be the deal breaker between the two tech giants – both of which boast market caps of around US$400 billion.

China's cloud market is large and growing fast. In 2018, the Chinese cloud market was worth RMB 96.2 billion, up 39.2% year-on-year. For that year, Alibaba had 42.9% market share and Tencent had an 11.8% market share in China's infrastructure as a service (IaaS) cloud market.

Although Tencent has spent a lot of money trying to catch up with Alibaba in the cloud (and has had some success in niche cloud services such as those for gaming), it hasn't caught up and Alibaba's lead may be too great.

Although Alibaba's cloud division doesn't contribute much to the company's profits, it could one day contribute a lot just as Amazon Web Services (AWS) contributes significantly to Amazon's profits. For 2018, AWS accounted for more of Amazon's operating profit than its North American e-commerce unit.

Winner: Alibaba

Foolish Conclusion

Although both companies have great potential, for me Alibaba is likely the better investment because it has the greater cloud market share – something which will prove to be lucrative, and decisive, as China's cloud market keeps growing at an unstoppable pace.

A version of this article originally appeared on our Fool Asia site. For more coverage like this head over to Fool.hk.en.