Any stock associated with artificial intelligence (AI) has had quite a run in the last few years. Take Nvidia (NVDA 2.83%), which is up more than 1,000% and now sports one of the largest market caps in the world. Frankly, almost every big tech stock is benefiting from the AI boom, leading to monster returns in 2024. The big question is, though, will this party continue in 2025?

The hard truth? It doesn't matter whether a stock is considered an "AI stock" or not. What matters is the stock's valuation, its potential for growth, and the downside risk of buying shares today. Three different stocks in C3.ai (AI 2.67%), Nvidia, and Amazon (AMZN 2.08%) illustrate the wide range of AI stocks you can buy right now. Here's why you shouldn't ask whether 2025 is a good year to buy "AI stocks" but instead look at each of these companies individually and decide for yourself whether you want to own them in your portfolio.

High-risk AI stock: C3.ai

A popular AI stock that literally has the ticker "AI" is C3.ai. The enterprise software seller has seen its stock zoom up and down in the last few years. At the end of 2022, it had a stock price around $10. Today, it trades around $30. Investors are bullish on the potential for the company to deploy AI tools across enterprises, earning lengthy and expensive software contracts.

While it has a good narrative and clearly fits the AI theme, investors who buy C3.ai stock are betting on a risky stock. The company's revenue has grown by 49% in the last three years, undoubtedly due to the growing spending on AI. Over the last 12 months, C3.ai has generated $347 million in revenue. However, in order to maintain this revenue base, the company had a net loss of $274 million over the last 12 months, or close to a negative 100% profit margin.

C3.ai may see an uptick in customer demand if the AI boom continues, but it is unwise to believe it will rapidly flip to profitability. The company has never generated a profit and likely won't for many years. A stock is only worth the profits it will generate for shareholders in the future. If C3.ai remains unprofitable, well, the stock won't be worth much at all. I would categorize this as a high-risk AI stock that is likely to do poorly for investors in 2025.

Medium-risk AI stock: Nvidia

An AI company with a medium amount of risk is Nvidia. The semiconductor giant is seeing demand go through the roof as its customers spend aggressively to win in this nascent market. Nvidia's revenue is up 320% in the last three years, with its data center revenue growing 112% year over year last quarter to $30.8 billion.

With companies planning to spend significantly to build data centers, Nvidia's revenue will likely rise once again in 2025. Don't think this makes monster returns for the stock a cinch though. Nvidia currently trades at a price-to-earnings ratio (P/E) of 52.4 with profit margins at an all-time high. Multiple times throughout its history, Nvidia's revenue has gone through a cyclical downturn due to swings in demand from the buyers of its computer chip products.

It is not impossible that demand for Nvidia's products goes through a cyclical peak in 2025. It has happened before and will happen again. This doesn't mean investors should sell Nvidia stock, as it has a long track record of innovation. But with a high P/E ratio and operating in a cyclical industry, Nvidia is not a low-risk AI stock for investors to buy in 2025.

AMZN Operating Margin (TTM) Chart

AMZN Operating Margin (TTM) data by YCharts

Low-risk AI stock: Amazon

My last stock is one that will benefit from AI spending (and is actually an Nvidia customer). However, it operates in a less cyclical industry, has margins that should go up instead of down, and might see accelerating revenue growth in 2025. Yes, I'm talking about Amazon, the technology giant and leader in both the e-commerce and cloud computing sectors.

Cloud computing is a durable growth industry, with new revenue coming from increased IT workloads and the transition from on-premise services. Revenue has grown every year for the segment since its launch in 2006, with plenty of room left to grow. A lot of AI spending is being done in the cloud, which could help Amazon Web Services (AWS) -- and Amazon as a whole -- accelerate revenue growth in 2025.

More importantly, Amazon has an easy path to expand its profit margins in 2025, making the stock a low risk at its current market capitalization. North American retail operating margin has climbed for many quarters in a row to 5.9% over the last 12 months and still has plenty of room to expand. Amazon's two fastest-growing segments -- advertising and AWS -- are also the segments with the highest profit margins. As these become a larger part of the overall pie, Amazon's profit margin will keep going higher.

If Amazon can hit a consolidated operating margin of 15% in 2025 (operating margin was 10% over the last 12 months) and revenue can grow to $650 billion from $620 billion, then Amazon will generate just under $100 billion in operating income this year. Compared to a market cap of $2.3 trillion, this makes Amazon a low-risk AI stock to add to your portfolio in 2025.