Two of the hottest artificial intelligence (AI) stocks in 2024 were, no doubt, Palantir (PLTR 1.98%) and Nvidia (NVDA -0.33%). However, after posting huge gains last year, both stocks now find themselves well off their highs following the recent market pullback.
Let's look at which stock is the better investment option for investors right now.
Two AI winners
Palantir and Nvidia have two very different businesses, but both have been big AI winners.
Nvidia is a semiconductor company that makes graphic processing units (GPUs). Its chips have become the backbone of AI infrastructure due to their fast processing speeds, which have proven ideal for training AI models and running inference. The company has created a wide moat through its CUDA software platform, which it developed way back in 2006 to allow its chips to be programmed for various purposes. Today, it has built on top of this program to have leading libraries and services designed for AI, which makes its chips so desirable.
NASDAQ: NVDA
Key Data Points
Palantir, on the other hand, is a software analytics company. It initially made a name for itself in the government space, where its data gathering and analytics capabilities were used for mission-critical tasks such as fighting terrorism. However, with the advent of its AI platform, it has transformed into an AI operating system company that helps customers design and deploy AI solutions for various use cases.
Both companies have been seeing strong growth. Nvidia's revenue has more than doubled each of the past two years as large tech companies and AI start-ups race to build out AI infrastructure. Spending for AI infrastructure continues to rise, led by the big three cloud computing companies, which combined plan to spend a whopping $250 billion on capital expenditures (capex) this year related to building out their AI infrastructure. For its part, Nvidia has predicted that overall data center-related capex will rise to over $1 trillion by 2028.
Palantir, meanwhile, has seen accelerating growth as commercial customers flock to its AI platform and the federal government starts to embrace AI. Overall revenue growth climbed 36% last quarter, while U.S. commercial revenue soared 64%, and U.S. government revenue jumped 45%. Its customer count has grown 43% as the company attracts new commercial customers through its AI bootcamps.
Thus far, many of its commercial customers are still in the proof-of-concept phase. So, Palantir has a big opportunity as it moves these customers' solutions into production to tackle real-world problems.
Risks
When it comes to risks, the biggest for Nvidia is a slowdown in AI infrastructure spending. The company's CUDA software platform is free, so it doesn't have a big recurring revenue stream. Instead, it must sell more and more chips to continue to grow.
While AI infrastructure spending is still on the rise, there are some concerns that the pace of this spending will eventually slow. It has been reported that Microsoft, which is Nvidia's largest customer, has pulled back on some data center projects, as it thinks there could be an overcapacity of supply versus demand. However, analysts at TD Cowen have noted that cloud computing rivals Alphabet and Amazon have stepped in to backfill this capacity.
As long as companies continue to race to build out better AI models, they will need more computing power, which tends to be supplied by GPUs. In fact, as models have advanced, they have tended to need exponentially more AI chips to be trained on. For example, the newest models from both Meta Platforms and xAI have been trained on about 10 times as many GPUs as their prior versions.
Palantir, meanwhile, faces a potential risk related to the current budget cuts from the U.S. government, which is its largest customer, accounting for more than 40% of its revenue last year. The company is particularly tied to the Department of Defense (DOD) and military-related spending. As part of Department of Government Efficiency (DOGE), the Trump administration has asked the DOD to reduce its budget by 8% annually over the next five years.
NASDAQ: PLTR
Key Data Points
That's a huge cut to the DOD's budget, which will impact a lot of programs. How much or how little it impacts Palantir or its growth opportunities is still unknown. Palantir CEO Alex Karp has publicly stated that he supports DOGE and has hinted that the company could benefit. However, he and other company insiders have also been dumping Palantir stock. Still, it is certainly possible that if Palantir's AI platform can show that it improves efficiency and helps lower costs, it could be a DOGE winner.

Image source: Getty Images.
Valuations
One of the big differences between Nvidia's and Palantir's stocks is their valuations. Nvidia's shares are quite cheap, with the stock trading at a forward price-to-earnings (P/E) ratio of around 24 times based on this year's analyst estimates, with a price/earnings-to-growth (PEG) ratio of just over 0.4. Stocks with PEG ratios below 1 are typically considered undervalued, making Nvidia a nice bargain according to this metric.
Palantir's stock, on the other hand, is quite expensive. The stock trades at a forward price-to-sales (P/S) multiple of 53, which is more than double the peak multiples that software-as-a-service (SaaS) stocks traded at in 2021 with similar growth rates. Note that with Nvidia's stock, we are looking at its valuation based on earnings, while with Palantir's stock, we are looking at its valuation based on revenue, so the difference is pretty huge.
Given their recurring revenue models, software companies should trade at much higher valuations than semiconductor companies. However, the valuation difference between the two companies is still quite stark. Both companies have potential growth drivers and potential risks. As such, I prefer Nvidia at the moment, which is just the much bigger bargain if AI infrastructure spending continues to grow.