In May 2017, Twilio (TWLO -1.09%) announced it was starting to lose business from its No. 1 customer: Uber. The stock tanked as a result, and pessimism set in.

Since then, however, the company's stock has simply continued up and to the right -- returning over 450% since then. Below, I'll explain why the company has had so much success.

Large group of people in the shape of an arrow pointing up symbolizing direction , progress, or growth

Generally, this represents the direction of Twilio's stock. Image source: Getty Images.

The basics of Twilio

Before getting to those charts, though, it's important to quickly review what Twilio does. The simplest way to explain it is this: Twilio helps companies communicate with their customers. With Uber, for instance, Twilio is what enabled drivers and their customers to meet up. It can do everything from telling you when a table is ready at a restaurant to connecting a real estate broker with a potential buyer.

Customers can build their communication software on top of Twilio's platform and help manage all of their interactions with customers from a centralized location on the cloud.

Twilio has three broad categories of products:

  • Engagement cloud: This helps companies manage their contacts and deal with account security.
  • Programmable communications cloud: The most functional part of Twilio, this is where companies can manage voice, video, and messaging communications with customers.
  • The Super Network: Twilio offers a way for customers' software to connect seamlessly with their clients' mobile devices globally.

It should be noted while Twilio is already protected by a wide moat in the form of high switching costs (more on that below), the company's Super Network is becoming a major differentiator as well. In the most recent annual report, management states:

With every new message and call, our Super Network becomes more robust, intelligent and efficient, enabling us to provide better performance and deliverability for our customers. Our Super Network's sophistication becomes increasingly difficult for others to replicate over time as it is continually learning, improving and scaling. [emphasis added]

Keep that factor in mind when evaluating the company's growth in the four charts below.

Check out the latest earnings call transcript for Twilio.

Customers flocking to the service

First and foremost, Twilio is proving to be a very popular solution. Nowhere is that more evident than in the company's roster of clients.

Chart showing active customers at Twilio

Chart by author. Data source: SEC filings.

What's amazing is that the company has been able to keep these growth rates up over time. The growing roster of customers has never even clocked in below 30%. Admittedly, some of this growth has come via acquisition. But as you'll see below, it shouldn't concern shareholders too much.

Base revenue grows in kind

There are two different types of accounts that Twilio customers can choose from: either a 12-month minimum revenue commitment or a "Variable Customer Account (VCA)." In general, the VCA's are only used by large enterprise customers, and can vary widely from month to month.

As a result, it's usually more instructive of long-term trends to monitor base revenue growth, which ignores VCA revenue. And the results here have also been promising.

Chart showing base revenue growth at Twilio

Chart by author. Data source: SEC filings.

Last year, after (understandably) slowing to 49%, the base revenue growth rate reaccelerated to 62%.

It's worth noting that VCAs shouldn't be ignored. In 2018, six VCAs accounted for 9% of total revenue. Over time, however, that number has been shrinking: In 2014, VCAs accounted for 15% of revenue. 

Leverage kicking in

None of this growth would matter, however, if Twilio couldn't profit from it.

Indeed, in its three fiscal years as a public company, Twilio has registered net income of negative $227 million. Even if we back out stock-based compensation, amortization, and other one-time charges that aren't recurring, it has still lost $28 million over that time frame.

But leverage is starting to show. Revenue is growing much faster than operating expenses. Over time, that can lead to runaway profitability.

Chart showing growth rates of revenue and operating expenses

Chart by author. Data source: SEC filings. Operating expense growth presented on a non-GAAP basis.

The gap between the blue and red lines is crucial. As long as space remains between those two, the company is showing that it can bring in proportionally more business than it has to spend.

This is part and parcel of what makes the software-as-a-service (SaaS) business model so appealing. Large up-front costs to set up infrastructure are canceled out when lots of customers join. Each additional customer can be serviced at minimal cost.

Money hasn't flown to the bottom line yet because Twilio believes it has a massive opportunity to tackle. It's willing to forgo short-term profits in search of long-term market share dominance.

A widening moat

But perhaps the most important chart is the one below. At the end of the day, a long-term investment is only as good as the moat surrounding it. For Twilio, there are two key moats:

  • High switching costs: As company's build out their communication operations on Twilio, they are incentivized to stay with the system. Switching would not only be costly, but employees would have to be retrained and there could be potential downtime.
  • Network effects: As I highlighted below, the Super Network allows any Twilio customer to communicate with their clients seamlessly throughout the globe. The network gets stronger with every customer that joins, because it adds a data point to make the network more efficient.

The simplest way to measure these effects in action is by monitoring Twilio's dollar-based net expansion rate. In effect, this measures all the revenue that customers paid in Year One, and it compares it to the revenue the same group of customers made in Year Two.

By eliminating the effects of new customers, we get an idea for whether customers are staying, and -- if they are -- how much more they are spending year to year.

Chart showing dollar-based net expansion rate at Twilio

Chart by author. Data source: SEC filings.

Most companies are satisfied if this metric stays near 100%. It means they are keeping their customers. But you would be hard-pressed to find another SaaS company that puts up numbers like this.

No doubt, Twilio is helped by the fact that customers pay based on usage. With the acquisition of SendGrid, Twilio gets access to another form of mass communication: email. As you might expect, the potential for increased usage here is also very high.

That's just another reason to love the stock.

One I've missed -- so far

Twilio represents one of the stocks that "got away from me." I've been watching it for months, but have yet to make an investment. That hasn't stopped me, however, from adding it to my CAPS profile, or putting it on a shortlist for stocks to buy next month.

If you're looking for a fast-growing SaaS investment for your own portfolio, you'd be doing yourself a huge favor to investigate Twilio. The stock has very high expectations baked in, so consider buying small portions over time -- that's the plan I am looking to carry out.