Shares of Palantir Technologies (PLTR 3.73%) and C3.ai (AI 3.02%) have been in red-hot form on the stock market over the past year, gaining 140% and 107%, respectively, thanks to the expectation that the adoption of artificial intelligence (AI) could supercharge their growth in the long run.

The terrific gains that these stocks delivered lately may seem a tad surprising at first, considering the pace at which Palantir and C3.ai are growing. Palantir's growth has slowed down of late thanks to a challenging scenario in its government-related business. C3.ai has been struggling to put its foot on the gas ever since it switched its business model from a subscription-based one to a consumption-based one.

Not surprisingly then, Palantir and C3.ai stocks trade down 21% and 43%, respectively, from their 52-week highs. However, considering that both companies could take advantage of the growing adoption of AI software in the long run, investors may be wondering if they should consider using the pullback as a buying opportunity. If that's indeed the case, which one of these two AI stocks warrants a buy?

Let's find out.

Palantir Technologies' AI business is gaining traction

Palantir Technologies' full-year 2023 revenue outlook of $2.22 billion suggests that its top line is on track to increase 16.5% this year. But for a stock that's trading at 17 times sales, investors may be having second thoughts about whether Palantir is worth investing in right now, given the rich valuation.

However, a closer look at Palantir's business suggests that its AI business is gaining traction. The number of commercial customers using Palantir's solutions increased an impressive 45% year over year in the third quarter of 2023 to 330. For comparison, the company's overall customer count was up 34% year over year to 453.

The stronger growth in the commercial customer count also led to a robust 23% year-over-year increase in Palantir's commercial revenue in the last reported quarter to $251 million. This was far better than the 12% growth that the government business recorded. The healthy growth in Palantir's commercial customer base and revenue isn't surprising as its Artificial Intelligence Platform (AIP), which was launched in April last year, is witnessing rapid adoption.

In the third quarter of 2023, for instance, the number of users on AIP nearly tripled. Palantir also points out that close to 300 organizations have deployed AIP within a short span of just five months since the platform's launch. Even better, Palantir is looking to aggressively take its AIP to commercial customers with the help of boot camps.

Palantir management points out that the company has redesigned its "go-to-market approach around AIP boot camps, which has allowed us to deliver real workflows on actual customer data in five days or less versus our traditional pilots, which generally take one to three months." This seems to be accelerating Palantir's commercial deal growth as well.

In the third quarter of 2023, Palantir says that the "deal count for our U.S. commercial business is 2.4x what it was in Q3 of last year and U.S. commercial TCV closed at $252 million, up 55% year over year on a dollar-weighted duration basis." All this indicates that AI is indeed having a positive impact on Palantir's performance, which possibly explains why analysts have sharply increased their revenue growth expectations.

PLTR Revenue Estimates for Current Fiscal Year Chart

PLTR Revenue Estimates for Current Fiscal Year data by YCharts

What's more, consensus estimates project Palantir's earnings to increase at an annual rate of 85% for the next five years, suggesting that it could indeed become a top AI stock in the long run. That won't be surprising as Palantir is considered to be the leader in the AI software platforms market, which is expected to grow rapidly in the long run.

C3.ai is expected to step on the gas

Unlike Palantir, which made its name by providing software and data analytics solutions to government agencies, C3.ai is a pure-play provider of enterprise AI software. However, its tepid growth suggests that the company isn't making the most of the end-market opportunity just yet. Market research firm IDC estimates that the AI software market could be worth a whopping $251 billion in 2027 as compared to $64 billion in 2022, clocking a compound annual growth rate of 31%.

For comparison, C3.ai is anticipated to clock just 15% revenue growth in the current fiscal year to $306 million. The good part is that analysts are anticipating an uptick in the company's growth from the next fiscal year.

AI Revenue Estimates for Current Fiscal Year Chart

AI Revenue Estimates for Current Fiscal Year data by YCharts

This potential improvement in C3.ai's growth can be attributed to the ramp-up of its consumption-based revenue model. C3.ai used to enjoy greater revenue visibility and pipeline when it was following a subscription-based model, which allowed it to lock customers into long-term contracts. However, the company felt that such a model raised the entry barrier for new customers, so it switched to a pay-as-you-go model just over a year ago.

As a result, C3.ai's growth rate dropped. But the good part is that the company is currently in the second phase of this transition. During this phase, C3.ai says that more customers are set to convert to its consumption-based model, and its revenue decline will hit bottom. Additionally, C3.ai anticipates its revenue and margin growth will start improving from this phase.

C3.ai expects to enter the third phase of the transition from fiscal 2025. Management points out that most of its customers would have converted to the consumption model in the third phase, and its revenue growth will accelerate to pre-transition levels. It is worth noting that C3.ai's annual revenue jumped an impressive 38% in fiscal 2022 -- when the transition had yet to begin -- to $253 million, up from 17% growth in the previous fiscal year.

This explains why C3.ai is expected to clock 20%-plus growth rates over the next couple of fiscal years. Analysts also expect the company's earnings to increase at an annual pace of almost 51% for the next five years. Another impressive thing to note is that C3.ai saw an improvement in customer engagement after the transition.

In the second quarter of fiscal 2024, it witnessed a 148% year-over-year jump in the number of new agreements while the number of bookings doubled. So, just like Palantir, even C3.ai is expected to capitalize on the AI software market and deliver healthy growth going forward. But which one of these two stocks looks like a better investment?

The verdict

We have already seen that Palantir sports an expensive sales multiple of 17. C3.ai, for comparison, is cheaper at 11 times sales. Given that both companies are forecasting an acceleration in revenue growth and should deliver healthy earnings growth, investors looking for a value play may want to opt for C3.ai.

However, there isn't much difference in the forward sales multiples of both companies.

PLTR PS Ratio (Forward 1y) Chart

PLTR PS Ratio (Forward 1y) data by YCharts

As such, it comes down to the risk appetite of investors looking to buy one of these two AI stocks right now. While conservative investors can opt to buy C3.ai given its lower valuation and growth prospects, those with a more aggressive risk profile may not mind paying a higher valuation for Palantir, given that it can benefit from the growth in both government and commercial AI spending in the long run.