Sometimes, it doesn't seem to matter what a company does in a quarter: The stock still gets sold off after its report. That's where Palantir (PLTR -0.23%) found itself. After investors pushed the stock higher in advance of its May 6 earnings report, Palantir stock dropped 15% after the company reported earnings. Even after a small recovery, Palantir is down 8% from its pre-earnings price.

So, is this a buying opportunity?

Palantir's new AI product is driving a lot of commercial growth

Palantir is well recognized as a leader in artificial intelligence (AI), as it has a relatively long history with the technology. With the new wave of AI focused on generative AI, Palantir has also left its mark.

The Palantir Artificial Intelligence Platform (AIP), which gives clients the tools to integrate AI products throughout a business, has been all the rage: Management has said that demand for it has been unlike anything the company has ever seen. 

AIP has been a big driver in its commercial business growth, especially in the U.S. In Q1, U.S. commercial revenue rose 40% year over year, but that was slower than the 70% growth Palantir experienced in Q4. As this segment is a key part of Palantir's growth thesis, it's possible that the slowdown scared investors and led some to sell off the stock.

But selling now would be a big mistake, as Palantir as a whole is doing great.

Palantir's stock is still expensive

Overall, Palantir's revenue rose by 21% year over year to $634 million, which exceeded the $616 million high end of management's guidance range. Management also raised its 2024 guidance range -- previously $2.652 billion to $2.668 billion -- to $2.677 billion to $2.689 billion.

In sum, Q1 was a classic beat-and-raise quarter, which investors normally applaud.

Palantir's profitability is also growing -- its profit margin of nearly 17% was an all-time high.

PLTR Profit Margin (Quarterly) Chart

PLTR Profit Margin (Quarterly) data by YCharts.

This shows that Palantir isn't just some growth-at-all-costs business. Instead, management is taking advantage of the current environment responsibly.

But even the best company's stock bought at the wrong price can turn into a poor investment.

Based on its forward price-to-earnings (P/E) ratio of 66, Palantir looks expensive. However, it's not entirely fair to gauge Palantir by that standard because it hasn't reached the profitability levels of other software companies. More mature software companies like Adobe can have quarterly profit margins in the 30% range.

However, its price-to-sales (P/S) ratio of 22 is expensive regardless of how fast the company is growing.

PLTR PS Ratio Chart

PLTR PS Ratio data by YCharts.

This is a red flag for me, as it shows that Palantir's stock is still quite pricey, even after its 17% overall price drop in the wake of the earnings report. Palantir can (and likely will) be a successful AI business that will experience much growth over the next couple of years. However, the price investors must pay for the stock now is concerning. Investors who buy in at this level may not make much money on Palantir over the next few years.

I'm not a buyer at these prices. I'd need the valuation to come down even more before I'd be willing to pick up some shares.