If you ask 100 different investors if a stock is under- or overvalued and why, you're likely to get 100 different answers. If everyone knew a stock was undervalued, they would purchase it, which would drive the price up, and then it wouldn't be undervalued anymore.

However, going through the exercise to determine if a stock is undervalued is vital, as your research could yield significant returns. Today, I will dig into Salesforce (CRM -1.59%).

What does Salesforce do?

You can get a clue as to what Salesforce does by looking at its ticker: CRM. CRM is a common acronym that stands for customer relationship management, basically how a business interacts with current and prospective clients. The primary way to grow a business is by obtaining new customers and getting existing ones to spend more, so this software is vital for nearly every business.

CRM platforms have many capabilities, like marketing, customer service, and sales. By combining these operations into one software bundle, businesses can be more efficient in dealing with customers.

The CRM market opportunity is enormous, with the market expected to reach $158 billion by 2030, growing at a 13.3% annual rate from 2022 on.

That's an impressive market, but what's Salesforce's position in it? According to Statista, Salesforce controlled about 23.8% of the market in 2021, dwarfing second-place SAP's 5.4% market share. Furthermore, Salesforce's market share is growing, showing it is still the top pick for many businesses.

Salesforce's market leadership position in a growing industry checks many investment boxes. But how about its financials?

Strong present results, but a slower future is in store

Despite a tricky second-quarter environment, Salesforce did well. Many businesses were not interested in purchasing new enterprise software. It's a cumbersome task, expensive, and has a steep learning curve. None of these activities are wise to do when the economy is struggling. If a business adopts new software, it's likely mission-critical and must provide significant value to the business.

In Salesforce's Q2 (ending July 31), revenue rose 22% YOY (year over year) to $7.72 billion. However, it lowered its fiscal-year 2023 (ending Jan. 31, 2023) revenue guidance from $31.75 billion to $30.95 billion. Nevertheless, this guidance still indicates 16.8% YOY growth -- not too bad for the current environment.

Remaining performance obligations (RPO) only rose 15% YOY. This trend is disappointing, as RPO is an indicator of future revenue. Still, this can be interpreted two ways. First, the difficult environment caused companies to pull back their spending, and this lost revenue will eventually return. Second, Salesforce has penetrated its market entirely, and its only growth will come from market expansion (projected to be 13.3% growth through 2030, as mentioned above).

When a growth stock's business begins to slow, investors demand profits. Profits have been slim in Salesforce's life as a public company, but management is projecting a 3.6% GAAP operating margin for FY23 (its current fiscal year). Much of Salesforce's losses come from heavy stock-based compensation -- in Q2, it was $851 million, or 16% of all operating expenses.

However, stock compensation is a noncash expense, which allows Salesforce to be free cash flow positive. In Q2, Salesforce produced $131 million in free cash flow, adding to its $13.5 billion cash and marketable securities position. With its cash pile, Salesforce plans to repurchase $10 billion in stock.

At face value, this may indicate that management believes its stock is undervalued. However, the primary reason for this repurchase plan is to offset shareholder dilution. Because of heavy stock-based compensation, Salesforce's share count has risen 38% over the past five years. This dilution makes each share less valuable, since each stock is worth a smaller stake in the company when new shares are issued.

If Salesforce were to drop all $10 billion on its shares right now, it would reduce its outstanding shares to a level last seen in 2021 before the acquisition of Slack was completed. That doesn't rewind the clock on share count much, but it would be a start.

As for a valuation, Salesforce trades at 5.7 times sales, which is low compared to other enterprise software companies like Adobe (11.3) and Autodesk (10), even though it used to trade in a range similar to its peers'.

CRM PS Ratio Chart

CRM PS Ratio data by YCharts

However, Salesforce isn't close to the profitability levels of these two, which weighs into its valuation.

I'm on the fence about declaring Salesforce undervalued. While it operates in a massive and growing industry, its dominance has brought it to the point where it will likely grow at a similar rate to the overall market. As Salesforce flips the switch from growth at all costs to profitability, it may struggle with its high stock-based compensation bill.

I think this pessimism is reflected in its below-industry-average valuation. As a result, I think Salesforce shares are likely reasonably valued.

However, this doesn't mean you shouldn't buy the stock. As Warren Buffett once said, "It's far better to buy a wonderful company at a fair price than a fair company at a wonderful price." Salesforce is a wonderful company; it just has a lot to prove before joining the ranks of highly profitable businesses.