Shares of data analytics powerhouse Palantir Technologies (PLTR -2.27%) soared by 141% this year. For two years running, Palantir is the top-performing stock in the S&P 500, and its momentum doesn't appear to be diminishing in the slightest.

Following the company's blowout second quarter earnings report, CNBC investment personality Jim Cramer shared his thoughts on Palantir -- even going so far as to call the stock "ridiculously cheap".

That's a bold statement, and one I'm not totally sold on myself. Let's explore some different valuation methodologies for Palantir and assess why Cramer still sees Palantir as a compelling buy.

Is now a good time to buy Palantir stock? Read on to find out.

Is Palantir stock overvalued?

Many years ago, I worked as an investment banking analyst at SunTrust Robinson Humphrey -- which is now part of Truist Financial following its merger with BB&T Capital Markets. My focus was on mergers and acquisitions, and a key part of my role involved prepping comparable company valuation analyses.

Broadly speaking, companies trade at a multiple of some profitability metric -- be it earnings, EBITDA, or free cash flow. Software-as-a-service (SaaS) businesses are a slight exception to these traditional valuation norms, however. While SaaS businesses often have healthy gross margins, they tend to reinvest excess profits to bolster sales, marketing, and product development efforts rather than capture near-term profitability.

These dynamics make valuing Palantir a little tricky. For example, Palantir currently trades for a price-to-earnings (P/E) ratio of 621 and a forward P/E of 287 -- levels so stretched that they offer little insight as very few (if any) other SaaS businesses trade at comparable multiples.

PLTR PS Ratio Chart

PLTR PS Ratio data by YCharts

I've benchmarked Palantir against a sizable cohort of SaaS companies specializing in data analytics, cybersecurity, cloud infrastructure, customer relationship management, and enterprise productivity.

Not only does Palantir boast a meaningfully higher price-to-sales (P/S) multiple than any of its peers, but the ratio is expanding. By this very nature, Palantir stock is becoming more expensive relative to other SaaS stocks -- suggesting the stock is well past the point of being considered overvalued.

Given these dynamics, how can Cramer justify saying Palantir stock is cheap?

Well, in order to understand his logic, investors are going to have to close the lid on traditional valuation protocols and look at some industry-specific metrics; in particular, the Rule of 40.

A person writing software code.

Image source: Getty Images.

Is Palantir's Rule of 40 score any good?

The Rule of 40 is a SaaS metric that is calculated by taking a company's revenue growth and adding it to some sort of profit margin (i.e. free cash flow margin, operating income margin, or EBITDA margin).

Palantir Rule of 40.

Image source: Palantir Investor Relations.

The chart above was included in Palantir's second quarter earnings report presentation. As investors can see, Palantir's Rule of 40 score of 94% is higher than any enterprise software company that generates at least $1 billion in revenue.

Palantir's combination of accelerating revenue and improving profitability is unmatched in the software sector. When viewed through the lens of the Rule of 40, it's easy to see why some investors think the company's valuation is justified.

My issue with the Rule of 40

Relying purely on the Rule of 40 to value Palantir is a controversial -- and potentially flawed -- approach.

The metric can be misleading for many reasons: short-term revenue spikes can create the illusion of sustained high growth, while profitability can appear more durable than it really is if a company chooses to use adjusted non-GAAP figures that remove certain expenses. As seen in the footnote in the slide above, Palantir uses adjusted operating margin in its Rule of 40 score. This is calculated by adding back non-cash expenses such as stock-based compensation.

Moreover, the Rule of 40 does not directly account for competitive dynamics in the broader market or the sustainability of growth -- meaning a high score does not necessarily imply that a stock is undervalued.

While I applaud Palantir's growth throughout the AI revolution, I do think the stock is overbought and view Cramer's declaration that the stock is cheap as an outlier perspective.

In practice, institutional investors at hedge funds and wealth management firms generally place greater weight on traditional valuation methodologies such as P/S, P/E, or cash flow yields over industry-specific metrics such as the Rule of 40.

If these measures suggest that a stock is overvalued -- as they do with Palantir -- institutions will likely face pressure from their limited partners to trim exposure and lock in profits rather than add to their position at a premium valuation.