Amid the ongoing artificial intelligence (AI) boom, shares of Nvidia (NVDA 0.25%) and Super Micro Computer (SMCI -1.42%) have set the stock market on fire in 2024, racking up gains of 166% and 197%, respectively, as of this writing. Thanks to the booming demand for the AI-enabling hardware they sell, they have experienced stunning accelerations in their revenue and earnings growth. 

Nvidia's dominance in the AI chip market has translated into phenomenal growth, and Super Micro Computer isn't far behind. Data center operators are flocking to its modular server solutions to mount the AI chips that Nvidia and other companies sell. However, if you are looking to add an AI stock to your portfolio and want to choose between one of these two, which one should you be buying right now?

The case for Nvidia

Nvidia reportedly controlled a whopping 94% of the AI chip market at the end of 2023. The company's results for the first quarter of its fiscal 2025 (which ended on April 28) suggest that its dominance has it on course for another year of terrific growth.

Revenue rose a stunning 262% year over year to $26 billion. Its impressive pricing power led to a 461% surge in adjusted earnings to $6.12 per share. Management's revenue guidance of $28 billion for the current quarter suggests that its top line is on track to jump 107% year over year, which would be an acceleration from the 101% growth it delivered in the same period last year.

However, emerging growth avenues in the nascent AI market indicate that Nvidia could end up doing even better than that. For instance, governments across the globe are reportedly pouring huge amounts of money into AI infrastructure, and sovereign investments in AI technology are expected to contribute $10 billion to Nvidia's top line this fiscal year, as compared to nothing in the previous one.

More specifically, governments are looking to make large language models (LLMs) in local languages based on country-specific data. On Nvidia's May conference call, management pointed out that Japan, France, Italy, and Singapore are already investing in AI infrastructure. It expects more countries to join the bandwagon. "The importance of AI has caught the attention of every nation," said CFO Colette Kress.

Saudi Arabia, for instance, is reportedly looking to invest $40 billion in AI initiatives, while China's AI-focused spending is forecast to exceed $38 billion by 2027. Meanwhile, key Indian companies such as Tata Group and Reliance Industries are relying on Nvidia's chips to train LLMs.

In short, Nvidia's customer base is diversifying beyond the major cloud infrastructure providers that have been deploying its chips in large numbers to train and deploy AI models. Spending on AI chips is expected to grow more than 10-fold over the next decade, generating $341 billion in revenue in 2033 compared to $23 billion last year. The stage seems set for Nvidia to maintain its tremendous growth as it takes solid steps to ensure that it remains the dominant player in this space.

That's why analysts forecast that the company's top line will keep growing at a healthy pace from fiscal 2024's reading of nearly $61 billion.

NVDA Revenue Estimates for Current Fiscal Year Chart

NVDA Revenue Estimates for Current Fiscal Year data by YCharts.

So, Nvidia should remain a top AI stock as the race to develop AI applications by companies and governments alike has created a secular growth opportunity.

The case for Super Micro Computer

Supermicro's growth is entwined to some extent with that of Nvidia. Data center operators require server rack solutions of the type that Supermicro sells to mount the processors sold by Nvidia and other chipmakers. So, it is not surprising that demand for Supermicro's servers has simply taken off.

In its fiscal 2024 third quarter, which ended March 31, its revenue jumped 200% year over year. Non-GAAP net income per share, meanwhile, jumped by a whopping 307%. So, Supermicro isn't all that far behind Nvidia when it comes to how AI has supercharged its fortunes. The company is guiding for revenue of $14.9 billion in the current fiscal year, which ends this month. This would be a big jump over the $7.1 billion in revenue it reported in its fiscal 2023.

More importantly, analysts are expecting its top line to nearly double over the next couple of fiscal years.

SMCI Revenue Estimates for Current Fiscal Year Chart

SMCI Revenue Estimates for Current Fiscal Year data by YCharts.

The good part is that Supermicro can sustain a healthy pace of growth beyond the next couple of fiscal years. That's because the demand for AI servers is expected to expand at a compound annual rate of 25% through 2029. The market is expected to generate annual revenue of almost $73 billion after five years, up from $17.5 billion in 2022.

Supermicro is growing at a faster pace than the AI server market right now. As it turns out, its growth is faster than that of more established companies such as Dell Technologies, which has sold $3 billion worth of AI servers in the past three quarters. Supermicro generated $9.6 billion in revenue in the past three quarters and gets more than half its revenue from selling AI-related server solutions.

Supermicro has been able to make a dent in the AI server market despite the presence of bigger players. Also, with the moves that the company has been making to increase its production-utilization rate and its manufacturing capacity, it could corner a bigger share of the AI server market in the future.

Like Nvidia, even Supermicro looks like a solid long-term AI play. But is it worth buying over Nvidia?

The verdict

Both Nvidia and Supermicro are high-growth companies benefiting big time from the proliferation of AI. So investors' choice about which stock they may want to buy right now is going to boil down to the valuation. Supermicro is substantially cheaper than Nvidia as far as their earnings and sales multiples are concerned.

SMCI PE Ratio Chart

SMCI PE Ratio data by YCharts.

However, in terms of the price/earnings-to-growth (PEG) ratio, the story is a bit more interesting. That metric is a forward-looking valuation determined by dividing a company's trailing earnings multiple by the earnings growth that it is expected to deliver over a future period. Any (positive) PEG ratio below 1 is viewed by most investors as indicating a bargain stock. And on that metric, both Nvidia and Supermicro are undervalued.

SMCI PEG Ratio Chart

SMCI PEG Ratio data by YCharts.

So by at least one forward-looking measure, both Nvidia and Supermicro are attractive buys right now for anyone looking to add a growth stock to their portfolios. More importantly, both these companies seem capable of delivering the outstanding growth that the market expects from them, thanks to the lucrative opportunities they are sitting on. And that's why investors can consider buying either stock, despite the terrific gains they have clocked so far this year.