It finally happened. After seeing its stock appreciate by more than 250% just this year, Palantir (PLTR -3.72%) has now surpassed legendary defense contractor Lockheed Martin in market capitalization. The software and artificial intelligence (AI) provider for the government, military, and big business is posting strong revenue growth and inflecting profits. It just reported Q3 earnings, which has propelled the stock up 40% in the past month.

Investors are getting increasingly bullish on Palantir stock. But should they be? Here's what might come next for this hypergrowth momentum stock.

One of the world's largest defense contractors

At a market cap of $136 billion, Palantir is now one of the world's largest defense contractors. The aforementioned Lockheed Martin has a market cap of $134 billion, with competitors, such as RTX Corporation, now one of the few stocks with larger valuations than Palantir.

How did it get here? With modern software solutions for the United States military and government agencies. This disrupted the legacy systems (or where no systems existed at all), as the U.S. government is looking for best-in-class software to maintain its edge. Government contracts are large and can expand over time, which is why Palantir's U.S. government revenue keeps growing at a quick pace. Last quarter, U.S. government revenue grew 40% year over year.

But Palantir isn't only selling to the U.S. government. In recent years, it has expanded to bring its software and AI solutions to large enterprises with much success. Even though the U.S. government can spend a lot of money, it is truly just one customer at the end of the day. Hundreds of corporations could utilize Palantir's advanced analytical tools, and they are now starting to do so.

Fast revenue growth, faster customer acquisition

Accelerating demand from the U.S. government, as well as U.S. corporations, has enabled Palantir to accelerate its revenue growth. Last quarter, U.S. commercial revenue grew 54% year over year to $179 million. With the addition of the steady growth from government contracts and a slight headwind from international sales, overall revenue grew 30% year over year in the third quarter to $726 million.

Customer acquisition is growing even quicker. Total customers grew 39% year over year in Q3 and 6% from the second quarter to 629. That may seem like a small number, but remember, Palantir only targets the largest companies looking for custom-built software. The acceleration after Q3 seems to be continuing. Palantir closed 104 deals in the quarter worth over $1 million, which should turn into new revenue-generating customers in future years. Given the long-term nature of these contracts, the most important key performance metric for investors to track is customer count. If the customer count keeps rising, revenue growth will follow.

PLTR Revenue (TTM) Chart

PLTR Revenue (TTM) data by YCharts

What's next for Palantir stock?

We have talked a lot about Palantir's business. The stock is a different matter. Growth and value are tied at the hip (as Warren Buffett likes to say), meaning it doesn't only matter if a company is growing revenue quickly. It also matters what price you pay for that growth.

The good news for Palantir is that, even though growth is accelerating, profit margins have remained strong. Generally accepted accounting principles (GAAP) net income was $144 million last quarter for a margin of 20%. Once revenue growth slows down, I expect profit margins to expand to 30% or higher due to the low variable costs of running a software business.

Over the last 12 months, Palantir has generated $2.65 billion in revenue. Let's be optimistic and assume revenue growth will remain strong over the next five years, and this figure can jump to $10 billion. Optimistic for sure, but not out of the question. With a 30% net margin, that equates to $3 billion in annual earnings.

Today, Palantir has a market cap of $136 billion. Even if these earnings figures are met, the stock will be trading at a price-to-earnings ratio (P/E) of 45 in five years. That would be a steep valuation, and it is five years after monster growth estimates and margin expansion. The price you pay for a stock matters. Even though Palantir is a fantastic business, I think the stock will perform poorly over the next five years.