MercadoLibre (MELI 2.44%) has often been labeled the "eBay of Latin America," and rightfully so, as it's built a dominant online marketplace ecosystem, which also includes a fast-growing mobile payments platform. The Latin American e-commerce company serves nearly 300 million users in the region and is growing fast. Amazon.com (AMZN 3.65%) doesn't need an introduction, considering that 51% of U.S. households will be Amazon Prime members by the end of 2019, according to eMarketer.

Both stocks have delivered huge gains for investors and should continue to hit new highs over the long term, but we'll compare them to see which one will likely perform the best in the next few years.

A laptop computer with small shipping boxes and a globe sitting on top of the keyboard.

IMAGE SOURCE: GETTY IMAGES.

Growth nirvana

MercadoLibre is emerging as a force to reckon with in the fintech space. The MercadoPago payments business reached $6.5 billion in total payment volume (TPV) last quarter, representing a year-over-year growth rate of 90% in local currency. The most impressive thing about this growth is that off-marketplace payment volume is now nearly half of TPV, and it is growing much faster -- at 198% year over year last quarter.

The fast growth of Mercado's payments segment has lit a fire underneath the company, with companywide revenue growth adjusted for currency changes accelerating to 102% in the most recent quarter. Investors are very bullish on the prospects of MercadoPago, which is why the stock has soared 78% over the last year.

Amazon isn't growing nearly as fast, with currency-neutral revenue growth decelerating from 30% in Q3 2018 to 21% in the most recent quarter. That's still very impressive when we consider that Amazon generated a massive $252 billion in sales on a trailing-12-month basis. The deceleration in revenue growth hasn't stopped investors from buying the stock, as the share price is up 23% year to date and is currently within striking distance of a new all-time high.

Why are investors still bullish on Amazon? The momentum of Amazon Web Services (AWS) in the infrastructure-as-a-service cloud market seems to be the driving force behind the climb of Amazon's stock price. Last quarter, AWS saw revenue surge 37% year over year as organizations continue to migrate their data systems over to the cloud. Most importantly, AWS generated two-thirds of the company's operating income in the second quarter, which has significantly improved the company's profitability.

On the other side, MercadoLibre's payments business is not providing the same contribution to its profit as Amazon is experiencing with AWS. The growth of MercadoPago has required tremendous investment. Operating expenses have climbed significantly in the last few years while management invests to support the growth in its fintech services and attract more users to its platform.

MercadoLibre managed to flip the year-ago loss of $11.5 million to a small profit of $16.2 million in the second quarter, but the lack of profitability in the short term leaves the stock trading at an astronomical trailing P/E of 2,993. Even when we consider analysts' earnings estimates for 2020, the valuation still looks high at a forward P/E of 298. MercadoLibre's investments should eventually pay off with higher profits down the road, but that's a high price to pay relative to Amazon right now.

MercadoLibre's nosebleed P/E makes Amazon's high valuation look like a bargain, with the tech titan trading at a trailing P/E of 76. Amazon also looks more attractive based on the price-to-sales metric, trading at 3.62 times sales compared to MercadoLibre's price-to-sales ratio of 15.77.

A few other items that tilt the scales in favor of Amazon, in my opinion, are the concentration risk of MercadoLibre operating in only one area of the world -- Latin America -- whereas Amazon operates in many countries around the world. Mercado's largest geographies by sales -- Brazil, Argentina, and Mexico -- have more volatile economies than Amazon's strongholds like the U.S. and Europe. Because of this, Amazon might be the safer stock to own if the global economy suddenly sank into a recession.

Which e-commerce giant is the better buy?

Looking out over decades, I think both are great growth stocks to consider. MercadoLibre could certainly grow into its high valuation, because Latin America is the fastest-growing e-commerce market in the world, and the company still has a relatively low penetration of the 644 million people who live in the region. But it's interesting that despite the tremendous momentum the company is experiencing, the stock is down since the last earnings report. That could be a sign that much of the near-term growth is already priced into the valuation right now.

But Amazon still offers plenty of growth potential, too. Its 21% growth last quarter is nothing to sneeze at for a company of its size. And while AWS is facing heightened competition from other cloud providers, it's still growing fast and turning the once-unprofitable online retailer into a cash machine.

All in all, I believe Amazon is the better buy for investors today.