Software stocks have gotten crushed in 2022.

Sky-high valuations coming into the year, rising interest rates, and macroeconomic pressures have led to a collapse in share prices nearly across the board.

Amplitude (AMPL 4.02%), a small-cap software-as-a-service (SaaS) stock that went public through a direct listing last September, is no stranger to the market pain. The stock intially soared in its debut but plunged sharply after it slashed its guidance in February, and the stock has yet to recover.

However, Amplitude's latest earnings report shows why this under-the-radar stock could be a long-term winner.

New customers are flocking to the platform

Though a number of cloud software companies have said that sales cycles are lengthening as businesses prepare for a possible recession, Amplitude reported its best quarter ever for new customer bookings, a sign that businesses see a good value and return on investment (ROI) in its products. That drove revenue up 35% year over year to $61.6 million, topping estimates of $60.2 million.

Amplitude helps businesses mine data to gain insights and improve their products. For example, its software helped Peloton recognize the benefit of social interaction in its classes. It also guided Burger King's Whopper Detour campaign, which offered a Whopper for a penny to customers who were near a McDonald's when they downloaded the Burger King app.

Among the new customers Amplitude added in the third quarter were Zillow, VolkswagenShell, and Fox Corporation, and the company said it was seeing strong growth interest from digital natives like Zillow. Since Amplitude's revenue model is "event-driven," meaning customers pay based on the number of digital events like clicks or app downloads that they analyze, it helps to have customers like Zillow with a lot of digital events.

On the earnings call, CEO Spenser Skates said, "Our customers tell us that Amplitude delivers better ROI than their existing solutions. We can provide insights that were not possible with other means, and our self-service approach is more scalable."

Management did say it wasn't immune to the macroeconomic headwinds. CFO Hoang Vuong explained in an interview with The Motley Fool the company was seeing longer sales cycles, in particular in Europe, as well as challenges with its small business customers who are feeling the economic slowdown.

What's next for Amplitude

The company was sober about the macroeconomic challenges ahead. Vuong said on the earnings call: "Our base case is that higher churn and lower event volume base expansion will persist through the first half of 2023. If the environment continues to deteriorate, the shape of the curve could be longer. Given the net retention rate is a trailing 12-month number, we expect it to decline."

The net retention rate was 123% in the third quarter, meaning it grew revenue from existing customers 23% on a trailing 12-month basis. 

However, the company looks well-positioned to deliver for investors when the economy turns. Its free-cash-flow losses continue to narrow, coming in at $3.9 million, or 6% of revenue, and Vuong said the company was aiming to be free-cash-flow positive in three to five years. 

An economic downturn could be tough on Amplitude as companies are more likely to spend on its software when the economy is strong, especially if it's a new type of product. As Skates said on the call:

We are helping shape an early category of software. We're seeing some signs that we're even earlier in the category than we initially thought. Many of our new customers are digital natives who are already familiar with product-led growth, yet they still need Amplitude to understand their customer journey and build better product experiences.

He also said customers are still in the "first inning" with product data, meaning the market is wide open.

Amplitude now trades at a more moderate price-to-sales ratio of 6.8 based on this year's forecasted revenue. With an addressable market of $37 billion, the upside potential for the cloud stock is considerable if it can execute on its product data vision and deliver profitability in a few years.