Alibaba (NYSE:BABA) is currently China's largest e-commerce, cloud, and digital advertising company, but the tech giant had humble beginnings. Jack Ma, who started his career as an English teacher, founded the company with a team of 17 friends in his Hangzhou apartment 20 years ago.

Its first site, Alibaba.com, was a business-to-business marketplace that let Chinese companies export their products overseas. Its growth led to the launch of Taobao, a consumer-to-consumer marketplace for Chinese shoppers, in 2003. It expanded that ecosystem again with Taobao Mall (Tmall), a business-to-consumer spinoff of Taobao for bigger brands, in 2008.

A man draws a rising chart on a brick wall.

Image source: Getty Images.

Those three marketplaces still form the crux of Alibaba's core commerce business, which generated 85% of its revenue last quarter. Since the beginning of the new millennium, Alibaba has expanded its reach with its cloud platform, AI initiatives, streaming media platforms, and hardware devices. It also integrated the digital payments platform AliPay -- which was founded as a third-party service by Alibaba and Jack Ma -- into its e-commerce marketplaces.

Jack Ma stepped down as Alibaba's CEO in 2013, but remained the tech giant's public face throughout its IPO the following year. Alibaba finally went public at $68 per share on Sept. 14, 2014, and raised $25 billion -- making it the largest IPO in history. Let's see how much money you would have made with a $10,000 investment in that IPO.

If you had invested $10,000 in Alibaba's IPO...

$10,000 was enough to buy 147 shares of Alibaba in 2014. Alibaba's stock trades at nearly $200 as of this writing, so your investment would now be worth over $29,000.

Alibaba's IPO arrived less than four months after its biggest rival, JD.com (NASDAQ:JD), went public in the U.S. JD made its public debut at $19 per share on May 24, 2014, and raised a more modest $1.8 billion. If you had spent $10,000 on JD's IPO instead, your investment would be worth about $16,800 today. Alibaba outperformed JD over the past five years for three reasons.

First, Alibaba's business was less capital-intensive than JD's. Alibaba generates most of its revenue from high-margin listing and advertising fees on its marketplaces. It doesn't stock any inventory and relies on third-party logistics platforms to fulfill its orders. JD is a direct retailer that takes on inventories and fulfills orders with its own warehouses and logistics services -- which gives it tighter control over its platform but reduces its operating margins.

Second, Alibaba aggressively expanded into other markets like cloud services, streaming media, and smart speakers. Those moves tethered more users to its ecosystem, gave it fresh growth engines, and widened its moat against other tech giants like Baidu (NASDAQ:BIDU) and Tencent (OTC:TCEHY). JD mainly focused on improving its core JD Mall platform and scaling up its logistics services.

A network of cloud computing connections.

Image source: Getty Images.

Lastly, JD's stock plunged in late 2018 after founder and CEO Richard Liu was accused of rape in the U.S. The charge was eventually dropped, but JD's stock still hasn't fully recovered -- even after its revenue growth accelerated for two straight quarters. Alibaba also faced a few setbacks, including Taobao's addition to the U.S. trade blacklist of "notorious" counterfeit marketplaces, but it didn't struggle with any headline-dominating scandals like JD.

How much higher can Alibaba soar?

Alibaba's core commerce business is still firing on all cylinders. Its revenue surged 40% annually last quarter, its operating profit grew 32%, and its annual active consumers grew 15% to 693 million.

It's still Alibaba's only profitable division, and those profits subsidize the ongoing expansion of its cloud, digital media, and innovation initiatives units. Analysts expect Alibaba's revenue and earnings to grow 34% and 29%, respectively, this year -- which makes it an undervalued growth stock for investors who are willing to ride out the U.S.-China trade war headwinds.

Alibaba still has plenty of room to grow. It's expanding overseas with its AliExpress marketplace for overseas buyers, Kaola.com for cross-border purchases, and Lazada in Southeast Asia. Its advertising business should lock in more merchants and brands, and its cloud platform should continue to gain more enterprise customers.

Alibaba's IPO investors are already sitting on a near-three bagger, but it could continue growing over the long term like Amazon (NASDAQ:AMZN) -- which turned a $10,000 investment into $11.9 million in just 22 years. Therefore, investors who hold Alibaba for a few more decades could be richly rewarded.