Technology stocks have enjoyed impressive returns, but artificial intelligence (AI) has cast doubt over which companies can sustain long-term success.
Two tech stocks that stand out amid AI-driven uncertainty are IBM and Amazon.
IBM is delivering on quantum computers, while Amazon is a leader in AI infrastructure.
The technology sector has been a boon for investors, but the arrival of artificial intelligence (AI) has been a mixed blessing. AI boosted the fortunes of some companies, yet for others, the tech could make them obsolete.
The situation has created fear on Wall Street in 2026. Concern over which companies could be losers in the AI era caused share prices to fall for many businesses in recent weeks.
Will AI create the world's first trillionaire? Our team just released a report on the one little-known company, called an "Indispensable Monopoly" providing the critical technology Nvidia and Intel both need. Continue »
Although artificial intelligence introduces uncertainty, two companies well versed in adapting to change stand out as excellent investments to buy and hold for years to come. They are IBM (NYSE: IBM) and Amazon (NASDAQ: AMZN).
Image source: Getty Images.
IBM is the epitome of a long-term investment that can shift with the times, given the company is more than a century old. It's also a stock that can appeal to both growth and income-oriented investors.
Big Blue offers a robust dividend, yielding 2.8% as of March 3. The conglomerate has made continuous dividend payments since 1916, making it a reliable source of passive income.
What makes it an attractive growth stock is its work in quantum computing. This tech leverages the properties of quantum mechanics to perform complex calculations that would take centuries for today's supercomputers to complete.
IBM shares soared to an all-time high of $324.90 last November after announcing upcoming milestones for its quantum computing work. This suggests shares could climb as the company achieves these goals.
One of its accomplishments is the Nighthawk quantum processor, which positions Big Blue to reach quantum advantage by the end of this year. Quantum advantage is the point at which a quantum device can solve real-world problems more accurately, cheaply, or efficiently than conventional computers, marking a key turning point to broader adoption of the technology.
IBM's quantum computing work is already seeing success. Big Blue is participating in the U.S. Department of Energy's Genesis Mission and the Missile Defense Agency's SHIELD program.
Amazon is an attractive tech stock because it's the global leader in cloud computing through its Amazon Web Services (AWS) division. This is an enviable position amid the artificial intelligence boom.
Businesses eager to capitalize on AI need vast amounts of computing power to make that happen. AWS supplies this. The market for AI infrastructure is thriving, with historically low levels of vacancies seen at data centers, which is where AI systems live.
As a result, AWS sales are soaring. Its fourth-quarter revenue rose 24% year over year to $35.6 billion. Amazon is poised to enjoy years of AWS revenue growth as the AI infrastructure market expands. Forecasts predict this sector will grow from $59 billion in 2025 to nearly $500 billion by 2034.
To capitalize on this growth, Amazon announced it would spend about $200 billion on capital expenditures (capex) this year. However, the figure spooked Wall Street, and the company's stock is down about 10% in 2026 through March 3. After all, that capex sum is a significant jump from the $128.3 billion spent in 2025.
But the investment makes sense. Amazon's capex fulfills its own computing capacity needs, as well as those of other businesses. These include its AI-powered army of over 1 million robots working in warehouses to accelerate e-commerce shipping speeds. CEO Andy Jassy explained, "When we promise faster delivery times, customers complete purchases at a meaningfully higher rate and shop with us more frequently."
In addition, as Amazon has boosted its own AI use and thereby streamlined operational costs, its gross profit margins have steadily risen.

Data by YCharts.
This contributed to rising profitability for Amazon. Its Q4 2025 operating income increased to $25 billion compared with $21.2 billion in 2024.
IBM and Amazon shares are well below their 52-week highs, creating an opportunity to buy both stocks. In fact, their forward price-to-earnings ratios have hovered around low points for the past year.

Data by YCharts.
This suggests IBM's and Amazon's share price valuations are at reasonable levels, reinforcing that now is a good time to pick up shares in both. Their compelling forward earnings multiples, combined with the factors driving business growth, make IBM and Amazon great tech stocks to buy and hold for the next decade and beyond.
Before you buy stock in Amazon, consider this:
The Motley Fool Stock Advisor analyst team just identified what they believe are the 10 best stocks for investors to buy now… and Amazon wasn’t one of them. The 10 stocks that made the cut could produce monster returns in the coming years.
Consider when Netflix made this list on December 17, 2004... if you invested $1,000 at the time of our recommendation, you’d have $534,008!* Or when Nvidia made this list on April 15, 2005... if you invested $1,000 at the time of our recommendation, you’d have $1,090,073!*
Now, it’s worth noting Stock Advisor’s total average return is 949% — a market-crushing outperformance compared to 192% for the S&P 500. Don't miss the latest top 10 list, available with Stock Advisor, and join an investing community built by individual investors for individual investors.
See the 10 stocks »
*Stock Advisor returns as of March 8, 2026.
Robert Izquierdo has positions in Amazon and International Business Machines. The Motley Fool has positions in and recommends Amazon and International Business Machines. The Motley Fool has a disclosure policy.