Palantir Technologies (PLTR 2.13%) last year delivered the best performance in the S&P 500 index, and the artificial intelligence (AI)-driven software company may be on track to repeat that. So far this year, the stock has posted the biggest gain in the benchmark, advancing nearly 100%. The reason behind all of this excitement is clear: Palantir has reported surging demand from commercial and government customers, and that's translated into an explosion in revenue growth.
The company is benefiting from commercial and government interest in AI as one of its systems in particular -- known simply as the Artificial Intelligence Platform (AIP) -- helps customers immediately apply AI to their individual situations. Palantir's successes so far and the general forecast for an AI market valued at more than $2 trillion a few years down the road offer us reason to be optimistic about the company's growth.
Still, some analysts aren't convinced the stock can keep up the current pace and expect it to fall -- possibly by about 30% according to the average Wall Street price forecast -- in the coming 12 months. So far, though, the stock has been going strong and even reached a new record high. Considering all of this, should you buy at the high or avoid this highflyer? Let's find out.

Image source: Getty Images.
Palantir's booming business
First, let's talk a bit about Palantir's business. The 20-year-old company makes software that helps customers aggregate their data -- sometimes data that's otherwise inaccessible or unused -- and analyze it to make game-changing moves. In the company's early days, the U.S. government was its primary customer, and though government revenue continues to be a big part of the Palantir picture, it now is sharing space with a commercial audience.
Commercial customers, eager to apply AI to their businesses, have rushed to Palantir's AIP in particular, and that's helped commercial revenue climb in the double digits quarter after quarter. Deal size and the number of commercial customers both are on the rise too, showing general momentum across this business. For example, in the recent quarter, U.S. commercial remaining deal value climbed in the triple-digits to more than $2 billion. And the company now has hundreds of commercial customers, up from just 14 four years ago.
The government business also may be a big growth driver in the future as the U.S. government puts a focus on efficiency. Palantir recently announced Warp Speed for Warships, a new program to modernize shipbuilding for the Navy. The company's technology -- involving a secure platform loaded with data, models, and tools for decision-making -- will be used to digitally connect shipbuilders, suppliers, and other key partners.
Balancing revenue and profit
All of this has equaled growing revenue for Palantir, but importantly, the company has managed to also ensure profitability -- its Rule of 40 score of 83% illustrates this. For software companies, a score of 40% means a company has balanced growth and profitability, so well above this level, Palantir is winning big in this area.
This complete picture has made Palantir a very attractive stock, prompting investors to pile in -- and sending valuation soaring. Today, the stock trades for an eye-popping 256 times forward earnings estimates. As mentioned, some analysts predict declines from this level in the coming months.
Now let's return to our question. Considering the complete picture, is Palantir a buy now after reaching its latest record high, or is it just too expensive? There's no denying that Palantir's valuation looks steep right now, but it's important to keep in mind that these metrics take into account earnings over the coming year or in the recent past -- they don't incorporate potential over the coming five to 10 years, for example.
So, when looking at a very innovative tech stock, it's sometimes difficult to rely on valuation metrics. In some cases, when a player looks very strong -- such as in the case of Palantir -- and you're aiming to hold on for the long term, it's worth buying. It's possible -- and even likely -- this high-flying stock may take a pause or decline at some point, but Palantir has what it takes to advance significantly over the long term. And that means investors who buy the shares today at the current high still may have a lot to gain a few years down the road.