Software stocks have been pushed lower as investors fear the long-term impact of generative AI.
There is now a growing number of attractive software stocks with considerable upside.
These two stocks trade at valuations that practically imply a worst-case scenario for their futures.
Artificial intelligence (AI) is one of the biggest driving forces behind the current bull market. While it has the potential to improve productivity and profitability for almost every business, it could weigh heavily on some. The software sector has been hit particularly hard over the last six months as investors reckon with the potential for generative AI to disrupt enterprise software.
With the uncertainty introduced by AI, analysts aren't as confident about the earnings potential of many software companies that currently deliver predictable growth from software-as-a-service (SaaS) subscriptions. As a result, investors have reduced the multiples they're willing to pay for future earnings.
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 »
But that's driven software stocks to their lowest valuation ever, relative to the rest of the market. That could mean there are many great investment opportunities right now.
Image source: Getty Images.
Software stocks historically trade at price-to-earnings (P/E) multiples 20% to 40% higher than the S&P 500 aggregate P/E. Software companies, as a group, are fast-growing.
And with the shift to the SaaS model, revenue has become more predictable. That means analysts usually have a pretty good idea of a software company's finances over the next few years, and that typically leads to higher-than-average earnings multiples.
Data from Empirical Research, shared by global asset manager Oakmark Funds, show software stocks traded for twice the earnings multiple of the S&P 500 average in 2021. This was an era of rapid growth for many software stocks as workforces shifted to more remote work, dramatically increasing the need for new software.
Still, it was the second-highest premium the sector had ever traded at, topped only by the peak of the dot-com bubble. At that multiple, it's no surprise that software stocks were some of the hardest hit in the 2022 bear market, bringing their earnings multiple premium back in line with historic norms.
But the current sell-off in software stocks has pushed their forward P/E to a historic low. As of the end of the first quarter, the sector traded at a discount relative to the overall market. It reached its lowest-ever relative valuation during the period.
Many software stocks are trading at significant discounts relative to slow-growing sectors like industrial stocks, Oakmark investment manager Bill Nygren says. "With AI uncertainty now at least partly reflected via lower prices, we believe the risk/reward has improved significantly," he wrote in his first-quarter commentary. The following two stocks look like absolute bargains with significantly more upside than downside at today's prices.
Salesforce (NYSE: CRM) recently experienced a slowdown in revenue growth, but that trend may be reversing in the near future. Management expects sales to accelerate in the second half of the current fiscal year, fueled by momentum in its AI products.
Agentforce, the company's AI agent development platform, is gaining traction among its customers, with revenue climbing 169% year over year. When you add in Data 360 and newly acquired Informatica, which closely complement Agentforce, total AI-related revenue climbed 200%, reaching $2.9 billion. That's still a relatively small piece of the company's overall $41.5 billion in revenue, but it's a meaningful contributor to its growth.
The outlook for 2027 and beyond is strong. It forecasts $46 billion in revenue for the year at the midpoint of guidance, up 11%. It expects to maintain that pace through 2030.
Meanwhile, management's drive for efficiency while scaling up its AI operations should improve its operating margin. On top of that, it committed $50 billion to share repurchases, including a recent $25 billion accelerated repurchase to kick things off this year.
The stock's forward P/E has dropped to just 13. With low double-digit revenue growth expected over the next few years, that price is extremely pessimistic about Salesforce's long-term prospects. It's hard to imagine many businesses ditching the enterprise software they use across operations every day, but that's practically what the current stock price implies.
ServiceNow (NYSE: NOW) also sees AI as a major growth driver for its business over the next few years. Its AI solutions reached $600 million in annual contract value as of the end of 2025, ahead of management's $500 million goal. Management's 2026 goal is $1 billion.
It's also seeing strong momentum with its AI Control Tower platform, which brings together first-party and third-party AI agents for businesses to deploy across their operations through ServiceNow's software. Deal volume for the platform tripled sequentially last quarter.
After spending heavily on acquisitions over the past year, management is focused on integrating those acquisitions and growing organically this year. Its outlook for 2026 calls for around 20% revenue growth on a constant-currency basis, with a 100-basis-point expansion in operating margin to reach 32%. Still, that disappointed many investors since it implies organic revenue growth below 20%. They want to see a reacceleration in revenue after a severe drop in growth in 2024 persisted through 2025.
Importantly, ServiceNow continues to show strong net revenue retention among its customers, leading to substantial growth over the long run. Each year, its customers take more services and pay for more users.
As ServiceNow continues to expand its suite and ensure it sits at the center of any agentic AI strategy for its customers, it'll likely see net revenue retention remain well above 100%. On top of bringing in new customers with its expanding set of services, it should result in sustainable long-term revenue growth as businesses find it increasingly difficult to switch away from the company's offerings.
At a forward P/E ratio of 21, the stock is priced as if ServiceNow will fail to attract new customers and rely entirely on growing its business with existing customers. While that seems to be the major uncertainty across the sector from generative AI, the technology appears to be much more of a benefit to ServiceNow than a threat.
Before you buy stock in ServiceNow, 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 ServiceNow 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 $580,872!* 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,219,180!*
Now, it’s worth noting Stock Advisor’s total average return is 1,016% — a market-crushing outperformance compared to 197% 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 April 17, 2026.
Adam Levy has positions in Salesforce. The Motley Fool has positions in and recommends Salesforce and ServiceNow. The Motley Fool has a disclosure policy.