Palantir (PLTR -0.23%) didn't initially attract much attention when it went public via a direct listing last September. The data mining firm's stock opened at $10, and traded nearly sideways until November.

However, a solid quarterly report in mid-November, followed by positive buzz on Reddit and other social media networks, boosted the stock to an all-time high of $45 per share this January.

Unfortunately, a surprise loss in the subsequent quarter and the broader sell-off in tech stocks knocked the stock back to the low $20s. That roller coaster ride likely hurt many investors, while those who haven't touched Palantir yet are probably wondering if it's too late to buy this volatile stock.

Two soldiers convene with an IT professional.

Image source: Getty Images.

Palantir's core strengths

Palantir, which was named after the all-seeing orbs from The Lord of the Rings, was founded in 2003 to strengthen the U.S. government's data analytics capabilities in the aftermath of the 9/11 attacks.

Today, most U.S. government agencies -- including the FDA, FBI, CIA, ICE, and the military branches -- use Palantir's Gotham platform. Its tools were reportedly used to locate Osama Bin Laden in 2011, and it aspires to become the "default operating system for data" for the U.S. government. Over the past year Palantir signed new contracts with U.S. government agencies and expanded many of its existing deals.

Palantir's Foundry platform provides similar tools for enterprise customers and other organizations. Its notable customers include IBM, BP, and Airbus.

Last year, Palantir generated 56% of its revenue from government customers and the remaining 44% from commercial customers. Both of these platforms, which gather and crunch data from disparate sources to help organizations make quick decisions, are growing rapidly:

Revenue Growth (YOY)

FY 2019

FY 2020

Q1 2021

Government

35%

77%

76%

Commercial

17%

22%

19%

Total

25%

47%

49%

Source: Palantir. YOY = Year-over-year.

Palantir expects its revenue to rise more than 30% for the full year, while analysts expect 35% growth.

Palantir's adjusted gross margins expanded from 71% in 2019 to 81% in 2020, then rose another eight percentage points year-over-year to 83% in the first quarter of 2021. That ongoing expansion suggests Palantir's scale and reputation give it plenty of pricing power against its rivals.

Palantir's main weaknesses

Palantir's heavy dependence on government contracts could be a liability for two reasons. First, it could run out of room to grow within the confines of the U.S. government's walled garden.

Second, some of its contracts -- including one that helps ICE locate and deport undocumented immigrants -- are highly controversial. Those controversies could taint its commercial business and push potential enterprise customers toward competing services like Salesforce's (CRM -0.18%) Tableau, Splunk (SPLK), and C3.ai (AI 0.09%).

In addition to being more controversial, Palantir's stock also trades at a much higher valuation relative to  those three companies and many of their industry peers:

Company

Estimated Sales Growth
(Current Fiscal Year)

Price-to-Sales Ratio
(Current Fiscal Year)

Palantir

35%

30

Salesforce

22%

9

Splunk

14%

9

C3.ai

34%

24

Data source: Yahoo Finance, July 12.

Palantir also isn't profitable on a GAAP basis. Its net loss widened from $580 million in 2019 to $1.2 billion in 2020, then widened again year-over-year from $54 million to $123 million in the first quarter of 2021.

Even on an adjusted basis, analysts expect its non-GAAP earnings to decline 30% this year as its rising operating expenses overwhelm its expanding gross margins.

Based on those expectations, Palantir's stock trades at nearly 120 times forward earnings. Salesforce, which is consistently profitable, trades at less than 60 times forward earnings. In other words, Palantir's premium valuations could limit its upside potential for the foreseeable future.

Is it too late to buy Palantir's stock?

If you only plan to hold Palantir for a year, it might be too late to buy the stock. I personally sold a third of my position -- which I bought at an average price of about $10 -- in the high $30s earlier this year, and I don't expect the stock to revisit those Reddit-fueled levels anytime soon.

But if you plan to hold Palantir for a decade or more, I'd argue it's still not too late to buy the stock. Palantir will likely achieve its goal of becoming the default operating system of the U.S. government, and that hardened reputation could make it a top choice for large enterprise customers.

Palantir's road toward more multibagger gains will be bumpy, but I can see it expanding and evolving into an enterprise software giant like Salesforce in the distant future. That's why I plan to lock away my remaining shares of Palantir, ignore the near-term volatility, and check back on the stock in a decade.