Okta (NASDAQ:OKTA) is experiencing explosive growth. It is riding a secular trend of more companies adopting cloud-based solutions for cybersecurity. 

With the Okta Identity Cloud, companies can provide access to mission-critical applications to employees and contractors who may be working from somewhere other than their employer's main office. This promises to be a fast-growing market over the next decade, and Okta is in a great position to benefit.

Investors are high on the stock, but Okta has yet to show a profit. Management is plowing a lot of resources into technology and marketing to attract new clients to the platform. On a trailing-12-month basis, the company reported a net loss of $189 million.

Investors thinking of buying the stock shouldn't let that scare them away. Because nearly all its revenue is derived from subscriptions, Okta could see a gravy train of profits over the next 10 years as the business grows. Here's why.

A man's hands typing on a laptop with a white security lock hovering above the keyboard.

Image source: Getty Images.

How Okta expects to turn a profit

Okta operates as a software-as-a-service (SaaS) business. These types of businesses are by nature very profitable. Once a client is on board, the incremental cost to serve the client is low, which typically allows for margins to increase and the business to generate healthy levels of profit.

So far, the company's spending on research and development (R&D) and marketing has eaten up all the company's gross profit. Okta earns a high gross margin of 72% -- which is typical of SaaS companies -- but spending on R&D and marketing totaled about 82% of revenue over the last four quarters. Okta spends about twice as much on marketing as R&D.

However, as awareness for its offering spreads, spending on sales and marketing has been steadily falling as a percentage of revenue lately, and the company expects this to continue. In its 10-Q filing with the Securities Exchange Commission (SEC), the company states, "We expect our sales and marketing expenses to decrease as a percentage of our revenue as our revenue grows." This will eventually open up the floodgates to rapid growth in earnings.  

OKTA Sales and Marketing Expense (% of Annual Revenues) Chart

OKTA Sales and Marketing Expense (% of Annual Revenues) data by YCharts

Why marketing expense is falling relative to revenue

Okta has seen its revenue increase more than tenfold since 2015. The business has reached a tipping point where larger clients are starting to sign up for its services.

The company added 400 new customers in the third quarter, and 103 of those had an annual contract value of over $100,000. Moreover, the top 25 contracts Okta had in the third quarter had a trailing-12-month value of greater than $1 million -- the first time that's happened. 

With a larger client base, Okta expects to continue growing its revenue as it upsells those clients with additional services. Meanwhile, the cost to serve those existing customers should be much lower compared to the cost to acquire new clients through marketing.

One metric that shows how successful Okta has been at upselling existing customers to other services is the dollar-based retention rate, which has remained well above 100% every year. This metric compares the current annual contract value for existing customers with the previous year's contract value. 

So, a dollar-based retention rate of 120% -- Okta's lowest retention rate between fiscal 2015 and fiscal 2019 -- would indicate that existing customers, on average, added about 20% more value to their contract over the course of a year.

Okta's operating margin is already trending higher, thanks to the benefits of this up-sell strategy. During the third-quarter conference call, CFO William Losch said, "We continue to invest in our business as we scale for durable growth." He added, "Our better-than-expected top-line growth contributed to better-than-expected operating loss, operating margin, loss per share, and cash flow." 

The operating margin and free cash flow have been steadily trending higher over the last few years. It certainly looks like Okta is headed down a very lucrative path with its SaaS business strategy.

OKTA Free Cash Flow Chart

OKTA Free Cash Flow data by YCharts

Investors may be underestimating Okta's future profitability

Okta's current market cap of $15.5 billion looks steep for a business that is not reporting a profit.  However, most Wall Street analysts rate the stock a buy, and that's because of the potential for huge margin increases as Okta grows its business. One analyst with D.A. Davidson thinks Okta will eventually achieve a free cash flow margin of 20%-plus on annual revenue.

With a massive opportunity in the SaaS market, Okta is a stock investors may wish they had bought 10 years from now. 

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.