Palantir (PLTR 3.73%) and C3.ai (AI 3.02%) have seen explosive stock performance this year thanks to emerging opportunities in artificial intelligence (AI). Palantir stock is up 134% across 2023's trading, while C3.ai stock has climbed 121% across the stretch. 

On the other hand, both companies still trade at steep discounts compared to valuation highs reached in the last few years. Even after rallies this year, Palantir is down roughly 61% from its high, while C3.ai stock is down 86% from its peak.

Which of these potentially explosive AI stocks stands out as the better buy right now? Read on for a look at each company's strengths and weaknesses and a conclusion on which AI player presents the better investment opportunity. 

Pros and cons for Palantir stock

Palantir launched its new Artificial Intelligence Platform (AIP) suite in May, and the product is off to an encouraging start. After growing sales 13% year over year in this year's second quarter, the company's midpoint target calls for sales growth to accelerate to 16% in the current quarterly period.

With more than 100 customers already using AIP and 300 additional enterprise customers potentially interested in adopting the service, Palantir may have a powerful new performance driver on its hands.

Palantir's margins are also heading in the right direction. The company has posted three consecutive quarters of profitability on a GAAP basis, and it's guiding for continued profitability going forward. With the shift, the company is no longer relying on stock-based compensation to arrive at non-GAAP (adjusted) profitability.

The data-software specialist has shifted into delivering real earnings faster than many analysts and stock watchers anticipated, and it looks like the business is on track to continue scaling profitably. 

Palantir also has a strong balance sheet. With more than $3 billion in cash and equivalents and zero debt, the company has ample resources to fund internal growth initiatives and pursue potential acquisitions that could bolster existing strengths and branch the business into new categories. 

PLTR PS Ratio (Forward) Chart

PLTR PS Ratio (Forward) data by YCharts

While things generally seem to be heading in the right direction for Palantir, investors still have to keep the valuation picture in mind. Trading at more than 14.5 times this year's expected sales and 66 times expected adjusted earnings, the company's current valuation already bakes in some strong growth. 

Palantir has posted uneven growth since going public in 2020, and charting the company's future performance involves plenty of speculation. While the company looks well positioned in its corner of the AI-and-analytics-services market, the stock is risky at current prices. 

Pros and cons for C3.ai stock

C3.ai recently launched its new generative AI suite, expanding on an initial release for the platform that took place in March. The company has returned to posting sales growth, with revenue increasing 10.8% year over year to reach roughly $72.36 million in the first quarter of its 2024 fiscal year -- which ended this past July.

For the current quarter, the company's midpoint guidance calls for sales to increase 19% year over year. Meanwhile, its full-year performance target calls for annual revenue growth of roughly 15%.

C3.ai also closed out its last reported quarter with cash and equivalents totaling $809.6 million against zero debt. Even with the company guiding for an adjusted operating loss between $70 million and $100 million this year, it appears to be on solid financial footing for the foreseeable future. 

AI PS Ratio (Forward) Chart

AI PS Ratio (Forward) data by YCharts

Like Palantir, C3.ai has a heavily growth-dependent valuation. Trading at roughly 9.5 times this year's expected revenue, C3.ai's forward price-to-sales multiple is actually significantly lower than Palantir's. But the kicker is C3ai is not posting GAAP or adjusted profits.

C3.ai originally forecast that it would become profitable on an adjusted basis in the fourth quarter of its current fiscal year, but it looks like it will take longer than anticipated for the business to shift into the black.

With the company's midpoint guidance targeting an adjusted loss of $85 million this year and an uncertain performance trajectory looking further out, the company's current valuation comes with a high level of risk. 

So, which AI growth stock is the better buy?

Palantir and C3.ai are both high-risk stocks. While both companies could go on to deliver explosive returns from current pricing levels, I believe Palantir stands out as a much better investment right now. 

Even though Palantir trades at a higher sales multiple, it's already shifted into delivering consistent profits on a GAAP basis. Additionally, its overall footing in the AI space seems to be stronger than that of its smaller rival.

For risk-tolerant investors looking to capitalize on the artificial-intelligence trend, I think that Palantir stands out as a worthwhile portfolio addition right now. Meanwhile, I believe C3.ai still has more proving to do when it comes to sales growth sustainability, margin improvement, and overall competitive strength in AI.