With the stock market turning firmly negative in recent months, it's important to try putting things in historical context. Investors have seen shares of many companies get cut in half or more. It happens from time to time. Some deserved it. Others have great businesses in rapidly expanding industries.

Software-as-a-Service (SaaS) stocks are an example. Although valuations are lower, the businesses continue to perform well. That's why I thought it would be useful to look back a decade at former highflying SaaS stocks -- first, to see if they also experienced a significant decline in the price-to-sales (P/S) ratio, and second, to see if their growth was able to overcome the valuation crunch and make them good investments over the long term.

Here's what I found.

A hand with a needle set to prick a bubble with a dollar sign inside of it.

Image source: Getty Images.

An impressive cohort

Five of the most high-profile -- and expensive -- tech stocks to go public in 2012 were Workday (WDAY 1.18%), Splunk (SPLK), Palo Alto Networks (PANW 2.71%), and ServiceNow (NOW 2.37%). Respectively, they offered software to manage and analyze human capital, machine data, cybersecurity, and information technology workflows. The largest initial public offering (IPO) of 2012 was Meta Platforms (META 1.89%) -- it was just Facebook back then. It isn't SaaS, but it belongs in any analysis of 2012 IPOs.

Creating a somewhat similar cohort of tech companies that have come public in the past few years isn't difficult. We'll compare the 2012 group to Snowflake (SNOW 3.03%), CrowdStrike (CRWD 2.00%), DataDog (DDOG 3.48%), Cloudflare (NET 3.07%), and MongoDB (MDB 4.75%). Let's compare the numbers.

Growing into their valuation

If we're going to make a comparison to the past, we need to first establish just how expensive the stocks were. We'll use the beginning of 2013 -- the year after their IPO -- as a starting point to find their peak valuation.

Company Peak P/S Ratio
Workday 42
Splunk  33
Palo Alto Networks  19
ServiceNow  27
Meta Platforms 23

Data source: YCharts.

They were all growing sales between 50% and 90% per year. That's similar to today's cohort of beloved tech stocks. All but ServiceNow saw their P/S ratio decline over the next decade.

WDAY PS Ratio Chart

WDAY PS Ratio data by YCharts

Declining valuations don't mean bad investments

Even with declining valuations, every one of the stocks has significantly outperformed the S&P 500 Index since the beginning of 2013. That's no guarantee for the future. But it should lay to rest any notion that just because a stock has a high valuation, it will trail the market. Before ascribing the outperformance to the pandemic, you should know the outperformance holds true even if you use 2017, 2018, or 2019 as the ending point.      

WDAY Chart

WDAY data by YCharts

The current cohort of stocks

Like the standouts from the IPO class of 2012, some of the most popular tech stocks now are all growing between 50% and 100% annually. It's rare company and deserves a premium. But even after having their P/S ratios cut in half or more, the current batch of stocks are still trading at a higher valuation than the 2012 cohort was at their peak. 

Company Peak P/S Ratio Current P/S Ratio Decline
Snowflake  143 42 71%
CrowdStrike 67 31 54%
DataDog  69 36 48%
Cloudflare  114 41 64%
MongoDB  47 26 45%

Data source: YCharts.

Applying the lessons of the past

That means if history is a guide, there could be a lot farther for valuations to fall even for the best-performing businesses. On the bright side, the growth of the businesses could more than make up for it. In fact, they may still crush the market in the years ahead. Every one of our 2012 cohort did.

That highlights perhaps the most important lesson investors can learn from this analysis: The price you pay for shares matters, but maybe not as much as some would have you believe. Great companies typically make great investments even when they're priced at what seem like elevated valuations.

When the mood on Wall Street turns dark, they're often the first to get punished. But bad moods don't last forever. And over a span of multiple years, the performance of the business takes over. That's why investors should focus on the business results and not the stock price. The group above are all down between 30% and 60% from their peak.  Shareholders need to accept that they could fall further. But if the businesses keep performing, they're likely to still make great investments.