If a five-year look at history is any guide, there's no contest in deciding between investing in Palantir Technologies (PLTR -1.53%) or Alibaba Group Holding (BABA -2.34%). Palantir's share price has skyrocketed a staggering 1,560% since its initial public offering in 2020. Alibaba's shares have plunged almost 60% during the same period.
But the past isn't always a great predictor of the future, and investor have to ask: Which is the better artificial intelligence (AI) stock going forward? Here's how Palantir and Alibaba stack up against each other.

Image source: Getty Images.
Financials
These two AI stocks match up quite closely on at least one key financial metric. Palantir's return on equity is 12.36% compared to 11.44% for Alibaba. However, that's perhaps the only similarity between the two companies when it comes to financials.
Alibaba rakes in a lot more money than Palantir does. Over the last 12 months, the Chinese technology giant generated revenue of more than $996 billion with earnings of roughly $129.5 billion. Meanwhile, Palantir's revenue was $3.12 billion with earnings of nearly $571 million. However, Palantir has a higher profit margin -- 18.3% versus Alibaba's 13.1%.
Turning to the balance sheets, Alibaba's cash position of $428 billion is much larger than Palantir's $5.4 billion. On the other hand, Alibaba also has a lot more debt -- $248 billion compared to only $244.6 million for Palantir. As a result, Palantir's debt-to-equity ratio of 4.4% is more attractive than Alibaba's ratio of around 22.8%.
Growth
Alibaba delivered solid growth in its latest reported quarter ending on March 31. Revenue increased by 7% year over year to nearly $32.6 billion. Adjusted earnings jumped 22% year over year to $4.1 billion. However, those numbers pale in comparison to Palantir's growth.
Palantir's revenue soared 39% higher year over year in the first quarter of 2025 to $883.9 million. The AI software company's earnings based on generally accepted accounting principles (GAAP) more than doubled to $217.7 million. Its non-GAAP earnings vaulted nearly 70% higher to $334.4 million.
Will this disparity in growth continue? Probably, although it could narrow somewhat. Alibaba's AI-related product revenue has achieved triple-digit growth for seven consecutive quarters. The company's AI and cloud businesses have great long-term growth prospects.
However, Palantir continues to win new contracts in the government and private sectors. CEO Alex Karp wrote to shareholders earlier this year, "The rush toward large language models, as well as the foundational software architecture that is capable of making them valuable to large organizations, has turned into a stampede."
Valuation
These two AI stocks' valuations are as different as night and day. Palantir's shares trade at a jaw-dropping premium, with a forward price-to-earnings ratio of nearly 278. Alibaba's forward earnings multiple of 14 seems dirt cheap by comparison.
Of course, investors should receive a lot more growth with Palantir than with Alibaba. Does this additional growth justify the stark differences in valuations? Not according to analysts surveyed by financial data and infrastructure provider LSEG. Palantir's price-to-earnings-to-growth (PEG) ratio, based on analysts' five-year earnings growth projections, is 4.9. Alibaba's PEG ratio is only 1.09.
The reality is that Alibaba looks more attractive regardless of which valuation metric we use. Its price-to-sales ratio is 2.08 versus 126.9 for Palantir. Alibaba's enterprise-value-to-EBITDA is 9.02, compared to 848.9 for Palantir.
Better AI stock?
Wedbush analyst Dan Ives believes that Palantir's market cap will hit $1 trillion within the next two to three years. The company's market cap hovers around $370 billion today. If Ives is right, Palantir is easily a better AI stock to buy than Alibaba.
My concern, though, is that Palantir's current growth -- as impressive as it might be -- simply isn't enough to justify the stock's premium valuation. Perhaps the company's growth will accelerate rapidly and dispel my doubts, but that hasn't happened yet.
Meanwhile, Alibaba dominates the Chinese cloud services market. It's a major player in the country's e-commerce market. The company plans to launch AI glasses to compete against Meta and other rivals. And its stock is a bargain. Based on the facts as they stand right now, I think Alibaba is a better AI stock to buy than Palantir.