Companies focused on artificial intelligence (AI) can be compelling investments these days since this market is expanding rapidly. The industry is forecast to grow from $242 billion in 2023 to $739 billion by 2030, representing a compound annual growth rate of 17%.

Two attractive AI businesses are UiPath (PATH 2.21%) and C3.ai (AI 1.08%). Each provides AI software used by customers to automate aspects of their operations. This approach has enabled both companies to flourish.

But if you had to choose just one, which makes the better AI investment? The answer isn't straightforward, since each company has different strengths and weaknesses. Here is a look at UiPath and C3.ai to help you assess which makes a better long-term investment.

UiPath's surprise twist

UiPath uses AI to automate many routine business tasks, such as analyzing bank loan applications for incomplete information or answering customer inquiries by email.

The company had been on a trajectory of strong year-over-year revenue growth. In its fiscal first quarter, ended April 30, it generated $335 million in revenue, a 16% year-over-year increase.

Despite its Q1 performance, a surprising twist entered the picture recently. On May 29, UiPath announced that its CEO had resigned, and it changed fiscal 2025's revenue guidance from $1.6 billion to $1.4 billion, because its sales growth suddenly slowed.

Fortunately, UiPath's co-founder and former CEO Daniel Dines returned to the top spot. His resumption of CEO duties brings stability, and he's addressing challenges in sales execution that proved a key factor in the anticipated revenue slowdown.

Aside from UiPath's sales slump, the company's financials are excellent. It exited Q1 with free cash flow (FCF) of $101.3 million, an impressive 40% improvement over the previous year.

Its Q1 balance sheet was strong. Total assets were $2.8 billion compared to $818 million in total liabilities with no debt. Of its liabilities, $616 million was deferred revenue, which will eventually be recognized as income.

UiPath had a net loss of $28.7 million in its fiscal first quarter, but it's moving toward profitability. Its Q1 net loss was an improvement over the prior year's loss of $31.9 million.

The pros and cons of C3.ai

C3.ai's software platform enables customers to easily adopt AI technology and apply it to their business. For example, gas and oil company Shell uses C3.ai's software to monitor and proactively identify maintenance needs for its equipment before a failure occurs.

The company has found success with this offering after transforming itself from an energy management and Internet of Things (IoT) specialist. Its AI business propelled C3.ai to sales of $310.6 million in its 2024 fiscal year, ended April 30, representing 16% year-over-year growth.

The company expects revenue to continue rising. It estimates fiscal 2025 sales to increase 23% over the previous year to at least $370 million. C3.ai's revenue growth also translated to FCF of $18.8 million in its fiscal Q4, up from $16.3 million in the prior year.

Like UiPath, C3.ai's balance sheet is strong. The company exited fiscal 2024 with $1 billion in total assets versus $165 million in total liabilities. However, C3.ai is not profitable, and its losses are mounting. Its fiscal Q4 net loss of $72.9 million is up from the prior year's $65 million loss.

Moreover, its business is not cash-flow positive with negative operating cash flow of $62.4 million in Q4. While operating at a loss is common for fast-growing tech companies, you'll want to see C3.ai move toward profitability over time, especially if revenue growth starts to decelerate.

Deciding between UiPath and C3.ai

In contrasting these AI companies, here are other factors to consider before choosing UiPath or C3.ai. One is valuation. Because both companies are not profitable, the price-to-earnings (P/E) ratio commonly used for stock valuation isn't applicable, so let's compare their price-to-sales (P/S) ratios.

AI PS Ratio Chart

Data by YCharts.

UiPath's P/S ratio dropped after its stock price plummeted on the news of its CEO change and reduction in fiscal 2025 revenue guidance. As a result, UiPath looks like a better value between these two.

If UiPath can turn around its slumping sales, its shares could achieve greater upside than C3.ai over the long run. But depending on your risk tolerance, you may prefer to wait a few quarters to see if UiPath's revenue growth can bounce back before deciding to invest.

Another consideration is that investing in these growth stocks means you want to see a strong sales trend that looks likely to continue. On that basis, C3.ai is the winner given its performance to date and fiscal 2025 guidance.

Ultimately, the uncertainty around UiPath's revenue growth rebound combined with C3.ai's anticipated strong sales in fiscal 2025 tip the scales in C3.ai's favor. This makes C3.ai the better AI investment at this time.