Artificial intelligence (AI) is in everything from voice-enabled smart speakers to smartwatches to computers, and even our cars. But while AI has gone mainstream, not all artificial intelligence companies are benefiting equally.

Investors looking for the top AI stocks to buy right now should consider NVIDIA (NASDAQ:NVDA), Amazon (NASDAQ:AMZN), and Microsoft (NASDAQ:MSFT). Here's why.

A microchip with the letters "AI" on it.

Image source: Getty Images.

1. NVIDIA

You might know NVIDIA as a leading graphics processing unit (GPU) company that has benefited immensely from the gaming market. 

The company is indeed a gaming GPU powerhouse, with revenue from its gaming GPU segment spiking 67% in the most recent quarter, accounting for 50% of the company's top line in the quarter. 

But NVIDIA is a leading artificial intelligence player as well. The company uses its GPUs to help power data centers, which are increasingly focused on artificial intelligence. The company's GPUs allow data centers to process information like voice and image recognition, allowing for more effective cloud-based AI services.

NVIDIA's data center sales skyrocketed 97% in the fourth quarter, and now account for 38% of the company's total revenue. That's impressive, especially considering that just two years ago data center sales made up less than 30% of NVIDIA's revenue. 

And then there's NVIDIA's pending purchase of Arm Holdings. The company says it will use its existing AI platform and combine it with Arm's CPU designs, which NVIDIA CEO Jensen Huang says "will create a company fabulously positioned for the age of AI." The deal hasn't closed yet, and it still faces a few hurdles, but even if it fell through NVIDIA's data center AI opportunity is more than enough to keep the company growing.

Investors looking for an AI stock that's already benefiting from this growing market and is in the perfect position to continue doing so for many more years would be wise to take a closer look at NVIDIA. 

A woman holding computer server wires.

Image source: Getty Images.

2. Amazon 

Amazon may not be the first company you think of when you're compiling a list of artificial intelligence stocks, but the company is doing far more in this space than you might realize. 

For starters, Amazon has experimented with state-of-the-art AI in its Amazon Go and Amazon Fresh grocery stores, which use image recognition to keep track of what users are picking up -- and what they walk out of the store with -- and then automatically charge them for it. 

And then there are the company's popular Echo smart speakers, which use Amazon's voice-recognition assistant, Alexa. The virtual assistant has become so popular that it's now embedded in third-party devices and is one of the leading smart home virtual assistants. 

But what really makes Amazon an artificial intelligence stock is the company's leading position in the cloud computing market. Amazon Web Services (AWS) helps companies set up chatbots, use image and video analysis, set up text-to-speech features, forecast product demand, and much more.

AWS holds 32% of the cloud computing infrastructure market, and it's one of Amazon's most lucrative businesses. The company earned $4.2 billion in operating income from AWS in the first quarter, more than the $3.5 billion in operating income from its North American e-commerce business.

For an AI play that's also dominating the cloud computing market, there's likely no better bet than Amazon. 

A man using a computer.

Image source: Getty Images.

3. Microsoft 

Last but certainly not least is Microsoft. Sure, smaller, faster-growing tech companies are betting on AI, but don't underestimate Microsoft's growing position in the space.

Microsoft's Azure is the second-largest cloud computing service behind AWS, and is benefiting from the increased demand for cloud-based AI services just like Amazon is. Azure's growth over the past few years has helped make Microsoft a major AI player -- and so will the company's latest purchase. 

Just last month Microsoft announced that it was purchasing Nuance Communications for $20 billion. The company focuses on voice recognition and AI healthcare technologies, including voice transcription and patient engagement. Microsoft says the purchase will fit nicely into its company's Intelligent Cloud business. Nuance's AI services -- like its popular Dragon speech software -- are used by companies around the world, and its AI-based healthcare tech is used by 77% of U.S. hospitals. 

The purchase of Nuance will nearly double Microsoft's total addressable market in healthcare to $500 billion, and give the company even more artificial intelligence tools.

For investors looking for an established technology company that's making all the right moves when it comes to cloud-based AI, Microsoft won't disappoint. 

Play the long game with AI

Buying these tech stocks doesn't guarantee immediate success in the market, of course. Artificial intelligence is already gaining traction in a lot of technologies, but investors need to remember to play the long game with these stocks -- especially as, according to IDC estimates, the current $327 billion global artificial intelligence market could grow into a $554 billion business over the next few years.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.