Twilio (TWLO 2.94%) has been an absolutely terrible investment over the past year. The current bear market has exacted a heavy toll on many stocks, but Twilio has been hit especially hard and is down 81% from its all-time highs.  

The past year doesn't tell the whole story, though, as Twilio is still beating the market since its summer 2016 IPO. Even after its precipitous fall, Twilio stock is up 210% since its publicly traded debut, compared to a total return of 192% for the Nasdaq 100 and 110% for the S&P 500 over that same time span. If Twilio can sustain its growth and start generating meaningful profits in the next few years, this stock could soar even higher.

What Twilio does

A decade-plus of cloud computing development got put to the test early in the pandemic -- and proved to be a lifesaver for countless individuals and businesses. The cloud helps unlock operational flexibility and is a big cost saver. Cloud-based communications, in particular, were especially important. Zoom Video Communications is an example of a major beneficiary, going from an obscure subscription-software provider to an overnight household name back in 2020. 

Twilio was another cloud communications provider that did well early in the pandemic. But while Zoom primarily offers a ready-to-use product, Twilio's business model is built around software building blocks (called APIs) that allow a developer to drop communications functionality into an app or website. These functions span everything from text, chat, and email to voice and video.  

In recent years, Twilio has also been building ready-to-use products as well -- like Flex, its cloud-based contact center solution that unifies multiple customer communications capabilities into one platform. Its most recent effort is customer data analytics, which Twilio is building using its acquisition of Segment last year.  

All the ingredients for a serious status-quo disruptor -- and a serious market-beater

Like Zoom, Twilio's growth rate has slowed as the early effects of the pandemic eased. However, while Zoom's growth has decelerated to a near-pedestrian pace (up only 12% year over year in the first quarter), Twilio has remained a fast-moving business.  

Organic growth (revenue minus growth from recent acquisitions) was up 35% year over year in the first quarter of 2022. That's a slowdown from the 53% organic growth in full-year 2020 and 42% in full-year 2021. However, co-founder and CEO Jeff Lawson believes Twilio can maintain at least 30% organic growth for the foreseeable future.

Up to this point, Twilio has not been a profitable company. This is the primary reason the market has turned on Twilio stock. With inflation and interest rates on the rise, high-growth stocks that operate in the red have been punished. These losses are partially by design as Lawson and company see ample opportunity to expand at a rapid pace (and thus spend gobs of cash on marketing and development), but Twilio should reach adjusted operating profitability in 2023.  

If Twilio does turn a corner and start turning a profit, shares could soar. The stock currently trades for just 4.4 times current-year expected sales. And while shareholders wait for profits, Twilio is well positioned to keep its foot on the gas. Cash and short-term investments totaled $5.2 billion at the end of March 2022, offset by debt of just $986 million. Those are deep pockets for a company with an enterprise value of just $12 billion. That not only enables Twilio to spend heavily on things like marketing but also gives it plenty of liquidity to make more bolt-on communications software acquisitions if it so chooses.

The cloud is poised for another decade of rapid deployment in the business world, and Twilio should be a top beneficiary as it helps organizations upgrade their communications for the 21st century. Besides steadily growing sales, hitting profitability could be a second tailwind that lifts Twilio higher -- an eventuality that doesn't appear to be fully priced-in to the stock. Expect the share price to be highly volatile. But after getting beaten down in the first half of 2022, Twilio looks like a fantastic long-term buy right now.