Caterpillar helps build and power data centers.
Caterpillar reported a backlog of $51.2 billion in the fourth quarter.
Okta's revenue growth has slowed, but it is still in the double digits.
Caterpillar (NYSE: CAT) and Okta (NASDAQ: OKTA) are two of the best stocks to buy and hold onto for the next decade. They benefit as surprising artificial intelligence (AI) pick-and-shovel plays, but their other non-AI-oriented businesses provide enough diversity to stabilize them.
Neither of these stocks is cheap, because the smart money has already seen their potential. However, there is still an opportunity to buy into these companies before the AI cash comes pouring in.
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 »
Image source: Getty Images.
Caterpillar benefits from AI growth in two ways. Its construction equipment is needed to build data centers. Meanwhile, the company's Power & Energy segment is soaring, as it helps data centers meet their redundant power needs by supplying turbines and large reciprocating engines.
The company, in its 100th year in 2025, reported a record $67.6 billion in revenue, up 4%, thanks mainly to growing equipment sales. The company operates in three segments, but its Power & Energy segment, which includes natural gas generators and battery storage, saw fourth-quarter sales of $9.4 billion, up 23%, year over year.
The one downside was that full-year profit per share fell by 14.6% to $18.81, mainly due to higher incremental costs, including those from tariffs.
This year appears promising as Caterpillar reported a record backlog of $51.2 billion in the fourth quarter. On Jan. 28, it announced a deal with the American Intelligence and Power to provide 2 gigawatts of power to AIP's Monarch Compute Campus in West Virginia by 2027, by supplying natural gas generators and battery storage.
Another key growth area for Caterpillar is autonomous vehicles, particularly self-driving trucks. These vehicles work well in dangerous environments, such as mines. Caterpillar also makes autonomous excavators, dozers, and loaders to help construction companies cope with a lack of skilled workers.
The company's stock is up about 119% over the past year and more than 35% so far this year. It is trading at around 41 times earnings and around 34 times forward earnings. While that seems high for an old-school industrial stock, it's a bargain for a company with so much AI exposure.
There's also the matter of its dividend, which Caterpillar has raised for 32 consecutive years, including a 7% bump in 2025 to $1.51 per quarterly share.
Okta is a leader in cybersecurity, providing zero-trust identity and access management, ensuring that users are regularly verified to gain access to data and software applications.
Okta's stock is down 9.4% over the past year. The main reason for that is Okta's revenue growth has slowed. It also faces increased competition in access management from Microsoft and CrowdStrike.
Okta's finances remain strong, though. It has forecast 2026 revenue of around $2.9 billion, a 11% increase, and earnings per share (EPS) of $3.43 to $3.44, compared to $2.81 in 2025.
While some see AI as the death of software, that case is overstated. What's not overemphasized is that Okta is becoming a leader in providing security for AI agents, enabling data transport between apps through its Identity Security Fabric.
The company got a black eye in 2023 after it had a support system breach. I think it has learned from that and is now using AI to fight AI-generated hacks. Its Identity Threat Protection uses AI to detect behavioral shifts to lock out bot-driven fraud.
Before you buy stock in Caterpillar, 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 Caterpillar 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 $414,554!* 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,120,663!*
Now, it’s worth noting Stock Advisor’s total average return is 884% — a market-crushing outperformance compared to 193% 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 February 17, 2026.
James Halley has positions in Microsoft. The Motley Fool has positions in and recommends Caterpillar, CrowdStrike, Microsoft, and Okta. The Motley Fool has a disclosure policy.