Snowflake (SNOW 3.69%) and Alphabet (GOOG 9.96%) (GOOGL 10.22%) represent two different ways to invest in the growing artificial intelligence (AI) market. Snowflake's cloud-based data warehouse helps companies gather their data from a wide range of computing platforms so it can be easily processed by third-party apps. Its new Cortex service adds additional generative AI capabilities to that ecosystem.

Alphabet's Google owns the world's largest search engine, streaming video platform (YouTube), mobile operating system (Android), web browser (Chrome), and webmail service (Gmail). It also owns the world's third-largest cloud infrastructure platform. That sprawling ecosystem gives Google access to a lot of data -- and it's organizing all of that information with its AI-powered Gemini chatbot.

A person uses a tablet computer outside.

Imge source: Getty Images.

But since the beginning of this year, Snowflake's stock has declined about 5% as Alphabet's stock dipped 1%. Both stocks underperformed the S&P 500's 7% gain, even as the explosive growth of the AI market lit a raging fire under many other AI-related stocks. Should investors buy either of these out-of-favor AI stocks right now?

Alphabet's core businesses are slowing down

Alphabet generates most of its revenue from Google's advertising ecosystem, which includes its search and display ads, its advertising network, and YouTube. This core business faces a broad range of macro, competitive, and regulatory challenges.

On the macro front, rising rates and other macro headwinds are driving many companies to rein in their marketing expenses. As for the competition, YouTube is struggling to keep pace with Meta Platforms' Reels and ByteDance's TikTok in short videos, and Amazon is evolving into a tough challenger with its marketplace ads. Independent ad tech companies like The Trade Desk are also encouraging advertisers to break free from Google's "walled garden" and purchase more ads across the open internet. As for the regulatory issues, Google still faces unresolved antitrust probes and fines across the U.S., Europe, and other regions regarding its search engine's market dominance and data mining practices.

All of that pressure caused Google's advertising revenue to rise just 6% in 2023, compared to its 7% growth in 2022. The bears believe that the slowdown will drag on as it tries to stay relevant in the evolving market for online ads.

Alphabet previously relied on Google Cloud's growth to offset the slower growth of its advertising business, but its cloud revenue only rose 26% in 2023, compared to its 37% growth in 2022. It seemingly struggled to keep pace with Microsoft Azure, which has been spicing up its AI ecosystem with OpenAI's generative AI features, as well as the market leader Amazon Web Services (AWS) in the cloud race.

Alphabet's revenue only rose 9% in 2023, but its cost-cutting measures boosted its EPS by 27%. Analysts expect its revenue and EPS to rise 11% and 17%, respectively, in 2024, but those estimates might be too optimistic if it keeps tripping over its own feet. On the bright side, its stock looks historically cheap at 20 times forward earnings.

Snowflake could miss its own growth targets

Snowflake's product revenue, which accounts for most of its top line, rose 38% in fiscal 2024 (which ended this January), but that marked a significant slowdown from its 70% growth in fiscal 2023. Its net revenue retention rate -- which gauges its year-over-year growth per customer -- also dropped from 158% in 2023 to 131% in 2024.

Snowflake attributed that slowdown to the macro headwinds, which drove many companies to rein in their spending on cloud-based services. However, it could also be struggling to keep pace with high-growth start-ups like Databricks, which could go public this year, and cloud giants like Microsoft, Amazon, and Google, which integrate data warehouses into their own cloud infrastructure platforms. Snowflake runs its platform on top of AWS, Azure, and Google Cloud, so it's ironically paying hefty cloud hosting costs to its largest competitors.

Back in 2022, Snowflake's then-CEO Frank Slootman set a target for generating $10 billion in product revenue in fiscal 2029. To reach that goal, the company needs to grow its product revenue at a compound annual growth rate (CAGR) of 30% from fiscal 2024 to fiscal 2029. Unfortunately, it expects its ongoing slowdown to deepen with just 26%-27% year-over-year growth in product revenue in the first quarter of fiscal 2025. Slootman also abruptly resigned in late February and handed the reins over to his successor Sridhar Ramaswamy, but the company hasn't abandoned its ambitious growth targets yet.

Snowflake's gross, operating, and free cash flow margins are expanding on a non-GAAP (generally accepted accounting principles) basis, but it's still deeply unprofitable on a GAAP basis. Analysts expect its non-GAAP EPS to rise 16% in fiscal 2025 -- but its stock looks expensive at 165 times that estimate.

The better buy right now: Alphabet

Alphabet faces a lot of near-term challenges, and it might turn into a slower growth company like IBM if it fails to keep pace with Microsoft and Amazon in the cloud and AI race. That said, it still looks like a safer investment than Snowflake, which is priced like a hypergrowth stock but quickly losing its momentum. Therefore, I believe Alphabet will continue to outperform Snowflake for the foreseeable future.