ServiceNow (NOW 2.63%) has grown at a remarkable rate since its initial public offering a decade ago. The digital workflow service provider's annual revenue surged from $244 million in 2012 to $5.9 billion in 2021, representing a compound annual growth rate (CAGR) of 42.5%

ServiceNow went public on July 28, 2012, at $18 per share, which valued the company at about $2.2 billion. Today, the stock trades at about $560, giving ServiceNow a market capitalization of approximately $113 billion. A $1,000 investment in its IPO would be worth nearly $31,000 today.

That makes the stock a massive multi-bagger, but could ServiceNow's stock continue to rally over the long term and boost its market cap past the $1 trillion mark by 2040?

A person works on a computer at home.

Image source: Getty Images.

A forecast of $15 billion in annual revenue by 2026

ServiceNow believes its annual revenue will grow at a compound annual rate of at least 20.5% over the next five years, reaching more than $15 billion in 2026.

It expects the digitization of businesses, the secular shift toward remote and hybrid work, and its expansion into fresh industries and geographic regions will all contribute to that growth. It could also squeeze more revenue out of its existing customer base -- which already includes about 80% of the Fortune 500 -- by adding new services to its subscription-based offerings.

Its ecosystem is already sticky. The company ended 2021 with an impressive renewal rate of 99% -- unchanged from 2020 -- while its remaining performance obligations -- a key measure of a software company's forward demand -- increased 32%.

ServiceNow is part of the global workflow management services market, for which Grand View Research forecasts a CAGR of 30.6% between 2021 and 2028. The magnitude of that industry-wide tailwind suggests that ServiceNow could easily surpass its guidance for 2026.

The company also turned profitable on a generally accepted accounting principles (GAAP) basis in 2019, and it has stayed in the black ever since. Its bottom line has been bumpy, mainly due to its ongoing investments, but its earnings growth should stabilize as it scales up its business.

But can it continue to grow until 2040?

ServiceNow hasn't presented any forecasts beyond 2026, but its growth will likely decelerate from there if it's generating $15 billion in annual revenues -- a top line that would be comparable to Adobe's (ADBE 1.29%) today. Analysts expect Adobe's revenue will rise by percentages in the mid-teens in 2022 and 2023.

If ServiceNow generates $15 billion in revenue in 2026 and then achieves a more modest CAGR of 12% for the decade that follows, it would generate about $47 billion in revenues in 2036.

From there, if it manages a CAGR of just 10%, its annual revenue would hit $70 billion in 2040.

Pairing that growth rate with a reasonable price-to-sales ratio of 10 (being conservative, this is about half of the present ratio), it could be worth about $700 billion by 2040. That would fall short of the 12-zero mark, but would still make it a cloud software giant

Looking beyond market caps

That's all speculation for now, but ServiceNow's growth over the past decade shows that it has carved out a high-growth niche in the crowded cloud services market. Its confident five-year outlook also suggests it isn't worried about larger cloud companies disrupting the digital workflow space.

A lot could happen between now and 2040. Recessions, pandemics, wars, and technological advances could either generate headwinds or tailwinds for ServiceNow's core business. It could acquire a lot of smaller companies, expand beyond digital workflow management services, or get gobbled up by a larger cloud company.

But based on what we know today, ServiceNow looks like a solid long-term investment. It's growing, it's profitable, and most of America's largest companies already use its services. This stock could easily generate more multi-bagger gains over the next two decades -- even if it doesn't join the elite club of trillion-dollar tech titans.