What happened

Shares of BlackBerry (NYSE:BB) have popped today, up by 14.8% as of 12:29 p.m. EDT, after the company reported fiscal second-quarter earnings.

So what

Non-GAAP revenue in the second quarter totaled $249 million, with non-GAAP earnings per share of $0.05. The Street was modeling for a breakeven bottom line, so squeezing out an adjusted profit was a welcome surprise for investors.

Interface of BlackBerry Unified Endpoint Management

BlackBerry Unified Endpoint Management (UEM) dashboard. Image source: BlackBerry.

BlackBerry hit a record in software and services sales of $196 million (non-GAAP), showing that the transition away from hardware toward higher-margin software is progressing well. BlackBerry's turnaround hinges on this transition. It's no coincidence that non-GAAP gross margin also hit a record of 76%.

Now what

"I am pleased with our strong execution in Q2. We achieved historical highs in total software and services revenue and gross margin, as well as the highest non-GAAP operating margin in over five years, reflecting our complete transformation to a software company," CEO John Chen said in a statement.

Enterprise billings jumped 19%, and BlackBerry continues to push deeper into the automotive market with its QNX operating system. The licensing business is also executing well, with licensing revenue soaring to $56 million, up from just $16 million a year ago. Hardware revenue fell from $105 million to $16 million, which is actually a good thing as BlackBerry continues to step away from that bleeding business.

In terms of outlook for fiscal 2018, total non-GAAP revenue is expected in the range of $920 million to $950 million, with non-GAAP software and services revenue forecast to grow 10% to 15%. BlackBerry expects to be profitable on a non-GAAP basis for the full year, with positive free cash flow.

Evan Niu, CFA has no position in any of the stocks mentioned. The Motley Fool has no position in any of the stocks mentioned. The Motley Fool has a disclosure policy.