Salesforce (CRM 0.42%) and Veeva (VEEV 0.91%) both provide cloud-based customer relationship management (CRM) services. Salesforce controls more than a fifth of the global CRM market, according to Gartner, while its closest competitors only hold mid-to-low-single-digit shares. Veeva is a much smaller company that mainly provides its CRM services to life science companies.

Yet Veeva probably wouldn't exist without Salesforce. Veeva was founded by Salesforce's former senior VP of Technology Peter Gassner, who still serves as its CEO, and the company still runs some of its services on Salesforce's platform. But over the past 12 months, Salesforce's stock has soared 74% as Veeva's stock has only rallied 39%. Let's see why the market leader outperformed its niche peer by such a wide margin, and if it's still the better buy.

A person checks a portfolio on a laptop computer in an office.

Image source: Getty Images.

Salesforce's margins are expanding as its growth cools off

Salesforce is most commonly associated with its CRM platform, but it also provides additional cloud-based sales, marketing, e-commerce, analytics, collaboration, and data visualization services. Most of those businesses struggled over the past two years as the macro headwinds forced companies to rein in their software spending.

In fiscal 2022 (which ended in Jan. 2022), Salesforce's revenue rose 25%. But its revenue only grew 18% in fiscal 2023 and increased 11% in fiscal 2024. It expects just 8%-9% growth in fiscal 2025. That slowdown spooked its growth-oriented investors, but the company laid off thousands of employees, cut costs, and paused its big acquisitions to boost its margins. It also launched its first buyback plan to boost its EPS and initiated its first dividend.

As a result, Salesforce's adjusted operating margin expanded from 18.7% in fiscal 2022 to 30.5% in fiscal 2024. Its adjusted EPS -- which dipped 3% in fiscal 2022 -- rose 10% in fiscal 2023 and surged 57% in fiscal 2024. Those bottom-line improvements allayed the activist investors who had besieged the company throughout the first half of calendar 2023. Analysts expect its adjusted EPS to grow 19% in fiscal 2025.

Salesforce is becoming more of an earnings growth story than a revenue growth one, but it expects the expansion of its Einstein AI services to lock in more customers and widen its moat. That outlook is encouraging, but its stock isn't cheap at 31 times forward earnings, and its forward dividend yield of 0.5% won't attract any serious income investors.

Veeva's growth is stabilizing in a tough market

Veeva established a first-mover's advantage in the life sciences CRM market, and it also provides additional cloud-based storage and analytics services. But over the past year, it struggled as the macro headwinds drove many of its clients to downsize their sales teams, rein in their spending on new projects, and focus on larger R&D deals that took a longer time to recognize as revenue. Smaller biotech companies also struggled to raise fresh capital to expand as interest rates rose.

In fiscal 2022 (which ended in Jan. 2022), Veeva's revenue rose 26%. But its revenue only grew 16% in fiscal 2023 and 10% in fiscal 2024. That slowdown should end soon: It expects its revenue to rise 15%-16% this year as the macro environment warms up and it deploys more AI applications to process all of its data more efficiently.

Veeva's slowdown was disappointing, but it didn't attract any unwanted attention from activist investors. Unlike Salesforce, Veeva didn't aggressively cut costs, initiate big buybacks, or launch a dividend as its growth cooled off -- and its adjusted operating margin actually dipped from 41% in fiscal 2022 to 35.6% in fiscal 2024. Its adjusted EPS rose 27% in fiscal 2022, but only increased 15% in fiscal 2023 and 13% in fiscal 2024. However, analysts expect 27% growth in fiscal 2025 as its revenue growth accelerates again. Veeva's future looks bright, but it also isn't a bargain at 38 times forward earnings.

The better buy: Salesforce

It's a close call, but I believe Salesforce will continue to outperform Veeva this year for three simple reasons: Its business is more broadly diversified, its earnings growth is stronger, and its stock is cheaper. Veeva is still a great long-term play on the life sciences CRM market, but it needs to grow a bit faster to justify its premium valuations.