Salesforce's (CRM 0.42%) stock rallied nearly 50% over the past three years and set a new all-time high in early March. It achieved those gains even as its growth slowed down and it was besieged by activist investors in the first half of 2023.

The cloud software giant pacified its critics by laying off thousands of employees, reining in its marketing expenses, suspending its ecosystem-expanding acquisitions, and launching its first buyback plan to boost its earnings per share (EPS). It also recently initiated its first dividend with a forward yield of 0.5%.

A person uses a smartphone while holding a cardboard cutout of a cloud.

Image source: Getty Images.

Those moves convinced many investors that Salesforce was still a worthwhile investment, even if the macro and competitive headwinds were throttling its long-term sales growth. But can Salesforce climb to new highs over the next three years?

What happened over the past three years?

Salesforce owns the world's largest cloud-based customer relationship management (CRM) platform. It controls over a fifth of the market, according to Gartner, while its four closest competitors -- Microsoft, Oracle, SAP, and Adobe -- each hold mid- to low-single-digit shares.

Salesforce capitalized on the growth of its CRM platform to launch additional cloud-based marketing, e-commerce, analytics, app development, and data visualization services. It significantly expanded its ecosystem through acquisitions over the past decade, and it processes all of that data with its Einstein artificial intelligence (AI) platform to help companies make more informed decisions.

From fiscal 2011 to fiscal 2022 (which ended in January 2022), Salesforce's revenue grew at a compound annual growth rate (CAGR) of 29%. But over the past three fiscal years, its revenue growth slowed down as the macro headwinds drove companies to rein in their software spending. Fierce competition from Microsoft, which integrates its Dynamics CRM platform into its other cloud-based services, could be exacerbating that pressure. However, Salesforce's cost-cutting measures significantly boosted its adjusted operating and free-cash-flow (FCF) margins as its buybacks lifted its adjusted EPS.

Metric

FY 2022

FY 2023

FY 2024

Revenue growth

25%

18%

11%

Adjusted operating margin

18.7%

22.5%

30.5%

FCF margin

19.9%

20.1%

27.2%

Adjusted EPS growth

(3%)

10%

57%

Data source: Salesforce.

For fiscal 2025, Salesforce expects its revenue to rise 8% to 9% as its adjusted operating margin expands to 32.5%. Analysts expect its revenue and adjusted EPS to increase 9% and 19%, respectively. Those growth rates are stable, but they still imply that the company's high-growth days are over and its business is maturing.

What will happen over the next three years?

From fiscal 2024 to fiscal 2027, analysts expect Salesforce's revenue to grow at a CAGR of 10% as its EPS rises at a CAGR of 29%. But at 31 times forward earnings, it seems like a lot of that future growth has also been baked into its stock price.

By comparison, analysts expect Microsoft's revenue and earnings to grow at CAGR of 15% and 17%, respectively, from fiscal 2023 to fiscal 2026 (which ends in June 2026). Microsoft's stock also looks a bit pricey at 30 times forward earnings, but its business is more diversified and it's heavily exposed to the AI market via its hefty investment in OpenAI.

Microsoft's integration of OpenAI's generative AI tools into Dynamics CRM and its other cloud-based software could also cause long-term headaches for Salesforce. In its latest quarter, Microsoft's Dynamics 365 revenue rose 24% year over year in constant currency terms. Salesforce's comparable Sales Cloud revenue only grew 10% on the same basis.

Over the next three years, Salesforce will likely keep cutting costs and buying back shares to offset its slower sales growth. But by pursuing that strategy, it risks becoming a slow-growth tech company like IBM -- which focused too heavily on cost-cutting measures and buybacks in the 2010s instead of expanding its cloud business to drive its long-term sales growth.

Salesforce insists its expansion of Einstein's ecosystem will help it keep pace with the broader shift toward AI-driven services. But its focus on expanding its operating margins and boosting its earnings could clash with those plans. Simply put, Salesforce will need to walk a fine line between investing in its growth and maintaining healthy margins.

Is it the right time to buy Salesforce?

Salesforce's stock looked cheap relative to its growth when it dropped to $170 per share last March, but it doesn't seem like a bargain right now. Its stock might gradually rise over the next three years as investors focus on its earnings instead of its revenue, but it could underperform the market as its valuations limit its upside potential. It could also generate less impressive gains than more exciting AI plays like Microsoft.