Non-GAAP diluted net income per share was 7 cents on revenue was $200.4 million, an increase of 43 percent year-over-year.
Analysts were expecting a net loss of 2 cents per share on revenue of $186.29 million.
"The three mega-trends that have been driving our business for the past several years - the adoption of cloud and hybrid IT, digital transformation, and zero trust security - are all being accelerated globally by the current environment," CEO Todd McKinnon said in a statement. "These trends are reflected in our strong second quarter results and reflect the work that Okta is doing to help organizations around the world accelerate their adoption and deployment of cloud applications, and remote access, and re-imagine their digital customer experiences. As part of this process, organizations are re-evaluating their roadmap to modernize their identity systems and Okta's platform is the linchpin of the new cloud technology stack."
McKinnon added, "We believe that the world will not return to the pre-COVID work environment and Okta is committed to helping our customers on their journeys."
Subscription revenue was $190.7 million, an increase of 44 percent year-over-year.
Remaining Performance Obligations (RPO) was $1.43 billion, an increase of 56 percent year-over-year. Current RPO was $684.5 million, up 48 percent.
RPO is an accounting metric that gives investors more visibility into recurring subscription business. While current RPOs refers to contracts coming due over the next 12 months, the total RPO gives a glimpse into the company's overall contractual business -- including multi-year contracts.
Total calculated billings were $198.1 million, an increase of 27 percent year-over-year.
In a separate announcement, Okta highlighted a number of customer wins for the quarter. Equifax, the luxury brand LVMH Group and the State of Illinois are all adopting the Okta Identity Cloud to securely connect people to critical applications. Okta also landed new and expanded deals with Nebraska Health Information Initiative, Inc. (NEHII); Transaction Services Group; Union Bank and Trust Company; and VCU Health.
All told, Okta grew its total customers to 8,950 organizations in the second quarter.
For the third quarter of fiscal 2021, Okta expects total revenue of $202 million to $203 million. For the full year fiscal 2021, raised its revenue outlook to a range of $800 million to $803 million.