Cloudflare (NET 1.44%) has taken investors on a wild ride since its IPO in 2019. The content delivery network (CDN) provider went public at $15, and it hit an all-time high of $217.25 on Nov. 18, 2021, during the growth stock rally.

But today, Cloudflare's stock trades at about $108. It lost its luster as its revenue growth cooled off, it remained unprofitable on a generally accepted accounting principles (GAAP) basis, and rising interest rates compressed its valuation. Nevertheless, a $50,000 investment in its IPO would still be worth about $360,000 today.

A smartphone user holds a cardboard cutout of a cloud.

Image source: Getty Images.

That's an impressive return, but could Cloudflare head even higher in the future? Let's see if this volatile growth stock will reward patient investors by turning a fresh $50,000 investment into $1 million over the next two decades.

What does Cloudflare do?

Cloudflare's CDN accelerates the delivery of digital photos, videos, streaming media, and integrated apps for websites. It stores cached copies of that content on its edge servers, which are physically located closer to a website's visitors than its origin servers. It also shields those websites from bot-driven cyberattacks.

Cloudflare envisions itself as a "water filtration" system for the modern internet which will benefit from rising internet speeds and the growth of media-intensive websites. It also recently launched Workers AI, a development platform that enables developers to directly build AI apps on its edge networks so they can be accessed more quickly.

Cloudflare now serves data from 310 cities in over 120 countries, and it processes an average of 55 million HTTP requests every second. From 2020 to 2023, its number of large customers (who pay more than $100,000 annually) more than tripled from 828 to 2,756 as its revenue grew at a compound annual growth rate (CAGR) of 44%.

How fast is Cloudflare growing?

Cloudflare is still expanding, but its growth in revenue, large customers, and year-end dollar-based net retention rates (which gauge its year-over-year revenue growth per existing customer) have all cooled off over the past two years.

Metric 2020 2021 2022 2023
Revenue growth 50% 52% 49% 33%
Large customer growth 57% 71% 44% 35%
Dollar-based net retention rates 119% 125% 122% 115%

Data source: Cloudflare. 

It mainly attributed that slowdown to the macro headwinds, which drove companies to rein in their software spending, and it anticipates just 27% revenue growth in 2024. Analysts expect its revenue to rise 28% in 2024 and 29% in 2025.

Cloudflare is still growing faster than other CDN leaders like Akamai and Fastly, which are expected to grow their revenues by 8% and 15%, respectively, in 2024. It's also keeping pace with the broader CDN market, which Grand View Research projects will grow at a CAGR of 24% from 2023 to 2030.

Are economies of scale kicking in?

Cloudflare's revenue growth is slowing down, but its adjusted gross margins have stayed in the high 70s as it boosted its adjusted operating margins with cost-cutting measures.

Metric 2020 2021 2022 2023
Adjusted gross margin 77.6% 78.6% 78.2% 78.3%
Adjusted operating margin (7.9%) (1.1%) (3.7%) 9.4%

Data source: Cloudflare.

Cloudflare is still unprofitable on a GAAP basis, but it finally turned profitable on a non-GAAP basis in 2022. Its adjusted operating margin and adjusted free cash flow (FCF) margin also turned positive for the first time in 2023.

For 2024, it expects its adjusted operating margin to rise to a midpoint of 9.5% as its adjusted earnings per share (EPS) grows 18% to 20%. Analysts expect its adjusted EPS to grow 14% in 2024 and 36% in 2025.

That steady earnings growth suggests that it has plenty of pricing power and economies of scale are kicking in -- and that its GAAP profitability could improve once it reins in its stock-based compensation expenses.

The mathematical path to a million dollars

Cloudflare's stock isn't cheap now at 192 times forward earnings, but that multiple should decline as its profitability stabilizes. If it can grow its bottom line at a CAGR of 20% over the next 20 years, it could generate adjusted EPS of $20 by 2043.

Assuming its forward price-to-earnings cools off to a more reasonable ratio of 50, its stock could be trading at $1,000 per share in 20 years. That would turn a $50,000 investment into nearly $500,000.

Therefore, it doesn't seem likely that Cloudflare can generate millionaire-making gains on its own unless its earnings growth accelerates significantly or it convinces investors to pay a much higher premium for its shares. But that doesn't mean Cloudflare is a bad long-term investment. It's still a great play on the growth of the CDN and cybersecurity markets -- and it could rally much higher and generate millionaire-making gains with other stocks across a well-diversified portfolio.