Twilio's (TWLO -0.73%) stock price has been slashed in half over the past six months as macro headwinds battered high-growth tech stocks. Yet over the past five years, shares of the cloud-based communications service provider have risen more than 430%, crushing the S&P 500's 90% gain.

Twilio's impressive but volatile rally was driven by dazzling top-line growth. Between 2016 and 2021, annual revenue grew at a compound annual growth rate (CAGR) of 59.3% as the number of active customer accounts surged nearly 600% from 36,606 to 256,000. But can Twilio maintain that momentum over the next five years and drive its stock to new all-time highs?

A person uses a smartphone while drinking coffee outside.

Image source: Getty Images.

Twilio's secular tailwinds

Twilio's cloud-based platform handles text messages, voice calls, videos, two-factor authentication, and other features for mobile apps. Developing those features from scratch can be time-consuming, buggy, and difficult to scale as an app gains more users, so it's usually easier for developers to outsource those services to Twilio with a few lines of code.

Today, Twilio works behind the scenes with major companies, helping Airbnb guests contact hosts, Lyft drivers reach passengers, and the American Red Cross connect with volunteers. This positions Twilio to benefit from the growth of the mobile app market at large and from the increased communication needs of individual apps. According to Technavio, the global mobile app market could grow at a CAGR of nearly 21% between 2021 and 2026. The global cloud communication market is also estimated to expand at a CAGR of 25.3% between 2021 and 2028, per Research and Markets. 

Ambitious long-term targets

If Twilio merely keeps pace with those two booming markets, its revenue could grow at least 20% to 30% annually for the next five years. But last year, Twilio predicted that organic revenue, which excludes the benefits of acquisitions, would grow by more than 30% annually over the following four years. The company then outperformed its own estimates: organic revenue rose 42% in 2021. In its fourth-quarter conference call, Twilio leadership reiterated confidence in delivering on its long-term target of 30%-plus growth over the next several years.

That confident forecast suggests Twilio will grow faster than the broader market and remain ahead of competitors like MessageBird, Bandwidth, and Vonage's Nexmo.

By growing organic revenue at a CAGR of 30% between 2021 and 2026, Twilio's annual revenue would rise from $2.8 billion to $10.5 billion. But if it continues to acquire smaller companies, as it has ever since its public debut in 2016, reported revenues could come in even higher.

Will Twilio ever generate a profit?

While Twilio's revenue outlook is rosy, it remains deeply unprofitable on a generally accepted accounting principles (GAAP) basis. The company was profitable on a non-GAAP basis from 2018 to 2020, but bled red ink again in 2021 as it integrated recent acquisitions and ramped up spending.

Twilio's non-GAAP gross margins also slipped from 58% in 2019 to 51% in 2021. That ongoing compression can be attributed to competitive headwinds, Twilio's integration of lower-margin businesses, and new wireless fees charged by major carriers for network access.

Those declining gross margins, along with the company's high stock-based compensation expenses (22% of its revenues in 2021), will likely prevent Twilio from generating any sustainable profits over the next five years. On the bright side, Twilio expects its non-GAAP gross margin to eventually stabilize and climb above 60% as the company scales up its cloud infrastructure.

However, Twilio's share count -- which has more than doubled over the past five years -- will likely continue to rise as the company subsidizes its salaries and investments with its own shares. That ongoing dilution would be worrisome if Twilio's stock were still trading at nosebleed valuations, but it now trades at a reasonable seven times this year's sales. Therefore, even if the company continues to issue new shares, it could still be attractively valued.

Will Twilio generate more multibagger gains?

Twilio's annual revenue could easily quadruple over the next five years if it maintains its goal growth rate of more than 30%. It might also stabilize its losses as gross margins rise again. If Twilio stays ahead of its competition and continues to expand its cloud communications ecosystem, I fully expect this stock to generate more multibagger gains over the next five years.