Imagine it's 2015. You've just gone to the movies to see Inside Out, and you're playing with Snapchat filters on your phone. You've also just bought $1,000 of shares in Salesforce (CRM -1.35%). Flash forward to 2025. How much is your stake worth now?

Here's the answer: $3,470. Pretty great, right? You'd have enjoyed an annualized return of 13.2%. Given the S&P 500 has delivered an annual long-term return close to 10% (ignoring inflation), that 13.2% beats the market's historical average by a wide margin.

But the S&P 500 has had a much stronger decade with an annualized gain of 12.9%, nearly matching Salesforce's performance.

Man looking at charts on a tablet and notebook computer

Image source: Getty Images.

If you'd reinvested your dividends from your S&P 500 investment, you'd actually have come out ahead with an annualized total return of 14.9%, enough to turn $1,000 into just over $4,000. (Salesforce only began paying dividends in 2024.)

Still, this is all water under the bridge. What really matters is where Salesforce stock goes from here. Its current valuation certainly looks appealing with a forward price-to-earnings (P/E) ratio of 21, well below its five-year average of 27.

That valuation reflects a stock price that has fallen 27% year to date, due in part to less-than-inspiring guidance from management and worries the business may be hurt by artificial intelligence (AI) -- or  at least the fear Salesforce won't be a leader with the technology.

Take a closer look at the company to see if it looks promising enough to deserve a place in your portfolio.