Confluent (CFLT 2.98%) and Hubspot (HUBS -0.78%) are both cloud-based software companies that have been upgrading their platforms with artificial intelligence (AI) features.

Confluent's platform processes "data in motion" as it flows between an organization's different applications and services, and it recently rolled out new tools to analyze data streams from AI applications. Hubspot has been embedding new AI tools across its entire ecosystem of cloud-based customer relationship management (CRM), marketing, analytics, and data visualization services.

Yet, neither stock has gained as much attention from the bulls as Nvidia, Microsoft (MSFT 1.82%), or other top AI stocks. Instead, Confluent's stock plunged nearly 80% over the past two years as Hubspot's stock dropped more than 40%. Let's see if either of these out-of-favor cloud stocks is worth buying today.

A person uses a tablet computer outside.

Image source: Getty Images.

Confluent is bracing for a near-term slowdown

Confluent's eponymous platform is built on Apache Kafka, an open-source data streaming platform that was originally created to process data for LinkedIn. Kafka's creators subsequently founded Confluent as a streamlined way to offer Kafka's data streaming tools as cloud-based services to other companies.

From 2019 to 2022, Confluent's revenue rose at a compound annual growth rate (CAGR) of 58%, while its total number of larger customers, who generate $100,000-plus in annual recurring revenue (ARR), nearly tripled from 337 to 991.

But in 2023, Confluent expects its revenue to rise only 31% as the macro headwinds force companies to rein in their cloud-based spending. On the bright side, it expects its adjusted operating margin to turn positive in the fourth quarter of the year and come in at just negative 9% for the full year -- compared to negative 30% in 2022. Analysts also expect the company to turn profitable on an adjusted basis in 2024.

Confluent's margins are expanding because it laid off about 8% of its staff this year and continues to tighten its spending to cope with its near-term slowdown. It also ended its latest quarter with a gross retention rate of more than 90% and retains a first mover's advantage in the Kafka-as-a-service market. Its introduction of new AI-oriented data streaming services could lock in its existing customers and widen its competitive moat.

However, Confluent still needs to deal with smaller competitors like Cloudera and tech giants like Amazon, Microsoft, and IBM -- which have all been integrating Kafka-based data streaming services into their own cloud platforms. That intense competition could reduce Confluent's pricing power and squeeze its gross margins.

Hubspot faces similar headwinds

Hubspot's free cloud-based CRM platform attracts smaller businesses that don't need larger enterprise-oriented CRM platforms like Salesforce (CRM 0.42%) or Microsoft Dynamics. Once it locks in those customers, it cross-sells additional marketing, lead generation, search engine optimization, and analytics services. It specializes in "inbound" marketing campaigns like social media campaigns, viral videos, or blogs that drive consumers to seek out brands on their own.

From 2017 to 2022, Hubspot's annual revenue grew at a CAGR of 36% as it more than quadrupled its number of customers from 41,593 to 167,386. But for 2023, it expects only 24% growth as it faces tougher macro headwinds.

Just like Confluent, Hubspot laid off about 7% of its workforce and reined in its spending over the past year as its top-line growth cooled off. As a result, it expects its adjusted operating margin to expand from 10% in 2022 to 15% in 2023 and for its adjusted EPS to more than double. It's also confident it can keep its net revenue retention rate -- which gauges its year-over-year growth per existing customer -- comfortably above 100% as it rolls out new AI tools to generate digital content, summarize calls and emails, assist customers with chatbots, and accelerate data analysis.

Hubspot's future looks bright, but it still faces plenty of competition in the CRM market. If larger competitors like Salesforce and Microsoft roll out simpler CRM services for smaller businesses, Hubspot could still lose its pricing power. Other cloud software giants like Adobe could also disrupt its sales and marketing platforms.

The valuations and verdict

Neither of these cloud stocks is a screaming bargain yet. Confluent trades at 104 times forward earnings, while Hubspot has a forward price-to-earnings ratio of 71. Therefore, I personally wouldn't rush to buy either of these stocks right now when so many other high-quality tech stocks are still on sale. But if I had to choose one, I'd pick Hubspot because its sales growth is more stable, its margins are healthier, it's profitable, and its stock seems a lot cheaper.