Palantir (PLTR -0.23%), the data mining company that generates most of its revenue from U.S. government contracts, recently posted its first quarterly report as a public company. Let's examine the five most important numbers from that report, and see if they suggest the stock is worth buying.

1. 52% revenue growth

Palantir's total revenue rose 52% year over year to $289.4 million during the third quarter of 2020, beating estimates by $10.1 million.

It secured three major deals during the quarter: a $91 million contract with the U.S. Army, a $36 million contract with the National Institutes of Health, and a $300 million contract renewal with an unnamed aerospace customer.

A soldier uses a tablet.

Image source: Getty Images.

2. 56% of revenue from Gotham

Palantir operates two main platforms: Gotham for government customers and Foundry for enterprise customers. Both services gather information on users from disparate sources to craft actionable data.

Gotham accounted for 56% of Palantir's revenue during the quarter, up from 51% a year earlier, while the remaining 44% came from Foundry.

The bears often cite Palantir's growing dependence on government customers as a weakness, for two reasons. First, Palantir already serves most of America's government agencies, including the Department of Defense, FBI, CIA, the Centers for Disease Control and Prevention, and Immigration and Customs Enforcement (ICE). Those contracts will generate stable revenue for Palantir, but it's ultimately a limited market.

Second, several of those contracts -- especially its ICE contract for tracking undocumented immigrants -- are highly controversial. Palantir already faced internal revolts regarding its ICE contract, demands from employees at Amazon (AMZN -1.64%) Web Services to stop hosting Palantir's services on its cloud platform, and protests from activist groups.

Ideally, Palantir should expand Foundry to reduce its dependence on Gotham. Foundry's revenue rose 35% year over year to $126.8 million during the quarter, as it pulled a "major consumer goods company" from an unnamed rival, but it still couldn't keep pace with Gotham, which grew its revenue 68% year over year to $162.6 million. The aforementioned U.S. Army contract, which will bolster its artificial intelligence (AI) and machine learning capabilities over the next two years, significantly boosted Gotham's revenue.

Looking ahead, investors should see if Foundry's growth accelerates and its weight on Palantir's top line increases. If not, Palantir's dependence on the U.S. government will remain a double-edged sword.

3. 38% growth in average revenue per customer

Palantir ended the quarter with 132 customers, up from 125 at the end of the second quarter. That number might seem low, but each of those large customers generates millions of dollars in revenue.

In the first nine months of 2020, its average revenue per customer rose 38% year over year to $5.8 million. Its average revenue for its top 20 customers also grew 36% to $23.6 million.

Palantir generated 61% of its revenue from those top 20 customers during those nine months, down from 68% a year earlier. That diversification is encouraging, but the company will still rely heavily on those top customers -- which are probably mostly Gotham users -- for the foreseeable future.

4. A net loss of $853 million

Palantir's top-line growth looks solid, but its net loss widened year over year from $139.9 million to $853.3 million. That trickled down to a loss of $0.94 per share, which broadly missed analyst expectations by $0.77.

Most of that loss was attributed to $847 million in stock-based compensation (SBC) expenses related to its direct listing in September. But excluding those messy SBC expenses, its gross margin actually expanded year over year from 71% to 79% during the third quarter.

On a non-GAAP basis, which excludes its SBC and direct listing expenses, Palantir posted a positive operating margin of 25%, compared to a negative operating margin of 48% a year ago. It also hiked its full-year non-GAAP operating income forecast from $116 million-$126 million to $130 million-$136 million.

Based on those improvements, Palantir's GAAP losses could also narrow after it moves past the SBC and direct listing costs from its public debut. Until then, its cash and equivalents of $1.8 billion -- which rose from $1.1 billion from the end of 2019 -- should cushion it from future losses.

5. Less than 22 times next year's sales

Palantir currently expects its revenue to rise 44% for the full year, compared to its prior forecast for 42% growth. It also expects its revenue to grow more than 30% in fiscal 2021.

Based on those estimates, Palantir's stock trades at 28 times this year's sales and less than 22 times next year's sales. Those valuations might seem high, but they're actually much lower than the price-to-sales ratios of some other recent high-growth tech IPOs.

The key takeaway

As I've mentioned before, ongoing concerns about Palantir's controversial government contracts, lack of profits, and insider selling likely prevented its stock from blasting off after its public debut. However, Palantir seemingly shook off those concerns over the past month as its stock price surged more than 60%.

Palantir will remain a controversial stock, but investors shouldn't ignore its robust revenue growth, expanding margins, and reasonable valuation. It could also be a great stock to own during a recession, since its government contracts are well-insulated from macro headwinds.