Snowflake (SNOW 3.69%) and UiPath (PATH 0.26%) represent two different ways to invest in the growing artificial intelligence (AI) market. Snowflake's cloud-based data warehouse aggregates data from a wide range of computing platforms across an organization, cleans it up, and makes it easily accessible to third-party data visualization and analytics applications.

UiPath's software robots can be plugged into an organization's existing software to automate repetitive tasks like entering data, processing invoices, managing inventories, onboarding customers, and sending out mass emails.

But over the past 12 months, Snowflake's stock has declined 16% as UiPath's stock advanced 32%. Let's see why UiPath outperformed Snowflake by such a wide margin -- and if it will remain the better AI play for the foreseeable future.

A digital circuit shaped like a snowflake.

Image source: Getty Images.

Snowflake's growth continues to cool off

Snowflake's product revenue, which accounts for most of its total sales, surged 120% in fiscal 2021 (which ended in January 2021) and 106% in fiscal 2022. But that figure only rose 70% in fiscal 2023, and it expects just 34% growth in fiscal 2024.

Its net revenue retention rate, which gauges its year-over-year revenue growth per existing customer, also dipped to 142% in the second quarter of fiscal 2024 -- compared to 158% in fiscal 2023 and 178% in fiscal 2022. It mainly blamed that slowdown on the macroeconomic headwinds that drove more companies to rein in their software spending.

Yet Snowflake isn't cutting costs and laying off its staff to cope with that slowdown. Instead, it hired roughly 1,000 new workers in fiscal 2023 and plans to hire another 1,000 workers in fiscal 2024. That expansion implies it isn't too worried about its recent slowdown -- even as cloud giants like Amazon and Microsoft expand their own data warehousing platforms.

Its gross, adjusted operating, and free-cash-flow (FCF) margins have also consistently expanded since its initial public offering in September 2020. That expansion suggests economies of scale are kicking in, and analysts expect its adjusted earning per share (EPS) to grow 180% this year.

Over the long term, Snowflake expects to grow its product revenue at a compound annual growth rate (CAGR) of 31% from fiscal 2024 through fiscal 2029 to reach its goal of generating $10 billion in product revenue by the final year. It believes it can hit that target by gaining more large enterprise customers.

UiPath expects its growth to accelerate again

UiPath's revenue rose 81% in fiscal 2021 (which ended in January 2021) and 47% in fiscal 2022, but grew just 19% in fiscal 2023 as the macro headwinds forced more companies to postpone their sweeping software upgrades. Its dollar-based net retention rate also dipped to 121% in the second quarter of fiscal 2024 -- compared to 123% at the end of fiscal 2023 and 145% at the end of fiscal 2022.

That deceleration, along with the rise of generative AI platforms like OpenAI's ChatGPT, which can be used to automate repetitive tasks, initially spooked the bulls. But in its latest quarter, UiPath predicted its revenue would accelerate again to 20%-21% growth in fiscal 2024 as the macro environment gradually improves. Analysts expect its revenue to grow at a steady CAGR of 19% from fiscal 2023 through fiscal 2026.

UiPath also believes generative AI won't represent an existential threat to its robotic process automation (RPA) services. Instead, it plans to use generative AI to upgrade its own software robots so they can process repetitive tasks more efficiently. The RPA market could still expand at a CAGR of 23% from 2022 to 2029, according to Fortune Business Insights, so it could still have plenty of room to expand its niche market.

UiPath's adjusted gross, adjusted operating, and FCF margins have all improved significantly over the past year, but a lot of that expansion was driven by cost-cutting measures and two rounds of layoffs (5% of its workforce last June and another 6% last November). Analysts expect its adjusted EPS to surge 193% in fiscal 2024.

The valuations and verdict

Snowflake was notoriously overpriced upon its public debut, and it still isn't cheap at 167 times forward earnings and 17 times this year's sales. UiPath trades at just 30 times forward earnings and 7 times this year's sales.

That's why investors clearly favored UiPath over Snowflake in this high interest rate environment, and I believe that trend will continue for at least a few more quarters. Both stocks are promising long-term plays on the growing AI market, but UiPath's stabilizing growth and lower valuation should enable it to stay ahead of Snowflake for the foreseeable future.