The artificial intelligence (AI) opportunity could help many investors meet or exceed their retirement goals. AI is impacting every industry as it promises to speed up innovation and labor productivity. This could add trillions to the economy, according to PwC. Here are two AI stocks to consider buying on the dip.

A digital brain labeled with the letters "AI" while hovering over a computer circuit.

Image source: Getty Images.

1. C3.ai

Palantir Technologies is the star of AI software right now. But the AI opportunity is much bigger than one company. This is evident when you look at the accelerating growth of Palantir's smaller rival C3.ai (AI 0.71%).

While C3.ai doesn't have the scale or profitability of Palantir, its revenue growth could lift the stock higher. C3.ai's revenue grew 26% year over year in the most recent quarter, an improvement from virtually zero growth in the same quarter two years ago.

C3.ai will benefit from its new partnership with Microsoft, which will significantly expand its sales force to reach more customers worldwide. C3.ai's solutions are available on all the leading cloud platforms. In the last quarter, it closed 59 agreements through its partners.

The U.S. military is adopting more AI technology, which is benefiting the company. Over the past year, C3.ai closed 51 agreements with the federal government. The U.S. Air Force Rapid Sustainment Office raised its contract ceiling with C3.ai to $450 million, up from the initial ceiling of $100 million.

These deals highlight the competitive strengths of C3.ai's AI applications. C3.ai's software is good at predictions and forecasts that can detect potential points of failure, while Palantir excels when it can take a large amount of unorganized data and make sense of it to facilitate better decision-making. Their different strengths mean both companies can deliver returns for their shareholders.

The enterprise AI opportunity -- essentially, using AI to help companies draw insights and make decisions -- is going to stretch into the trillions over the long term, and C3.ai will get its piece. Market researcher McKinsey reports the market for AI software and services was $85 billion in 2022 and is expected to reach a range of $1.5 trillion to $4.6 trillion by 2040.

C3.ai stock reached a high of $45 last year before selling off to its current share price of $28. That brings its price-to-sales (P/S) multiple down to 9. Since the end of 2022, the stock has traded at a P/S multiple ranging from 4 to 19.

The stock is very volatile, but analysts on Yahoo Finance! expect the company's revenue to grow from $389 million in fiscal 2025 (which ended in April) to $551.2 million by fiscal 2027. That growth could lift the stock proportionally.

2. Marvell Technology

On the hardware side, data centers need specialized networking products and processors for transferring data at high speeds for training AI. This is benefiting Marvell Technology (MRVL -0.97%), which posted robust growth in revenue to start the year. The stock has been trending higher over the past five years, but after reaching a high of $127 at the start of 2025, the shares have pulled back to $73. This makes it a great buy based on the opportunities ahead.

Marvell's total revenue reached a quarterly record of $1.9 billion in fiscal Q1, representing a 4% sequential increase over the previous quarter. Notably, this was a 63% jump in revenue over the year-ago quarter.

Marvell's custom chip solutions sent its data center revenue up 76% year over year in fiscal Q1. The company should benefit from a long-term relationship with Amazon Web Services, as Amazon recently acquired a stake in Marvell stock. Marvel also is working with Nvidia's NVLink Fusion platform to help data centers run AI workloads more efficiently.

Marvell's chip integration in NVLink will expand its data center opportunity, which the company previously estimated at $75 billion. In June, management updated its total addressable market estimate to $94 billion in 2028. This estimate includes opportunities in custom chips, network switching, interconnects, and data storage.

Analysts on Yahoo! Finance expect Marvell's revenue to grow from $5.7 billion in fiscal 2025 (which ended in January) to nearly $9.8 billion by fiscal 2027.

Despite the opportunity ahead, the stock is trading at a price-to-earnings multiple of 23 and just over 10 times fiscal 2030 earnings estimates. Investors looking for a sleeper AI stock should follow Amazon and consider buying some shares.