Even with a few stretches of volatility, stocks are seeing strong bullish momentum in 2024. The S&P 500 index is already up roughly 18% year to date, and much of the impressive rally continues to be driven by gains for high-profile artificial intelligence (AI) players.

But while mega-cap companies including Nvidia, Microsoft, and Apple have surged to new valuation highs this year, there are still some fantastic AI stocks trading at substantial discounts compared to previous valuation peaks.

With that in mind, read on to see why two Motley Fool contributors think you should pounce on these tech companies that have what it takes to be winners.

The letters 'AI' on a chip.

Image source: Getty Images.

Palantir's growth engine is only getting stronger

Keith Noonan: A quick jump in interest rates and some slowed growth caused Palantir Technologies (PLTR 0.17%) stock to fall to a low of roughly $6 per share in December 2022, but it has since come roaring back. The share price is up 86% across this year's trading alone, and it's far from low risk, trading at 90 times this year's expected earnings.

On the other hand, Palantir stock is still down 18% from its peak, and the stage could be set for the analytics and intelligence software company to hit new highs.

Palantir has posted reliable profits since 2023, and the company's sales growth returned to accelerating at an eye-catching pace. With its second-quarter report, the business delivered 27% year-over-year sales growth and an 80% jump in adjusted earnings per share (EPS).

The big-data analytics leader has been racking up wins in both the government and private sector, and it looks like the business will continue to post impressive margins and see its growth climb even higher.

Palantir got its start as a provider of analytics and information software services to government customers, but the company's private-sector business has been a rising star over the last couple of years. Revenue from commercial customers rose 33% in the second quarter, and the segment accounted for 45% of total sales in the period.

Aided by strong demand for the company's Artificial Intelligence Platform (AIP) software suite, the commercial segment will soon be Palantir's largest. Given that private-sector growth has consistently outpaced public-sector customers in recent years, that paints an encouraging outlook. And it's even better when you break down trends within the commercial-customer segment.

Sales to U.S. commercial customers grew 55% year over year to hit $159 million in the second quarter, accounting for roughly 52% of total commercial segment revenue. Sales to U.S. businesses now make up more than half of overall segment revenue and are growing at a rate far above the overall category. In other words, growth for the commercial segment should continue to accelerate and help push overall revenue higher.

And as exciting as things look for the private sector, Palantir's public sector growth is strong as well. Sales to government customers increased 23% year over year last quarter, up from 16% in this year's first quarter.

The company's growth engine has never looked stronger. With the business posting impressive margins and still managing to expand rapidly, Palantir stock has real potential to outperform.

The market is underestimating Trimble's growth potential

Lee Samaha: Workflow technology company Trimble (TRMB 1.40%) posted second-quarter earnings recently that were well received, but the stock continues to trade almost 41% off its all-time high. The company provides the hardware for precise positioning and the software and services to plan and model daily workflows while using advanced data analytics to optimize operations.

The productivity improvement provided by its technology makes it attractive to customers at any stage of the cycle. Still, it has faced some challenging end markets this year, not least in transportation, where significant overcapacity in the freight market is slowing down end demand.

It's a different story in its core architects, engineers, construction, and owners (AECO) segment, where its annualized recurring revenue (ARR) grew 18% year over year in the second quarter. Two-thirds of the growth came from existing customers, and one-third came from new customers, as its solutions help reduce waste and maximize execution in construction projects.

With Trimble increasingly selling software and subscription services on a recurring basis, the company's profit margins and cash flow conversion keep growing. This trend is highly likely to continue as data analytics improvements (Trimble is incorporating AI capability into its products, for example) mean more value added for its customers.

As such, it's becoming an increasingly important part of its customers' daily workflows, which should provide the opportunity to sell more services to them. Trimble is set to grow its ARR by 11% to 13% in 2024, and with a potentially more robust economy in 2025, that could increase even more for a company with a bright future.

Trading at a significant discount, Trimble stock looks like a smart buy right now.