It's been nearly three years since Palantir (PLTR 0.44%) went public via a direct listing on Sept. 30, 2020. The data mining specialist's stock opened at $10 on the first day and nearly quadrupled to an all-time high of $39 on Jan. 27, 2021.

Bullish investors were initially impressed by Palantir's rapid growth, the resilience of its government contracts, and the expansion of its commercial business. But bearish sentiment began to spread as its growth cooled off and rising interest rates deflated its valuation. As a result, Palantir's stock plummeted to its all-time low of $5.84 on Jan. 24, 2023.

A soldier plans a mission on a laptop computer.

Image source: Getty Images.

But after reaching that nadir, the stock nearly tripled to about $16. The bulls rushed back to Palantir -- as well as many other beaten-down growth and meme stocks -- as inflation cooled off and the markets warmed up again. Can Palantir maintain that momentum and head even higher over the next three years?

What happened over the past three years?

Palantir operates two main platforms: Gotham for government clients and Foundry for commercial clients. Both collect large amounts of data from disparate sources. Its customers -- which include the U.S. military, government agencies, and big companies like BP -- use that data to make crucial decisions. Some of its work with the U.S. government, particularly its usage of a customized version of Gotham to locate and deport undocumented immigrants, has been controversial.

Palantir's revenue rose 47% in 2020 and 41% in 2021. But after repeatedly claiming it could grow its top line by at least 30% through 2025, the company's revenue only jumped 24% to $1.91 billion in 2022 -- and it expects a 14%-17% increase in 2023.

Palantir blamed that slowdown on macro headwinds that hampered the expansion of its commercial business as big companies reined in their software spending. Its year-over-year growth in commercial revenue finally accelerated again in Q1 of 2023 -- which ended its three-quarter streak of decelerating growth as its U.S. business recovered -- but its overseas commercial business remains weak.

As Palantir's growth cools off, it's cutting costs and reducing its stock-based compensation expenses. Those cost-cutting efforts enabled it to turn profitable on a generally accepted accounting principles (GAAP) basis over the past two quarters, and it expects to stay in the black for the remainder of 2023. In other words, Palantir is proving its business model is sustainable -- but its newfound stability might disappoint growth-oriented investors.

What might happen over the next three years?

Over the next three years, Palantir will likely continue to expand its commercial business to reduce its dependence on rigid government contracts. As the macro environment improves, the commercial segment (44% of its revenue in 2022) could gradually overtake the government business (56%) as its largest segment.

However, Palantir could still face some tough competitors in that market. Amazon (NASDAQ: AMZN) and Microsoft (NASDAQ: MSFT) are rolling out more data mining and analytics tools for their market-leading cloud infrastructure platforms. Other stand-alone competitors like Alteryx (NYSE: AYX) could further fragment that market.

Palantir's government business also isn't immune to competitive headwinds. For example, the U.S. Immigration and Customs Enforcement (ICE) agency has reportedly been developing its own data collection platform called RAVEn to replace Gotham. If other agencies follow ICE's lead, Palantir's government sales could abruptly wither.

Faced with all these challenges, analysts expect Palantir's revenue to only rise at a compound annual growth rate (CAGR) of 19%, from $1.9 billion in 2022 to $3.2 billion in 2025. But they also anticipate it will generate its first annual net profit of $115 million in 2023, and they see that figure more than tripling to $403 million in 2025. We should take those estimates with a grain of salt, but they suggest Palantir's growth will stabilize -- though not accelerate meaningfully -- over the next three years as the macro environment improves.

But where will Palantir's stock be in three years?

Palantir should keep growing through 2026, but its valuation could limit its gains. With an enterprise value (EV) of $32 billion, it still trades at 16 times this year sales. That EV-to-revenue ratio is arguably too rich for a company that is growing its revenue by less than 20% annually. By comparison, Alteryx -- which is expected to grow its revenue at a CAGR of 15% from 2022 to 2025 -- trades at just 3 times this year's sales.

Even if Palantir generates consistent GAAP profits and meets analysts' expectations for a GAAP profit of $0.15 per share in 2025, it already trades for more than 100 times that estimate. Therefore, it seems unlikely that Palantir will revisit its all-time highs within the next three years (unless another meme stock rally occurs). Instead, I expect the stock will languish and underperform the market as investors finally realize that its halcyon days of 30%-50% sales growth are over.