The tech sector has been under a lot of pressure this year as rising interest rates drove investors toward more-conservative sectors. But that sell-off has also created some rare buying opportunities for patient investors who can stomach the near-term volatility.

So today, I'll examine a trio of promising tech stocks that could still generate market-beating returns over the next few decades -- The Trade Desk (TTD -6.23%), Datadog (DDOG -1.32%), and Microsoft (MSFT -1.96%) -- and explain why they're worth buying today.

A smiling person wearing a crown unfolds a handful of cash.

Image source: Getty Images.

1. The Trade Desk

As the world's largest independent demand-side platform for digital ads, The Trade Desk enables ad agencies, advertisers, and trade desks to bid on programmatic ad inventories. In its latest quarter, it served more than 1,000 customers and maintained a retention rate of over 95%.

The Trade Desk serves ads for mobile, desktop, and connected TV (CTV) platforms, but it generates most of its growth from the CTV market -- which benefits from the secular expansion of streaming media services and the death of linear-TV platforms. Netflix's recent decision to launch a cheaper ad-supported tier also indicates paid streaming services will follow that trend.

Between fiscal 2016 and fiscal 2021, its revenue grew from $203 million to $1.2 billion, representing a compound annual growth rate (CAGR) of 43%. Its adjusted EBITDA (earnings before interest, taxes, depreciation, and amortization) increased at a CAGR of 50% and hit $503 million in 2021.

In fiscal 2022, analysts expect its revenue and adjusted EBITDA to increase 33% and 22%, respectively, even as macro headwinds curb the market's demand for digital ads. The Trade Desk isn't cheap at 36 times this year's adjusted EBITDA, but its robust growth rates and high exposure to the growing CTV advertising market should justify that higher valuation.

2. Datadog

Datadog's software platform enables companies to monitor all of their databases, servers, and apps in real time. It pulls that data onto unified dashboards, which makes it easier for IT professionals to diagnose problems.

Datadog has grown like a weed since its public debut in 2019. Between 2019 and 2021, its revenue grew from $363 million to $1.03 billion, representing a CAGR of 68%. It also turned profitable on a non-GAAP (generally accepted accounting principles) basis in 2020, and more than doubled its non-GAAP earnings per share (EPS) the following year.

Its number of customers that generated annual recurring revenue (ARR) of at least $100,000 jumped from 858 at the end of 2019 to 2,250 in the first quarter of 2022, as its dollar-based net retention rate (which gauges its growth per existing customer) surpassed 130% for 19 consecutive quarters.

Analysts expect that momentum to continue this year as its revenue and adjusted EPS rise 57% and 56%, respectively. Datadog's stock isn't cheap at 185 times forward earnings and 21 times this year's sales, but it's one of the few hyper-growth stocks I'd still recommend buying in this bear market.

3. Microsoft

Lastly, investors who think The Trade Desk and Datadog are too risky can simply buy Microsoft as an evergreen growth play. Under Satya Nadella, who took the helm as the tech giant's third CEO in 2014, Microsoft evolved into a cloud software giant and impressed growth-oriented investors again.

Between fiscal 2014 and fiscal 2021, which ended last June, Microsoft's commercial cloud revenue increased from 5% to 41% of its annual revenue. Its revenue also increased from $86.8 billion to $168.1 billion, representing a CAGR of 10%, as its EPS rose at a CAGR of 17%.

Today, Microsoft's Azure is the world's second-largest cloud infrastructure platform after Amazon Web Services (AWS), and it remains a compelling alternative for companies -- particularly retailers -- that don't want to tether themselves to Amazon's most profitable business division.

Microsoft's transformation of its Office desktop software into cloud-based services also prevented it from being disrupted by Alphabet's Google, and it continued to expand its hardware business with new devices and its Xbox gaming division with big acquisitions and new subscription-based services.

Analysts expect Microsoft's revenue and earnings to grow 18% and 16%, respectively, this year, as its cloud business continues to expand. Its stock still looks reasonably valued at 25 times forward earnings, and it could still have plenty of room to run over the next few decades.