Shares of C3.ai (AI 3.02%) and Nvidia (NVDA 6.18%) have set the stock market on fire in 2023 thanks to the skyrocketing interest in artificial intelligence (AI), which could significantly accelerate the growth of both companies.

While C3.ai's stock price has surged nearly 235% so far this year, Nvidia has also posted an impressive gain of 186%. However, a closer look at these companies will tell us that even though AI is turning out to be a common catalyst for them, this technology is going to drive their businesses in different ways. C3.ai, for instance, is a pure-play AI enterprise software provider. Nvidia, on the other hand, is primarily a hardware-focused company.

So, if you had to choose one of these two AI stocks for your portfolio, which one should you opt for? Let's find out.

The case for C3.ai

C3.ai is a provider of enterprise AI software. This puts the company in a fast-growing niche, as the AI-specific software market is forecast to clock 31% annual growth through 2026 and hit nearly $193 billion in revenue, according to market research firm IDC.

However, C3.ai's decision to change its business model means that it is not able to take advantage of this hot market right now. The company's revenue in the recently concluded fiscal 2023 year (which ended on April 30) was up just 6% over the prior year to $267 million. That was a big slowdown compared to fiscal 2022's revenue growth of 38%.

So C3.ai's share-price surge in 2023 is purely driven by the company's potential in the enterprise AI software market because its growth has slowed down remarkably. However, it is worth noting that C3.ai's slowdown is temporary, as the company is in the midst of transitioning its business model from a subscription-driven model to a consumption-based one.

A consumption-based model means that C3.ai's customers only pay for the solutions they use. A subscription model would have locked those clients into contracts for a certain length of time and generated revenue for C3.ai, irrespective of the usage of the company's offerings. So, a subscription model would have given C3.ai better revenue visibility.

But the consumption model has its own advantages, too. It allows the company to quickly secure customer agreements because it removes the need for protracted negotiations. This explains why C3.ai landed 43 agreements in the fourth quarter of fiscal 2023 (ended April 30, 2023), a nice jump of 59% over the prior-year period. Additionally, the company's qualified sales pipeline has also grown by more than 100% in the past 12 months.

Considering that C3.ai is currently in the early phases of its business model transition, which is expected to be complete only after a year, the company's growth is likely to step on the gas from fiscal 2025. C3.ai's revenue guidance of $295 million to $320 million for the ongoing fiscal 2024 year would translate into a year-over-year increase of 11%-20%, suggesting that the company is likely to gain some momentum. Analysts expect even better growth from C3.ai over the next couple of fiscal years.

AI Revenue Estimates for Current Fiscal Year Chart

AI Revenue Estimates for Current Fiscal Year data by YCharts

So C3.ai could prove to be a good bet for investors looking to take advantage of the software side of AI.

The case for Nvidia

Unlike C3.ai, Nvidia is already on track to deliver eye-popping growth. That's because the company's hardware is critical for training AI models and inferencing. The immense parallel computing power of its graphics cards allows companies to train AI models quickly, which explains why there is a queue to buy Nvidia's graphics cards right now.

More importantly, the demand is about to translate into impressive growth in Nvidia's revenue and earnings. Its revenue is expected to surge 64% year over year in the current quarter to $11 billion, while analysts expect the company's earnings to jump fourfold to $2.05 per share. Nvidia is expected to maintain such outstanding levels of growth in the current fiscal year and beyond. That's not surprising for a couple of reasons.

First, the demand for graphics cards is blowing up thanks to AI applications. The popular chatbot ChatGPT, for instance, was reportedly trained using more than 30,000 Nvidia graphics processing units (GPUs).

With the demand for generative AI software such as chatbots expected to grow 10 times in the next five years, the need for GPUs capable of training AI models should continue to remain strong. This explains why the market for AI chips is expected to clock a compound annual growth rate of 40% through the end of the decade and close in on $230 billion in annual revenue.

Second, Nvidia is on pole position to capitalize on this massive opportunity. The company already controls a nice chunk of the AI chip market, with analysts putting its estimated share between 80% and 95%. Additionally, it is focused on maintaining its solid share with the introduction of server processors, which will create a whole new revenue opportunity.

Moreover, Nvidia has turned its focus toward the software side of the AI market with its latest partnership. The company's diversification will allow it to move beyond just AI hardware and open a new dimension that could power its long-term growth. This aspect further differentiates Nvidia from C3.ai because the latter is a software-based AI play, while the former can operate in both areas.

The verdict

It is evident that Nvidia is already capitalizing on the AI opportunity while C3.ai is yet to start doing so. However, buying Nvidia stock right now is an expensive affair: It is trading at 41 times sales. That's way higher than C3.ai's price-to-sales ratio of 15. Of course, Nvidia's expensive valuation seems justified given its faster growth, but C3.ai's long-term potential in the enterprise AI software market also seems promising.

That's why investors who are looking for a slightly cheaper AI stock may lean toward C3.ai, though they will have to wait for the company's growth to hit a higher gear. However, those who are willing to pay a premium can take advantage of Nvidia's dominant position in the AI hardware space, as well as the company's moves into the software side of this technology.