Everybody's talking about artificial intelligence (AI) these days -- and for good reason. The technology has the potential to change the world, from improving safety in cars to bringing better drugs to market faster. AI also can make businesses more efficient, reducing costs and boosting earnings. Further, the AI market, expanding at a 21% compound annual growth rate, is set to reach more than $2 trillion by 2030, according to Fortune Business Insights.

So, it's no surprise companies are investing in this hot technology -- and investors are hoping to get in on tomorrow's AI winners today. Nvidia (NVDA 6.18%) and Amazon (AMZN 3.43%) recently have jumped into the AI spotlight, representing promising AI bets.

Nvidia makes the chips that power the technology, and Amazon uses AI to improve its operations and serve its customers. Their shares have climbed 218% and 62%, respectively, over the past year, but these market giants still have room to run. If you could pick up only one of these stocks today, which makes the better AI buy? Let's find out.

An investor studies a laptop in a darkened office.

Image source: Getty Images.

The case for Nvidia

Nvidia's graphics processing units (GPUs) have long powered the worlds of gaming and graphics. But these chips' ability to divide work among processors and carry out several tasks at the same time -- leading to tremendous speed -- soon launched them into a broad range of applications across industries. And one of those areas is AI.

Thanks to Nvidia's top chip performance, the company holds more than 80% of the AI chip market, according to analysts. Sure, rivals -- such as Advanced Micro Devices (AMD) -- exist. But Nvidia could stay ahead for several reasons. The company already is a leader, so satisfied customers may not be eager to switch to another chipmaker. We've seen this trend already among chip customers in the world of central processing units -- AMD has been unable to unseat Intel over the years.

Finally, Nvidia isn't resting on its laurels and instead significantly invests in research and development (R&D) to stay ahead of the competition and continue innovating. In the most recent quarter (period ended Oct. 29), Nvidia's  R&D spending increased 18% to more than $2.2 billion. At the same time, the company's operating income outpaced operating expenses, and net income surged more than 1,000% year over year. So Nvidia can afford to continue investing to stay on top while delivering earnings growth.

The case for Amazon

Amazon has invested in AI for its own use and to serve its customers. The e-commerce giant uses AI to streamline operations at its fulfillment centers and to design the most efficient delivery routes for packages, for example. These and other ways of using AI help Amazon reduce costs, therefore boosting earnings.

The e-commerce business also uses AI to help a customer find the right item by generating suggestions based on what they've bought in the past -- that could keep them coming back, again adding to Amazon's earnings potential.

AI also is a big part of Amazon Web Services (AWS), the company's cloud computing business. AWS offers various AI tools to clients so they don't have to build from the ground up or manage infrastructure.

Amazon has made itself present in every layer of AI. It's created chips, such as the Trainium, to train large language models (LLM). It's launched an LLM service, Amazon Bedrock, which features top foundation models that customers can customize for their own use. And AWS offers applications that run the LLMs such as Code Whisperer, a coding assistant for developers.

In Amazon's most recent earnings call, the company said generative AI remains a priority for AWS customers -- and AWS, as the cloud market leader, is in the perfect position to benefit.

Nvidia or Amazon?

Nvidia and Amazon both are set for success in the world of AI. Both companies also are profitable and have a solid track record of revenue growth.

NVDA Revenue (Annual) Chart

NVDA Revenue (Annual) data by YCharts

But if I had to choose the biggest AI winner, I would go for Nvidia. That's because the company dominates in a key area: It powers AI training, the "deep learning" that will give those AI models the ability to perform. Nvidia is an expert in GPUs, already is a step ahead of rivals, and has the financial situation to invest in R&D to maintain its leadership.

Today, Nvidia trades for 50x forward earnings estimates, compared to 43x for Amazon, but the tech giant is worth the premium -- making it the top AI stock to buy right now.