Alibaba (NYSE:BABA) and JD.com (NASDAQ:JD) are the two largest e-commerce companies in China. Alibaba controls 59% of that market, according to eMarketer, while JD holds a 17% share.

Both companies went public in the U.S. five years ago. Alibaba's stock nearly tripled since its market debut, while JD's stock rose over 70%. Let's see why Alibaba outperformed its main rival by such a wide margin, and whether that trend will continue.

Rows of boxes in a warehouse.

Image source: Getty Images.

An apples-to-oranges comparison

Alibaba and JD seem similar, but the two companies have different business models.

Alibaba's e-commerce marketplaces are paid listing platforms for third-party sellers. It doesn't take on any inventories and fulfills orders through third-party logistics services. JD is a direct retailer that takes on inventories and fulfills orders with its own warehouses and logistics.

Alibaba only retains listing fees and commissions as revenue, while JD reports product sales as revenue. As a result, JD is actually China's largest retailer by annual sales -- but it operates at much lower margins than Alibaba:

BABA Operating Margin (TTM) Chart

Source: YCharts

JD claims that its approach gives it tighter control over its marketplace and shields shoppers from low-quality and counterfeit goods. Alibaba founder Jack Ma once countered that argument and claimed that JD's capital-intensive approach would end in "tragedy."

Alibaba also has a larger digital ecosystem than JD. It generated 85% of its revenue from its core commerce marketplaces (Taobao, Tmall, Alibaba, AliExpress, and Lazada) last quarter, while the rest came from its cloud business, its digital media division, and other products like smart speakers.

JD generates most of its revenue from its core JD Retail business. A smaller percentage comes from marketplace ads, cloud services for merchants, and its logistics platform, which is now a self-sustaining business that offers its services to other companies.

JD's biggest investor is Alibaba's rival Tencent, which integrates JD's marketplace into WeChat, the top messaging platform in China. JD is also Walmart's main e-commerce partner in China, and the two companies pool their shopper data and provide online grocery deliveries through a joint venture.

Which company is growing faster?

Alibaba's revenue rose 40% annually last quarter, but that marked a slowdown from its 42% growth in the previous quarter. Its annual active customers grew 15% to 693 million.

Its core commerce unit revenue grew 40%, its cloud business revenue rose 64%, and its digital media and innovation initiatives units both generated double-digit growth. However, only Alibaba's core commerce unit is profitable, and those profits regularly subsidize the growth of its other ecosystem-expanding businesses. Its adjusted net income rose by 40%.

Tiny parcels on a laptop keyboard.

Image source: Getty Images.

JD's revenue rose 29% annually last quarter, marking its second straight quarter of accelerating revenue growth. Its annual active customers grew 10% to 334 million. The continued expansion of its logistics service as a self-sustaining business boosted its gross margin sequentially, and its adjusted net income surged 161% annually.

Alibaba and JD both attributed their growth to an aggressive push into lower-tier cities, which favored discount marketplaces like Pinduoduo (NASDAQ:PDD). To challenge Pinduoduo, Alibaba launched its flash sale platform Juhuasuan in August, and JD launched a similar marketplace called Jingxi the following month.

Which stock is cheaper relative to its growth?

Analysts expect Alibaba and JD to both generate double-digit revenue and earnings growth next year. However, Alibaba is expected to generate stronger revenue growth, as JD -- fortified by its third-party logistics business -- generates better earnings growth:

Next FY forecasts

Est. revenue growth

Est. earnings growth

Forward P/E ratio

Alibaba

29%

24%

22

JD.com

19%

40%

24

FY = fiscal year. Source: Yahoo Finance, Dec. 10.

Both stocks look cheap relative to those forecasts, but JD seems cheaper relative to its growth potential. Furthermore, JD still trades at less than one times next year's sales, while Alibaba has a forward P/S ratio of nearly six.

The winner: JD.com

JD's stock was battered by concerns about its slowing growth, rising costs, and a rape allegation against CEO Richard Liu last year. However, its growth is accelerating again, it's curbing its spending as it streamlines its business, and the charges against its CEO were dropped.

Alibaba and JD are both solid long-term investments on China, but JD's stock arguably has more upside potential than Alibaba's. Its stock is undervalued and its business is often misunderstood -- which could be a recipe for a multi-bagger rebound over the next few years.