If you don't know what SaaS stands for, you're already behind. Companies that offer software-as-a-service -- SaaS -- design cloud platforms with software for customers to use from any connected device around the world. There's no need to download any hardware, and instead of a big up-front purchase, customers pay monthly subscription fees.

That ends up being better for both parties, as customers are more willing to fork over smaller amounts of money at a time, while SaaS providers know that -- in the long run -- there's much more money to be made from subscriptions.

A person touching a cloud computing icon

Image source: Getty Images.

Two companies enjoying this trend are Shopify (SHOP 1.26%) and Zendesk (ZEN). The former offers a platform for managing an e-commerce presence for small and medium-sized businesses, while the latter aims to help keep track of customer data for the very market of companies.

But which is the better stock to buy today? There's no way to answer that question with 100% certainty, but by looking at it through three different lenses, we can get a better idea for what we're paying for when we buy shares. Here's how the two stack up.

Sustainable competitive advantages

There's absolutely nothing more important when it comes to long-term investing than figuring out just how strong a company's sustainable competitive advantage -- often referred to as a moat -- really is. In the most basic sense, a moat is what makes the company unique. It is what will keep bringing customers back, year after year, while holding the competition at bay for decades.

Both Zendesk and Shopify benefit from a powerful moat: high switching costs. Imagine having all of your customer service data (Zendesk) or all of your e-commerce presence (Shopify) managed from a single platform. Now imagine the headache -- both financially and operationally -- of changing providers. That gives you an idea for why customers tend to stick with both of these players.

To determine a winner, I think it's instructive to see which has more momentum going forward. The reason I say that is because when switching costs are high, grabbing market share as quickly as possible is paramount. Unless your competitors come out with a really terrible service, the window to snatch away potential customers closes quickly.

Here's how Shopify and Zendesk stack up in some key metrics.

Growth at Zendesk and Shopify
Create column charts

Both companies put up strong numbers, but Shopify gets the edge. The company started with a smaller revenue base and has eclipsed Zendesk -- and it has superior growth rates in winning over customers. Additionally, Amazon, Facebook, and eBay have all decided to partner with Shopify as the preferred sales channel for merchants.

Winner = Shopify

Financial fortitude

Because both of these companies are small and unprofitable, having cash in the bank matters. Even after they become profitable, keeping a large pile of cash on hand makes a huge difference.

That's because, at one point or another, every company is going to have to deal with tough economic times. Whether they are macro or company-specific in nature, those who enter these periods with lots of cash on hand usually emerge stronger: They can buy back shares on the cheap, acquire rivals, and outspend the competition.

While neither Shopify or Zendesk is at the point where there's excess cash flow coming in, here's how the two stack up in terms of financial fortitude.

Company

Cash

Debt

Net Income

Free Cash Flow

Shopify

$395 million

$0

($39 million)

($6.4 million)

Zendesk

$315 million

$0

($104 million)

$5.2 million

Data source: SEC filings, Yahoo! Finance, Unilever IR. Net income and free cash flow presented on trailing-12-month basis.

There's a lot going on here. First of all, both companies have solid balance sheets with absolutely no long-term debt. At the same time, both are unprofitable, and both are right in the ball park of breakeven cash flows.

While Zendesk technically has a slight edge because of its positive free cash flows over the past 12 months, I put both companies in exactly the same boat: risky because they aren't profitable, but about as good as you can get from a balance sheet perspective.

Winner = Tie

Valuation

Finally, we have the murky science of valuation. While there's no single metric that can tell you if a stock is cheap or expensive, there are a number of data points we can consult. Here are the three that I like to use.

Company

P/FCF

P/S

EV/Revenue

Shopify

N/A

22.0

18.3

Zendesk

534

8.3

7.6

Data source: Yahoo! Finance, Y! Charts E*Trade. P/E calculated using non-GAAP earnings when possible. N/A = not applicable.

Here again we have an odd case: it's extremely difficult to get a pulse on how expensive either of these stocks are. That's because they're still so young, and aren't profitable. I think therefore that the best proxy is to look at the price-to-sales and enterprise-value-to-revenue ratio of each. On those metrics, Zendesk is a much cheaper option.

Winner = Zendesk

My winner is...

So there you have it: We have a draw. Both companies are risky because they're unprofitable, but they also have excellent balance sheets. Shopify has a wider moat, while Zendesk has a more favorable valuation today.

Whenever I have a tie, I declare the company with the stronger moat to be the winner. In this case, that's Shopify. But I actually own both of these stocks, and consider them both worthy of your investment dollars.