Palantir Technologies (PLTR 0.47%) has been a volatile and polarizing investment since its direct listing last September. The bulls claimed its data-mining platforms would continue to grow as it signed more government and enterprise contracts.

The bears pointed out that Palantir was too heavily dependent on government clients, its enterprise business faced too many competitors, it was deeply unprofitable, and its stock was too expensive.

Palantir's stock price has experienced some wild swings over the past year, but it has still more than doubled since its first trade at $10 per share.

Two soldiers check a screen with an IT professional.

Image source: Getty Images.

Today, Palantir is valued at $41.3 billion, or 27 times this year's sales. The bears will argue that the high price-to-sales (P/S) ratio will limit its upside, especially as rising interest rates and inflation make many high-growth tech stocks less attractive.

But let's look beyond the near-term noise and see if Palantir can still generate big multibagger gains, or even become a trillion-dollar stock, over the next two decades.

How fast is Palantir growing?

Palantir expects to grow its revenue by at least 30% annually between fiscal 2021 and 2025. That forecast implies its revenue will rise from its target of $1.5 billion this year to at least $4.3 billion in 2025.

The company expects that growth to be driven by its new and expanded contracts with government agencies, as well as the growth of its Foundry platform for large commercial customers. The accelerating growth of its commercial business over the past year, which notably outpaced the growth of its government business last quarter, supports that thesis.

Palantir's path toward a trillion-dollar market cap

Palantir hasn't provided any longer-term targets beyond 2025. But based on the growth trajectory of other big data companies like Salesforce (CRM 10.99%), its annual revenue increase could potentially decelerate and stabilize at about 20% over the following 10 years.

If it hits its target for 2025, then continues to grow its revenue at an average rate of 20% over the following 10 years, it could generate nearly $27 billion in revenue in 2035.

If Palantir's revenue growth then slows down to 15% per year, which would be more comparable to Microsoft's (MSFT 1.44%) current rate, it could generate over $53 billion in revenue in 2040.

Assuming the company is still valued at over 20 times sales, its market cap could surpass $1 trillion. But most tech giants that grow their revenue 15% to 25% annually aren't valued at more than 20 times sales.

Microsoft, which is expected to generate 17% sales growth this year, trades at 13 times that estimate. Salesforce, which is expected to generate 24% sales growth this year, trades at just 11 times this year's sales.

Therefore, Palantir's market cap could potentially hit $1 trillion by 2040, but it seems highly unlikely. Instead, it will likely be closer to $500 billion (which would still be a 12-bagger gain from its current valuation) if its stock is trading at a more reasonable P/S ratio of 10.

Look beyond the market caps

Instead of focusing on Palantir's path toward joining the 12-zero club, investors should focus on its ability to generate sustainable growth.

The company has gained a firm foothold with the U.S. government, but it still faces competition from internally developed systems. Immigration and Customs Enforcement (ICE), for example, has been developing its own platform to replace Palantir's Falcon. If other agencies follow ICE's lead, the company's dream of becoming the "default operating system for data across the U.S. government" could abruptly end.

Palantir is making solid progress in the commercial market, but its Foundry platform still faces plenty of indirect competitors like C3.ai, Salesforce's Tableau, and Glue from Amazon Web Services.

The company likely believes its reputation as a battle-hardened platform for the U.S. military and government agencies will attract more enterprise customers. But there's no guarantee that this appeal will last for decades or fend off newer, hungrier, and more disruptive players in the data-mining market.

Is Palantir's stock still worth buying?

I still believe Palantir's stock is a promising long-term investment on the secular growth of the data-mining and analytics market. However, there's a lot of growth already baked into the stock, and its high valuations could limit its near-term and long-term potential. Palantir probably won't hit a trillion-dollar valuation within the next two decades, but it could still outperform the market and generate impressive multibagger gains.