Snowflake (SNOW 0.32%) and Oracle (ORCL 2.93%) represent two different ways to invest in the growing cloud market. Snowflake helps companies clean up and aggregate large amounts of data for third-party applications through its cloud-based data warehouses. Oracle is the world's largest database software company, and it's transformed a lot of its on-site applications into cloud-based services over the past decade.

Snowflake usually attracts growth-oriented investors, while Oracle's slower expansion rates, stable profits, and steady dividends make it more appealing to value-oriented investors. But over the past three years, Snowflake's stock declined about 45% as Oracle's shares soared 66%. Let's see why that happened and whether Oracle is still the better buy.

A person connects a smartphone, laptop, and tablet to a cloud-based service.

Image source: Getty Images.

Snowflake's valuation is limiting its gains

Snowflake has grown like a weed since its public debut in September 2020. Its product revenue (which accounts for most of its top line) soared 120% in fiscal 2021 (ended in January 2021), 106% in fiscal 2022, and 70% in fiscal 2023.

It grew rapidly for three reasons. First, it was compatible with a wide range of public cloud platforms -- including Amazon Web Services (AWS) and Microsoft Azure -- and didn't lock its clients into a stickier cloud ecosystem. Second, it only charged its users for the computing power and storage they used instead of locking them into subscriptions. Finally, it broke down the silos across different departments and computing platforms by pulling all of an organization's data into a centralized location where it could be easily analyzed to make business decisions.

But in fiscal 2024, Snowflake only expects its product revenue to rise 37% to $2.65 billion as macro headwinds drive companies to rein in their cloud spending. However, it still forecasts $10 billion in product revenue by fiscal 2029, which implies its top line will climb at a compound annual growth rate (CAGR) of 30% from fiscal 2024 to fiscal 2029. That long-term outlook is ambitious, but a lot of growth has been baked into its stock, which is priced 22 times this year's sales.

Snowflake's adjusted operating margins have been expanding, but it remains deeply unprofitable on a generally accepted accounting principles (GAAP) basis. All of that red ink -- along with its slowing growth and frothy valuation -- made it an easy target for the bears as interest rates rose over the past two years.

Oracle became an attractive safe-haven stock

Oracle is growing a lot slower than Snowflake. Its revenue only rose 4% in fiscal 2021 (ended in May 2021), climbed 5% in fiscal 2022, and increased 7% on an organic basis (excluding its acquisition of the healthcare giant Cerner) in fiscal 2023. But it's also firmly profitable, has generated plenty of cash, and has consistently bought back its shares.

Most of Oracle's recent growth has been driven by its cloud-based software and infrastructure services, which accounted for 37% of its top line in its latest quarter. Its cloud growth has decelerated amid the macro headwinds over the past year, but it's still offsetting the slower expansion of its legacy on-site hardware and software businesses.

Oracle's operating margins also continue to widen as it scales up its cloud segment, streamlines Cerner's lower-margin business, and executes other cost-cutting measures. At the end of the second quarter of fiscal 2024, its trailing-12-month free cash flow (FCF) had risen 20% year over year to $10.1 billion. That robust cash flow growth enabled it to buy back $600 million in shares in the first half of fiscal 2024 while paying out $2.2 billion in dividends.

Analysts expect Oracle's revenue and adjusted EPS to both increase 8% this year. Its stock still seems reasonably valued at 18 times forward earnings and it pays a decent forward yield of 1.4%. Oracle probably won't impress growth, value, or income investors anytime soon, but its stability has made it an appealing safe-haven stock as rising interest rates rattled the market. That's probably why it outperformed Snowflake over the past three years.

The better buy: Oracle

Snowflake is still growing, but its high valuation could limit its gains over the next few years. Oracle's growth rates are less impressive, but it should remain the better investment as long as interest rates stay high in this tough macro environment.