Palantir (NYSE:PLTR) and C3.ai (NYSE:AI) both help organizations and companies crunch data with AI-powered tools.

Palantir, which generates more than half its revenue from government contracts, wants its Gotham platform to become the "default operating system for data" across the U.S. government. Its Foundry platform provides data-mining tools to large commercial customers.

C3.ai serves a wide range of clients across the commercial, industrial, and government sectors. It generates most of its revenue from energy giants like Baker Hughes and ENGIE.

A digital illustration of a human brain made from a blue material emerging from a computer chip.

Image source: Getty Images.

Palantir -- which went public via a direct listing last September -- started trading at $10 per share, surged to the high $30s in February, and now trades in the mid-$20s. C3.ai went public at $42 per share via an IPO last December, opened at $100 on the first day, but now trades in the low $60s.

Both stocks have underperformed the S&P 500 this year as investors have been moving from growth to value stocks, but is one of these companies a better long-term play on the booming AI market?

The differences between Palantir and C3.ai

Palantir, which is named after the all-seeing orbs from The Lord of the Rings, helps organizations accumulate data on individuals from disparate sources, then processes it with algorithms to make data-driven decisions.

Palantir's biggest customer is the U.S. government, and its tools are used by the CIA, FBI, ICE, and all branches of the military. Its technology was reportedly used to hunt down Osama bin Laden in 2011, but it was also used by ICE in recent years to locate and deport undocumented immigrants.

C3.ai initially only served energy companies before expanding into other markets. Unlike Palantir, which gathers data from external and internal sources, C3.ai mainly uses a company's internal operations.

C3.ai's algorithms can schedule maintenance routines, detect fraud, optimize inventories, and improve CRM (customer relationship management) systems. In short, it's a lot less controversial bet than Palantir.

How fast is Palantir growing?

Palantir's revenue increased 47% to $1.1 billion in 2020. Its government revenue rose 77% as its commercial revenue grew 22%.

It expanded its government contracts with the FDA, U.S. Army, and U.S. Air Force, and its commercial business attracted big customers including Rio Tinto, PG&E, and BP. Its adjusted gross and operating margins expanded, but it still posted a net loss of $1.2 billion -- compared to a loss of $580 million in 2019.

In the first quarter of 2021, Palantir's revenue rose 49% year-over-year to $341 million, with 76% growth in its government business and 19% growth in its commercial business. Its adjusted gross and operating margins expanded again, but its net loss again widened, from $54.3 million to $123.5 million. On the bright side, its adjusted EBITDA turned positive with a profit of $119.8 million -- but that excludes its stock-based compensation and a lot of "one time" expenses.

Wall Street expects Palantir's revenue to rise 35% this year, while the company expects its annual revenue to increase more than 30% every year through 2025. That confident outlook indicates a belief that its government business will remain stable as it gradually gains more commercial customers, but the company could remain steeped in controversy about data-gathering and deeply unprofitable for years to come.

How fast is C3.ai growing?

C3.ai's revenue rose 17% to $183.2 million in fiscal 2021, which ended in April. That marked a significant slowdown from its 71% growth in 2020, mainly due to pandemic-related disruptions of the energy and industrial sectors.

Its average contract value also decreased from $12.1 million in 2020 to $7.2 million in 2021, even as it initiated new enterprise AI projects with big customers like 3M, Consolidated Edison, Shell, and the New York Power Authority. But its total number of customers rose 82% to 89 at the end of the year, which indicates its business could recover quickly after the pandemic ends. It expects its revenue to increase 33% to 35% in the current fiscal year.

C3.ai's adjusted gross margin stayed flat in fiscal 2021 as its operating margin remained in the red, but its net loss narrowed year-over-year from $69.4 million to $55.7 million. It doesn't calculate its profits in adjusted EBITDA terms, and analysts expect it to stay unprofitable for the foreseeable future.

The valuations and verdict

Palantir and C3.ai trade at 31 and 26 times this year's sales, respectively. Those high price-to-sales ratios indicate neither stock is cheap in this market, especially as investors rotate from growth to value stocks.

That said, it makes more sense to invest in the company that is more dependent on stable government customers than the one that relies heavily on the macro-sensitive energy and industrial sectors. It also makes more sense to invest in the company with superior revenue growth if both stocks are trading at comparable price-to-sales ratios.

Therefore, Palantir might be more controversial than C3.ai, but I believe it's the better growth play in the AI market. C3.ai's long-term prospects still look bright, but its stock remains too expensive relative to its growth.

 
This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.