The artificial-intelligence revolution is upon us, with investors scrambling to figure out the winners and losers. Will the biggest winners be in semiconductors? Cloud platforms? Software? And which ones?

One good place to look for AI beneficiaries is companies that were already in the business of data science and automation for years, with large language models now potentially turbocharging their offerings.

In addition, new AI capabilities may be somewhat expensive, so investment targets should also include companies with great balance sheets that can afford to invest in AI.

Two such companies are UiPath (PATH 0.26%) and Palantir (PLTR 3.73%). But which is the better buy today?

What UiPath and Palantir do

UiPath makes software that mines a company's workflows and processes. Once done, UiPath's software is then tailored to automate repeatable processes and make workers more productive, saving time and money.

Palantir began as a data software platform for U.S. military and intelligence agencies to track down terrorists. But more recently, the company has been expanding rapidly with commercial customers, as its data-mining capabilities can also greatly boost the capabilities of enterprises and non-military organizations.

So both companies were already using big data, machine learning, and other intelligence capabilities. Now, in the post-ChatGPT era, these companies are infusing their already-robust offerings with generative AI.

Moreover, each stock is still well below its all-time high, with Palantir down 56% and UiPath down 80% from their 2021 high valuations.

Revenue growth

As one can see, both UiPath and Palantir experienced hypergrowth in the pandemic era, reaching growth rates over 50%. But that period came to a screeching halt in 2021 and 2022, when each company saw revenue decelerate markedly to the high teens. Still, it appears each company's growth rate may be stabilizing at these levels, with the potential for some reacceleration in the future.

PLTR Revenue (Quarterly YoY Growth) Chart

PLTR Revenue (Quarterly YoY Growth) data by YCharts

Each company is also seeing some unique revenue dynamics. For UiPath, it's currently weathering a 2-percentage-point headwind from foreign currency exchange, as it has a lot of its customer base overseas. In addition, because of its hybrid model that spans both on-premises and subscription-based cloud billing, there is a 5-percentage-point headwind resulting from the quirks of UiPath's accounting to its revenue, relative to its billings. So UiPath's growth may even be a tad stronger than it appears.

Meanwhile, Palantir also has some unique aspects to its revenue growth. Because of the project-based and tailored nature of its customer engagements, its growth is far more uneven than a typical subscription-based software company. This is especially true of its government revenue, which grew 12% year over year and made up most of Palantir's revenue base. However, the company's commercial revenue base is growing faster at 23%, with the U.S. commercial customer base growing 33% last quarter.

Commercial revenue made up 45% of Palantir's revenue overall, so if the commercial segment can keep up its strength, it could eventually overtake the government revenue and sustain Palantir's growth rate well into the future.

So both companies have reason to think this year's growth rate may sustain, or potentially accelerate, in the near to medium term.

man's hands typing on a laptop with AI icon.

Image source: Getty Images.

Profitability

One advantage Palantir does have is that it's profitable on an operating profit basis, having flipped to profitability over the past year. While the company made only $40 million in operating profit last quarter, that is pretty good in comparison with a lot of its software peers, which typically operate at a loss, and a big improvement from Palantir's $62 million loss in the year-ago quarter.

In contrast, UiPath posted a $77.6 million loss its last quarter, ending in July. But that was a big improvement from the $120.2 million loss in the same quarter from a year ago. So even though UiPath is still unprofitable on a GAAP basis, it's improving rapidly.

Meanwhile, both companies were free cash flow positive. UiPath reported $47 million in free cash last quarter, or 16.4% of revenue, while Palantir posted adjusted free cash flow of $141 million, or 25% of revenue.

So overall, UiPath is growing a bit more quickly today than Palantir, but Palantir is showing better margins. Yet both companies are young enough where these growth rates and margin profiles can change a lot very quickly.

Cash on the balance sheet

Another positive trait is that both Palantir and UiPath have lots and lots of cash on their balance sheets and no debt, and that cash pile makes up a fair amount of their respective market caps. These days, companies can earn around 5% on their cash, so not only do these cash piles provide downside protection, but they're also actual sources of income.

Company

Cash and Cash Equivalents

Market Cap

Cash as a Percentage of Market Cap

UiPath

$1.8 billion

$10.5 billion

17.1%

Palantir

$3.3 billion

$46.4 billion

7.1%

Data sources: UiPath and Palantir quarterly reports.

Even though Palantir has more cash overall, UiPath has a significantly higher percentage of its market cap in cash. So that adds to more downside protection for UiPath.

Valuation

Valuing unprofitable or low-profit businesses is a bit difficult, but there are several ways to go about it. These include valuing each stock as a multiple of sales, or on forward estimates of earnings or EBITDA. On those fronts, UiPath is the cheaper of the two stocks, and sometimes by a wide margin.

PATH PS Ratio Chart

PATH PS Ratio data by YCharts

UiPath seems like the better bet

Investors may be highly enthusiastic about Palantir's high-profile technology in national security settings as well as its AI chops. But UiPath, in perhaps a quieter, less sexy part of the business, has outgrown Palantir of late, while also being notably cheaper in relation to its sales and future earnings estimates.

While both are intriguing software plays, UiPath is perhaps the better candidate for your investment dollars today.