Artificial intelligence (AI) could add trillions to the global economy in the decades ahead. The United Nations Conference on Trade and Development has estimated the AI market could reach $4.8 trillion by 2033.

There are many companies, from small-cap to large-cap, that profit off AI, but all you really need to do is just stick with the most dominant tech companies. The biggest and most profitable companies are the ones that are driving the adoption of AI and delivering superior returns to shareholders in the process. Here are two top AI stocks to buy now.

Nvidia headquarters.

Image source: Nvidia.

1. Nvidia

Nvidia (NVDA -0.31%) is the AI stock to consider buying first. It dominates the data center market, where all the AI magic happens. All the leading cloud service providers are training AI models using Nvidia's chips.

It's for these reasons that Nvidia is currently the most valuable company in the world with a $4.4 trillion market cap. Some investors may believe it's too late to make money from this highly valued stock, but all you have to do is look at Nvidia's stellar growth. Its net profit grew 63% year over year on a trailing-12-month basis to reach $86 billion, and Wall Street analysts are forecasting 23% annualized growth in the company's profit over the next five years.

Nvidia continues to expand relationships with leading tech companies to solidify its competitive position in the AI chip market. It is working with Oracle on a new high-performance computing cluster that will deliver up to 16 zettaflops of peak AI compute performance.

Some investors are concerned about competition from other chip companies like Broadcom and Advanced Micro Devices. But there are many use cases for AI, which is driving demand for all these companies. More chips will be needed as more data centers get built, not to mention as new applications for AI emerge in the future. This is why Broadcom, AMD, and Nvidia are all reporting strong growth right now.

Nvidia expects spending on data centers to reach up to $4 trillion by 2030. This means if it continues to dominate the market for data center chips, which are estimated to comprise about half of data center spending, Nvidia is going to grow into a much more valuable company in five years. Amazingly, investors can still buy shares of Nvidia at a lower forward (1-year) price-to-earnings (P/E) multiple than Walmart, suggesting the stock is undervalued.

A Google sign hanging from the jaws of a dinosaur skeleton.

Image source: Alphabet.

2. Alphabet (Google)

Alphabet's (GOOG 1.29%) (GOOGL 1.24%) Google is one of the most widely used and valuable consumer brands in the world. There are over 2 billion people who use Search, Gmail, Maps, YouTube, and other Google services every day. Google also operates one of the leading enterprise cloud services. This puts the company in a strong position to monetize its AI technology.

Alphabet stock has soared over the last decade and currently has a market cap of $3 trillion. This valuation is supported by its highly profitable advertising revenue, which comprises 74% of the business. Over the last year, it generated $115 billion in net profit on $371 billion of revenue.

Google Gemini has emerged as one of the most sophisticated AI models available. It is the brain behind all the AI features across the company's consumer and enterprise services. New features like AI Overviews are leading to increased usage in Google Search, which contributed to a strong year-over-year increase in Search revenue last quarter.

Beyond AI models, Alphabet has spent years investing billions in infrastructure, including data centers and Tensor Processing Units (TPUs), which is Google's proprietary AI chip. Google Cloud also offers the latest chips from Nvidia to give customers the greatest flexibility depending on what they need. This gives the company a structural advantage in delivering cutting-edge AI services for both consumers and enterprises.

With the company growing revenues and earnings at double-digit rates, Alphabet is showing how well it can monetize its investments in AI. Analysts expect the company's earnings to grow at an annualized rate of 15% in the coming years. Given this growth potential, investors are getting solid value with the stock trading at a forward (1-year) P/E of 24.