If you don't already know about them, software-as-a-service (SaaS) stocks are worth researching. Companies that develop truly helpful software benefit from a slate of advantages: reliable and recurring revenue, moderately high switching costs to lock customers in, the ability to develop new tools based on data gathered, and the fact that it's virtually free to grant access to software.

Today, we'll be investigating two leaders in this realm. Zendesk focuses on software solutions to help companies track their interactions with customers. Veeva Systems has developed a suite of solutions to help drug companies bring their products through trials and to the market.

But between the two, which is the better buy today?

Young woman holding a tablet computer while sitting in a chair with SaaS written on the wall behind her

Image source: Getty Images

Obviously, we can't know that with 100% certainty. Instead, we can compare these SaaS stocks on three key criteria and see which comes out ahead.

Financial fortitude

First, we'll evaluate financial fortitude. By this, what I'm really looking for is how a company would be affected by some type of financial crisis. Believe it or not, companies with lots of cash, little debt, and strong free cash flow can actually get stronger from such times.

How is that possible? They can acquire start-ups, buy back their own shares at depressed prices, or simply outspend their rivals to grab long-term market share.

Keeping in mind that Veeva is valued at two-and-a-half times the size of Zendesk, here's how they stack up.

Company Cash Debt Free Cash Flow
Veeva Systems (NYSE:VEEV) $1.5 billion $0 $423 million
Zendesk (NYSE:ZEN) $819 million $477 million $40 million

Data source: Yahoo! Finance. Cash includes long- and short-term investments. Free cash flow presented on a trailing-12-month basis.

Both of these balance sheets are solid, but one is clearly better. With absolutely no long-term debt and very strong free cash flow, Veeva would likely benefit more from some type of downturn.

Winner = Veeva


Next, we have valuation. This isn't as simple as looking at a stock price, or the market cap of a company. Unfortunately, there isn't one single metric that can reliably tell us if a stock is expensive or cheap. Instead, I like to consult a number of different ones.

Company P/E P/S P/FCF PEG Ratio
Veeva 69 21.0 50 3.1
Zendesk 245 11.3 213 4.9

Data sources: Yahoo! Finance and E*Trade. Non-GAAP earnings used to calculate P/E when applicable.

Veeva is expensive. It trades for 69 times earnings. To put that in perspective, the average S&P 500 company trades for 24 times earnings. Hypothetically speaking, Veeva's PEG ratio (which factors in growth rates) means that it's probably trading for three times what it's worth.

But as expensive as Veeva might seem, Zendesk is even more expensive -- in terms of earnings, free cash flow, and even when we take growth into consideration.

Winner = Veeva

Sustainable competitive advantages

Finally, we need to evaluate the companies' sustainable competitive advantages -- aka their moats. Over the long run, the moat is probably the single most important thing in determining how your investments pan out. Companies with moats keep the competition at bay for decades, which leads to compounding in your portfolio.

Both of these companies benefit primarily from high switching costs. As a company uses more and more of Zendesk's offerings, its employees get used to using the interface. They also store tons of data on the platform. And Zendesk has had no problem attracting new customers.

Veeva Systems, on the other hand, offers two key products. The Commercial Cloud allows drug companies to manage relationships with their sales force and their clients. Veeva Vault, on the other hand, is a cloud application with a dizzying number of tools that help a drug company do everything necessary to bring a drug to market. 

In the end, I believe the switching costs are higher for Veeva's customers. When a company collects clinical data, has to follow regulatory guidelines, and trains enormous workforces on an interface, it's a huge pain to switch providers.

I'm not saying that switching away from Zendesk would be easy, per se, but I simply can't imagine a scenario where it would be more difficult than what a drug company leaving Veeva would have to go through.

Winner = Veeva

My winner is...

So there you have it: Veeva wins on all three metrics. Don't let this stop you, however, from looking at both companies. Because of the nature of this article, I had to choose a winner. But in real life, I actually own shares of both companies. Not surprisingly, my family has a larger position in Veeva. But combined, they account for 8% of my real-life holdings.

While I don't think this means you should run out and buy these stocks right away, I believe they're both worthy of your consideration heading into 2020.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.