As of this writing, shares of Chinese e-commerce giant Alibaba (BABA -0.17%) and Google parent Alphabet (GOOGL -0.82%) (GOOG -0.79%) are down 17% and 7%, respectively, over the past 12 months. Worries over the trade war between the U.S. and China, a slowing global economy, new regulations surrounding consumer privacy, and a broader stock market sell-off have all weighed the tech titans down. However, share price doesn't tell the whole story, as both businesses have continued to put up healthy numbers and are spending profits to continue growing.

Both stocks look like good buy-the-dip candidates, but one is a better purchase at the moment.

Metric (TTM)




$47.5 billion

$130 billion

YOY increase in revenue



Operating income

$8.79 billion

$30.9 billion

YOY increase (decrease) in operating income



TTM = trailing 12 months. YOY = year over year. Data source: YCharts, Alibaba, and Alphabet.

Using commerce to further the technology cause

Alibaba is China's leader in e-commerce. While the company has been working to expand beyond its home base, the world's most populous country has still provided plenty of room for growth. Through the first six months of Alibaba's 2019 fiscal year (the six months ending Sept. 30, 2018), the company's core commerce revenue grew 58% year over year. Adjusted operating profit margins on those sales were an enviable 44%.

Those operating profits are getting put to work, most notably in the company's small cloud-computing and digital media and entertainment divisions. Cloud computing nearly doubled in the last year, notching a 92% revenue gain, and digital media and entertainment sales grew 34%. Neither segment pays for itself yet, but heavy spending to maximize growth is the more important factor at the moment. Profits will come later.

Nevertheless, Alibaba is still in the black overall. Its Trailing-12-month price-to-earnings ratio (P/E) is at 43.7. That's a premium valuation, but using the better metric of price to free cash flow (money left over after basic operations and capital expenditures are paid for) yields a 19.5. For a company that is expanding by double digits, that looks like a good value, although uncertainty surrounding the bottom line due to heavy spending could make the stock an especially volatile one.

A man touching an illustrated internet search bar.

Image source: Getty Images.

Putting ad revenues to work

The Alphabet empire is massive, on track to have hauled in around $130 billion in 2018. More than 80% of its revenues are derived from advertising, but the company is still growing at breakneck speed. Ad-related sales grew 20% during the third quarter of 2018, but income from its other businesses was up 29%.

Those other segments include things like cloud computing and data analytics services, enterprise software, smartphones and smart-home devices, and music and video subscription services. Paired with its ad empire, Alphabet's business was running at a 57% gross profit margin through the first three quarters of 2018. The company spent more than $15 billion of its profits on research and development over that period, helping fuel its top-line trajectory and nurturing dozens of early-stage businesses like autonomous cars, fiber-optic internet, and healthcare data analysis.

Alphabet's trailing-12-month P/E is 40.8, and price to free cash flow is only slightly better at 36.1. However, those metrics include the massive fines doled out to the company by the European Commission in the last year -- including $5 billion over the summer of 2018 -- and a $9.9 billion one-time tax payment due to U.S. corporate tax reform at the end of 2017. Adding those items back in, net income would have been 80% higher than reported in the last 12 months.

The better buy right now

Both Alibaba and Google parent Alphabet look like good values for the amount of growth they are putting up. For the sake of transparency, I own both stocks and plan to hold on to them for a long time due to their solid prospects.

I think the better deal at the moment, though, is Alphabet. It isn't growing the top line as fast as Alibaba, but it is more profitable and is reaping the rewards from its own investing activity. Plus, its forward P/E -- which factors in lapping the one-time EU fine and tax -- is only 22.2, compared with 28.7 for Alibaba. With the bottom line set to soar in the next year, Alphabet is the stock to buy right now.

Check out the latest Alphabet and Alibaba earnings call transcripts.