While market sell-offs can be brutal, they also open up opportunities to purchase some stocks that were previously trading near uninvestable levels. According to Wall Street analysts, two companies that have come down to that point are Cloudflare (NET -1.12%) and Datadog (DDOG -2.36%).

On average, analysts see 57% upside for Cloudflare and 56% for Datadog. That's quite a turnaround in one year, but is it realistic? 

The businesses

First, it's helpful to understand what these two do. Both are rapidly growing tech companies whose valuations reached unsustainable levels in 2021, contributing to their significant decline. To be clear, the businesses are both performing admirably; it was the exuberance of 2021 that caused their terrible stock performance.

Cloudflare's product allows its clients to host websites on its servers, eliminating the need to purchase expensive networking equipment that can quickly become obsolete. Cloudflare's 275-plus data centers in cities worldwide also place the information closer to website users, making the website load incredibly fast. With more than 151,000 paying customers, Cloudflare has a large base of customers that are expanding their use quarterly.

As businesses deploy more cloud solutions, it's becoming harder for IT teams to monitor how all their software solutions function. Datadog's platform solves this issue through its cloud monitoring service, allowing users to see how data flows function and to solve problems quickly when they arise. Datadog's product is more niche than Cloudflare's, but it still has about 21,200 paying customers. 

Although many businesses are tightening their budgets to prepare for an economic downturn, both companies posted solid revenue growth in the second quarter:

Company YOY Revenue Growth
Cloudflare 54%
Datadog 74%

Data source: Cloudflare and Datadog. YOY: year-over-year.

These aren't small revenue streams, either; Cloudflare's and Datadog's second-quarter sales were $235 million and $406 million, respectively.

However, no matter how fast a business grows, there is always a reasonable price to pay for it. From a price-to-sales (P/S) standpoint, both companies were too expensive last year.

DDOG PS Ratio Chart

Data source: YCharts.

Even now, many would contend that 20 times sales is also too expensive. But the bigger picture for these companies is their prospects and growth, making the valuation more palatable.

The road ahead is bright

Both Cloudflare and Datadog operate in massive markets. Datadog believes its market could be $53 billion by 2025, and Cloudflare sees its total addressable market at $135 billion by 2024. While it's impossible for one company to capture an entire market completely, these two have a long way to go before they saturate their market opportunity.

And both companies are teetering on the brink of profitability. In the second quarter, Datadog had a mere $3.1 million in operating losses, and Cloudflare is projecting an operating profit for its full-year 2022. Unlike some tech companies that are laying off part of their workforce even to get remotely close to breaking even, these two are on the brink.

These two factors are significant reasons both stocks still command a premium price. Wall Street also expects these stocks to maintain their valuation; analysts forecast Cloudflare and Datadog to grow their revenues by 36% and 38%, respectively, in 2023. And there is likely further upside beyond that point.

I think both stocks are strong buys because of their massive opportunities, but investors must be committed to holding the stocks for at least three to five years. This will allow investors to wait out market downturns like the one we are in right now. For Datadog and Cloudflare, the best days are still ahead, and investors should take positions accordingly.