C3.ai (AI -0.87%) and DigitalOcean (DOCN 0.27%) are two companies that could benefit from massively influential, far-reaching technology trends. While C3.ai is seeing positive catalysts tied to surging interest in artificial intelligence (AI) software and services, DigitalOcean is poised to enjoy continued tailwinds from growing demand for cloud infrastructure services.

Which of these tech companies will ultimately go on to deliver better returns for shareholders? Read on to see why two Motley Fool contributors disagree on which stock is the better buy at today's prices.

C3.ai is capitalizing on the popularity of AI

Parkev Tatevosian: C3.ai is one of the most explosive growth stocks in the market today. The company increased its revenue from $157 million to $253 million between 2020 and 2022. C3.ai offers enterprises artificial-intelligence software and is in the process of rolling out new AI-powered features and capabilities this spring. Given AI's popularity in the markets today, launching that service might be a catalyst that lifts the stock higher.

Already, C3.ai is testing this service with two of its closest clients: Baker Hughes (NASDAQ: BKR) and Koch Industries. Baker Hughes made up 43% of C3.ai's revenue in its most recent quarter. The relationship between the two businesses has some analysts concerned about the accounting of sales. Short seller Kerrisdale Capital recently questioned some of C3.ai's financial reporting. The software-and-services provider responded by noting its accounting practices are not out of the ordinary in the software industry. Admittedly, relying on one customer for such a significant revenue share adds risk to the business.

Overall, C3.ai has an above-average risk compared to the markets overall. The company has lost money on the bottom line for 10 consecutive years. Investors cannot reasonably expect for C3.ai to turn a profit anytime soon. That said, if you're an investor who can tolerate high risk, C3.ai could provide explosive returns.

DigitalOcean has huge growth opportunities

Keith Noonan: Amazon, Microsoft, and Alphabet dominate the cloud infrastructure market, but there's still room for smaller, specialized players to find success. DigitalOcean's cloud offerings are tailored to small development teams, start-ups, and small and medium-sized businesses. It's providing services and pricing models that can offer greater flexibility for customers in these categories.

While enterprise operations have already embraced the migration to the cloud, plenty of smaller businesses are in much earlier stages of this transition. DigitalOcean's business model and product suite set it up to attract and grow with young companies as they scale -- potentially leading to huge, expanding relationships over time.

DigitalOcean is also serving up solid sales growth, is profitable on an adjusted basis, and has been increasing free cash flow rapidly. The company grew revenue 34% last year to reach $576.3 million, adjusted earnings grew 154% to reach $0.94 per share, and free cash flow more than tripled to reach $77.8 million.

DOCN PS Ratio (Forward) Chart

DOCN PS Ratio (Forward) data by YCharts

While breakthroughs in generative AI tech could ultimately help C3.ai post explosive stock performance, there's currently limited visibility on that front. I believe DigitalOcean offers a more attractive valuation profile.

While the cloud infrastructure provider has a growth-dependent valuation, its forward price-to-earnings ratio of approximately 20 looks reasonable in the context of momentum for its business and the massive long-term growth opportunity still ahead. DigitalOcean is already showing it can grow adjusted earnings effectively while scaling revenue, and its forward price-to-sales (P/S) ratio of 4.8 looks more reasonable than C3.ai's forward P/S multiple of 9.5.

So which stock is the better buy?

Both C3.ai and DigitalOcean have some strong future performance already priced into their valuations, but C3.ai's more speculative business outlook makes it the riskier of the two. On the other hand, the business's upcoming generative AI projects may help power sales and earnings growth, far exceeding the market's current expectations, and deliver explosive stock performance. 

For investors seeking balanced risk-reward profiles, DigitalOcean is likely the better buy because it's already serving up strong sales and earnings growth and has clear avenues to long-term expansion in its corner of the cloud infrastructure market. But for investors willing to take on extra risk in pursuit of potential homerun performance, C3.ai stock could make for a better portfolio fit.