The last few weeks haven't been kind to Salesforce (CRM 2.06%). The leader in customer relationship management didn't have the greatest news when it reported first-quarter results, and the stock was hammered as a result.

However, much of this thinking was very shortsighted, which could make this a great time to scoop up shares at a discount.

Salesforce's AI products have many applications

Customer relationship management is all about understanding customers and keeping them happy. Whether that's knowing how to market to them, deal with product returns, or win new clients, Salesforce's tools can help. Its platform allows users to set up systems and create custom tools to manage these relationships.

It's also starting to heavily integrate artificial intelligence (AI) into its platform. Einstein AI, Salesforce's take on the technology, allows users to create chatbots for customer service using all available customer data. It can also help sales teams convert on more deals by using data collected through various interactions.

But these shiny new AI tools weren't enough to save Salesforce's stock when 2025 first-quarter earnings came out. In the quarter (ending April 30), revenue grew 11% year over year to $9.13 billion, while earnings per share (EPS) increased from $0.20 last year to to $1.58 in this quarter. The discrepancy between sales growth and the increase in EPS is a result of the company's recent focus on efficiency.

But the problem wasn't with its results, it was with the second-quarter guidance. The projected revenue growth of 7% to 8% seems incredibly slow in an age when everything AI-related is flying off the shelves. This caused the stock to crater 20% the day following the earnings report.

There's more to this picture, though. Despite disappointing guidance, management maintained its full-year forecast of 8% to 9% revenue growth. So, investors knew that was the expectation for the 2025 full year going into the second quarter, yet that one quarterly forecast spooked them enough to drastically sell off the stock. That's very shortsighted thinking, and it reveals an opportunity for investors who take a longer view (even though one year isn't that long).

So, is the stock worth buying at this discounted price?

The stock's valuation tumbled since its sell-off

To value Salesforce, I'll use the forward price-to-earnings (P/E) ratio, since it reflects a company undergoing a lot of change. After the sell-off, the stock went from very expensive to an average valuation.

CRM PE Ratio (Forward) Chart

CRM PE ratio (forward) data by YCharts.

At 23.4 times forward earnings, it's only slightly more expensive than the S&P 500's 22.1, which is a fantastic measure of the broader market.

From that standpoint, it seems fairly priced. But there are other big-tech alternatives in AI that are similarly priced here as well. Meta Platforms and Alphabet trade at 24.9 and 23.2 times earnings, respectively.

So why should investors buy Salesforce instead of those two, which are growing faster and are similarly priced? For starters, Meta and Alphabet are highly dependent on advertising, a cyclical business. This means their results will fluctuate based on the economy. Salesforce is a software-as-a-service business, which means it will be more steady during difficult times, although it might not grow as much.

And the company is continuing on its path to profitability and still has some room to go before reaching the margins of other software companies (like Adobe, which has a 30% profit margin).

CRM Profit Margin (Quarterly) Chart

CRM profit margin (quarterly), data by YCharts.

As a result, Salesforce should experience outsize earnings growth compared to revenue growth over the next few years as its profitability increases. Meta and Alphabet already maximized profits, another positive factor for Salesforce.

Over the long term, I think the stock will be an excellent buy. But investors will need to be patient to fully reap the benefits.