As artificial intelligence (AI) becomes more widely adopted, the big players in semiconductors and cloud computing are delivering significant gains for investors. Recent results from leading tech companies suggest this is the early innings of a long-term build-out in AI infrastructure.
The total addressable market for AI could be $40 trillion, according to Morgan Stanley. If you have $3,000 you can commit to a long-term investment strategy, here are two AI stocks to buy and hold.
Image source: Getty Images.
1. Advanced Micro Devices
Advanced Micro Devices (AMD 1.91%) has been competing in the chip industry for decades, but CEO Lisa Su, who took over in 2014, has the company positioned for incredible growth in the coming years. AMD's consumer PC chips, such as its Ryzen processors, have been giving Intel stiff competition in recent years, and now the company appears poised to make a big splash in the AI data center market.
AMD is coming off another solid quarter with record quarterly revenue and profitability. Its data center and consumer PC businesses are gaining momentum, contributing to a 36% year-over-year increase in revenue in the third quarter.

NASDAQ: AMD
Key Data Points
AMD is meeting demand for cost-effective alternatives in the AI chip market. Its competitive edge was validated recently with a multiyear deal to supply chips for OpenAI. This positions AMD to grow its revenue significantly in the coming years. Analysts expect its revenue to reach $57 billion in 2027, up from its trailing-12-month revenue of $32 billion.
The company's Q3 earnings report also showed a noticeable jump in free cash flow, as higher sales of data center chips are driving higher margins. Trailing-12-month free cash flow tripled year over year to $5.4 billion.
Analysts expect AMD's free cash flow to grow at an annualized rate of 54%. This would grow its annual free cash flow from $2.4 billion in 2024 to more than $22 billion by 2029. With such a huge opportunity ahead to expand its data center business, AMD is an excellent investment for the long term.
Image source: Getty Images.
2. Microsoft
Many companies are still in the early innings of moving their data over to cloud services to use with AI, and this continues to fuel Microsoft's (MSFT 0.04%) growth.
The stock's recent pullback following its quarterly earnings report in October is a great buying opportunity. Momentum across the business remains robust, with revenue up 18% year over year to $78 billion. Cloud revenue was up 26% year over year to $49 billion, reflecting strong demand for cloud offerings across productivity and enterprise products.

NASDAQ: MSFT
Key Data Points
Microsoft offers many solutions for consumers and businesses across its Azure enterprise cloud platform, Dynamics 365, Office, and more. This gives Microsoft multiple ways to monetize AI features that customers are increasingly using in these services.
Microsoft's cloud business is benefiting from its large fleet of data centers for AI. It is striking multibillion-dollar deals to expand capacity to meet insatiable demand. Its Azure cloud business posted a 40% year-over-year increase in revenue last quarter. Major companies are choosing Azure. These include Ralph Lauren, which is using Microsoft's AI tools to build a personalized shopping assistant in its app.
These results show that investors would do well to stick with this software leader as the AI boom rages on. Usage of Copilot chat in Microsoft 365 grew 50% in fiscal Q1 over the previous quarter.
Large tech companies like Microsoft are in the strongest position to capitalize on AI demand. Microsoft generated $78 billion in free cash flow over the last year, and analysts expect this to reach $206 billion by fiscal 2030. This provides ample resources to invest in AI infrastructure and services to meet growing demand. Growing free cash flow is the key signal pointing to solid returns for Microsoft investors.