Internet infrastructure-solutions provider Cloudflare's (NET -2.11%) growth has been supercharged in recent quarters by the rapidly improving demand for its artificial intelligence (AI)-focused cloud infrastructure. This explains why the stock has shot up a remarkable 85% so far in 2025.
Investors, however, may be wondering if Cloudflare stock is worth buying anymore following its red-hot rally this year. Below, I'll take a closer look at its prospects and valuation to find out if it's a good idea to add this high-flying AI stock to your portfolio.

Image source: Getty Images
Analysts are expecting more upside from Cloudflare
Cloudflare's 12-month median price target of $230, as per 36 analysts covering the stock, suggests that more upside is in store for investors, even though the company's stock has appreciated significantly this year. The price target indicates it could rise another 16% in the coming year.
It's easy to see why analysts are upbeat about the stock's prospects. Cloudflare's growth rate is likely to improve as companies looking to develop and deploy AI applications are flocking toward it. That's because Cloudflare has deployed graphics processing units (GPUs) across its wide data center network that spans 330 cities spread across 125 countries.
Cloudflare's server-less GPU model enables its customers to run AI workloads in the cloud without the need to make large investments in hardware, and helps them save on infrastructure management costs, as well. This is the reason why the company's Workers AI platform is turning out to be a hit among customers.
Workers AI allows customers to run AI models such as Llama, Mistral, and Stable Diffusion, apart from running AI inference applications. Cloudflare points out that customers can run and deploy AI models closer to their locations, thanks to the company's extensive network, thereby reducing latency and improving performance. As a result, Workers AI isn't just helping Cloudflare attract new customers, but is also helping it win more business from existing customers.
Management cited several examples on the recent earnings conference call about how Workers AI is helping it sign bigger contracts. This led to a year-over-year expansion of 2 percentage points in its dollar-based net retention rate in Q2 to 114%. This metric compares the spending by Cloudflare's customers in a quarter to the spending by the same customer cohort in the same period last year. So its expansion indicates that it's winning a bigger share of its customers' wallets.
At the same time, Cloudflare's overall paying customer base increased by an impressive 26% year over year. This combination of higher spending by existing customers and the jump in its customer base led to a jump of 39% in its remaining performance obligations (RPO) to almost $2 billion at the end of Q2. Cloudflare's RPO growth exceeded its Q2 revenue jump of 28% by a big margin, indicating that it's winning more business than it's delivering.
This should translate into stronger growth for the company, which is precisely what analysts are expecting.
NET Earnings-Per-Share (EPS) Estimates for Current Fiscal Year data by YCharts.
What about the valuation?
The points discussed above tell us that Cloudflare is on track to deliver healthy earnings growth. That won't be surprising, as the company sees its total addressable market (TAM) hitting $231 billion by 2028, a jump of $50 billion from this year.
Cloudflare has generated just under $1.9 billion in revenue in the past 12 months, suggesting that it still has a lot of room for growth. Considering that it's been signing larger deals now, thanks to AI, as mentioned by CEO Matthew Prince in the recent earnings release, it can end up cornering a nice chunk of the TAM in the long run.
As such, Cloudflare seems to be in a position to justify its expensive valuation. The stock is currently trading at 35 times sales and 227 times forward earnings. Those are expensive multiples that are likely to keep value-oriented investors away from the stock. However, investors with a higher risk appetite who are willing to pay a premium valuation for a fast-growing AI stock can still consider buying Cloudflare.
After all, analysts are expecting the stock to jump higher in the coming year. It could indeed do that, thanks to its rapidly improving revenue pipeline, which is likely to lead to an acceleration in the company's earnings growth.