Better Buy: Baidu Inc. vs. Amazon.com Inc.

Baidu (NASDAQ: BIDU) and Amazon.com (NASDAQ: AMZN) have both been very profitable plays for long-term shareholders. Shares of Baidu have risen 1,480% over the past ten years, while shares of Amazon have surged 2,050%.

Baidu and Amazon probably won't repeat those massive gains over the next decade, but both tech giants remain solid investments -- Baidu is the top search engine in China, and Amazon is the biggest e-commerce site and cloud platform provider in the world. Let's compare both company growth trajectories and valuations to see which is a better buy at current prices.

Image source: Getty Images.

How fast are Baidu and Amazon growing?

Baidu's revenue grew 35% in fiscal 2015, but it's only expected to rise 6% in fiscal 2016 when it reports its full-year earnings on Feb. 23. That slowdown was mainly caused by a government crackdown on misleading ads (especially for healthcare products) across its sites, a swap of its stake in online travel agencyQunarwith its rival Ctrip, and the overall slowdown of the Chinese economy.

But once those headwinds fade, Baidu's top line is expected togrow 20% in fiscal 2017. That growth will likely be fueled by its investments in new and adjacent markets, like O2O (online-to-offline) services which integrate new services into its core mobile app, driverless vehicles, and artificial intelligence.

Amazon's revenue rose 20% in fiscal 2015, 27% in fiscal 2016, and is expected to rise another 22% this year. That consistent growth can be attributed to the rapid growth of its core marketplace businesses and the growth of AWS (Amazon Web Services), the biggest cloud platform in the world. During fiscal 2016, AWS revenues surged 55% and accounted for 9% of its top line -- compared to 7% in 2015.

How profitable are Baidu and Amazon?

Most of Baidu's revenues come from ads, which have much higher margins than Amazon's main marketplace business. However, Baidu's operating margins have gradually declined over the past few years, due to the ramp up in its spending on O2O services and other businesses. Meanwhile, Amazon's operating margins have gradually improved due to the growth of AWS, which has much higher margins than its marketplace business.

Source:YCharts.

Baidu's net income rose 155% in fiscal 2015, but much of that gain came from the aforementioned share swap with Qunar and Ctrip. For fiscal 2016, analysts expect Baidu's net earnings to fall nearly 10% on higher O2O investments in letting users order meals, hail cabs, make payments, and perform other tasks within its core app. Baidu needs these features to widen its moat against Tencent (NASDAQOTH: TCEHY), which squeezes similar features into its monolithic WeChat app. But looking forward, analysts expect Baidu's earnings to rebound 33% in 2018 as those ecosystem investments bear fruit.

Amazon's rising operating margins lifted its net income by 125% in 2015 and 298% in 2016. Analysts expect AWS' top line growth and its steady operating margins to boost its net earnings by 49% this year and 75% in fiscal 2018. That impressive bottom line growth will give Amazon more freedom to use loss leading and low-margin strategies (like additional Prime services, Echo, Fire TV, Dash buttons) to expand its e-commerce ecosystem. However, investors should be aware that an ongoing price battle in the cloud platform market has forced AWS to repeatedly lower its prices -- so the unit's bottom line growth could still hit a few speed bumps in the near future.

What the valuations tell us

Baidu trades at 14 times trailing earnings, which is much lower than the industry average of 50 for internet information providers. But its forward P/E of 32 is higher due to its expected slowdown in earnings growth.

Amazon has a trailing P/E of 192, which initially looks lofty but isn't terribly high relative to its earnings growth in 2016. Its forward P/E of 65 also looks reasonable compared to earnings growth expectations for 2017 and 2018.

With high-growth internet companies like Baidu and Amazon, it's also important to check their enterprise value to free cash flow (EV/FCF) ratios. A lower figure indicates that the company is "cheaper" relative to its free cash flow -- which can be used to further expand their businesses. As seen in the following chart, Amazon looks much cheaper than Baidu by that key metric.

Source:YCharts.

The winner: Amazon

I own shares of both Baidu and Amazon, and I still recommend buying both stocks as long-term tech investments. But if I can only buy one at current prices, I'd buy Amazon because it exhibits steadier top and bottom line growth with reasonable valuations. As for Baidu, investors should see if short-term concerns about its rising expenses punish the stock -- which could reveal better buying opportunities.

Find out why Amazon is one of the 10 best stocks to buy now

Motley Fool co-founders Tom and David Gardner have spent more than a decade beating the market. (In fact, the newsletter they run, Motley Fool Stock Advisor, has tripled the market!*)

Tom and David just revealed their ten top stock picks for investors to buy right now. Amazon is on the list -- but there are nine others you may be overlooking.

Click here to get access to the full list!

*Stock Advisor returns as of February 6, 2017

Leo Sun owns shares of Amazon, Baidu, and Tencent. The Motley Fool owns shares of and recommends Amazon and Baidu. The Motley Fool recommends Ctrip.com International. The Motley Fool has a disclosure policy.