Palantir (PLTR 1.40%) and Twilio (TWLO 0.20%) both saw their stocks close at record highs during the buying frenzy for growth stocks in early 2021. But Palantir has shed about 80% of its value since then, while Twilio has fared worse with a decline of nearly 90%. Both stocks were crushed as investors fretted over the companies' slowing growth, lack of profits, and exposure to rising interest rates and other macroeconomic headwinds.

But could either of these beaten-down cloud software stocks stage a turnaround over the next few quarters? Let's review their core businesses, near-term challenges, and valuations to decide.

An IT professional works on a computer in a server room.

Image source: Getty Images.

What happened to Palantir?

Palantir operates two main data mining platforms: Gotham, which is designed for government clients, and Foundry, which targets large enterprise customers. Both platforms analyze data from disparate sources to help their users make data-driven decisions. Palantir's revenue rose by 47% in 2020 and grew by 41% to $1.54 billion in 2021. But for 2022, it expects its revenue to grow just 23% to $1.9 billion.

The growth of Palantir's government business cooled off in the first half of the year as it faced competition from other third-party data mining platforms and internally developed alternatives (like RAVEn) across U.S. government agencies. The growth of its commercial business also decelerated throughout the first three quarters of 2022 as macroeconomic headwinds pressured large companies to rein in their spending on cloud-based services.

Palantir initially claimed it could grow its revenues by at least 30% annually through 2025. But it stopped reiterating that long-term goal in its earnings reports starting in the second quarter of 2022, and its latest full-year guidance suggests it could broadly miss that target.

As Palantir's top-line growth slows down, its margins are shrinking. Its adjusted gross margin declined to 80% in the third quarter, compared to 82% a year prior, while its adjusted operating margin plunged from 30% to 17%. It also remains deeply unprofitable on a GAAP (generally accepted accounting principles) basis: Its net loss narrowed from $1.17 billion in 2020 to $520 million in 2021, but widened year over year from $364 million in the first nine months of 2021 to $405 million in the first nine months of 2022.

Those losses are alarming, but CEO Alex Karp insists Palantir can still turn profitable by 2025 as it scales up its business. The company was sitting on nearly $2.5 billion in cash, cash equivalents, and marketable securities at the end of the third quarter -- so it won't go bankrupt anytime soon -- and its low debt-to-equity ratio of 0.4 gives it some room to raise cash. However, Palantir still hasn't proven that its business model is sustainable.

What happened to Twilio?

Twilio's cloud-based platform processes voice calls, text messages, and other features for mobile apps. Instead of building those features for their apps from scratch, developers can outsource the functions to Twilio with a few lines of code. Its revenue rose by 55% in 2020 and grew by 61% to $2.84 billion in 2021. But this year, management expects its revenue to rise by just 34% to about $3.8 billion.

Twilio's growth was heavily driven by acquisitions over the past several years. But in 2020, it proclaimed it could grow its organic revenue by at least 30% annually through 2024. Unfortunately, Twilio abandoned that ambitious target last quarter as macroeconomic headwinds rattled its core business.

Twilio's margins are also shrinking as its growth cools off. Its adjusted gross margin declined by 4 percentage points year over year to 51% in the third quarter as it grappled with higher carrier fees, which many telecoms started charging cloud-based services to access their networks. Its adjusted operating margin also turned negative as its costs skyrocketed.

As a result, Twilio's GAAP net loss widened from $491 million in 2020 to $950 million in 2021, then widened from $659 million in the first nine months of 2021 to $1.03 billion in the first nine months of 2022. Management insists the company's adjusted gross and operating margins will eventually bounce back toward 60% and 20%, respectively, but that won't happen anytime soon. 

Twilio recently laid off about 11% of its workforce to cut costs. It won't go bankrupt anytime soon: It ended the third quarter with $4.2 billion in cash, cash equivalents, and marketable securities, and its low debt-to-equity ratio of 0.2 still gives it plenty of room to raise funds. But it's still too early to tell if Twilio will be able to stabilize its sales growth and margins again in this tough market, especially as competitors like MessageBird, Bandwidth, and Ericsson's Vonage gradually creep into its backyard with similar cloud-based communication services.

The valuations and verdict

Palantir's enterprise value of $14.6 billion values the company at 6.3 times next year's sales, while Twilio has a forward enterprise-value-to-sales ratio of 1.5. Twilio initially looks a lot cheaper, but its lower margins and uglier losses arguably make it a much riskier investment as long as interest rates keep rising. I'm not a big fan of Palantir either -- but if I could only choose one of these beaten-down stocks as a turnaround play right now, I'd definitely pick Palantir over Twilio.