BlackBerry (BB 1.82%) and Nokia (NOK 6.11%) both rose from the ashes over the past decade. Both companies abandoned the smartphone market as their devices were marginalized by Apple iPhones and Alphabet Android devices, and they both pivoted toward different markets to survive.

BlackBerry expanded its enterprise software business, discontinued its first-party smartphone business five years ago, then licensed its brand to third-party smartphone makers. Nokia sold its handset division to Microsoft in 2014, bought its rival Alcatel-Lucent in 2016 to expand its core telecommunications equipment business, and started to license its brand out to other smartphone makers that same year.

BlackBerry and Nokia's radical transformations kept their businesses alive, and their stocks have steadily risen. Over the past five years, BlackBerry's stock rallied nearly 40% as Nokia's stock advanced about 20%. But is either of these tech stocks still worth buying today?

A child holds a cutout of a rising chart.

Image source: Getty Images.

BlackBerry faces significant challenges

BlackBerry's revenue rose 15% in fiscal 2020, which ended last February, but most of that growth came from its purchase of the cybersecurity firm Cylance, which was subsequently integrated into Spark, its unified suite of security software and services. It also generated higher licensing revenue from its patent portfolio and smartphone licensing agreements.

However, its revenue declined 14% in fiscal 2021 as it lapped the Cylance acquisition and struggled with slower auto sales throughout the pandemic. BlackBerry's QNX, which is part of its Internet of Things (IoT) portfolio, is the world's most popular embedded OS for connected vehicles. QNX had been a major growth engine for BlackBerry prior to the pandemic, but its sales plunged during the pandemic as automakers shipped fewer cars.

That decline continued throughout the first six months of fiscal 2022. Its revenue fell another 25% year over year as the global chip shortage throttled shipments of new vehicles and IoT devices. BlackBerry expects those headwinds to wane in the third and fourth quarters, but analysts still expect its revenue to decline 21% for the full year.

BlackBerry generated a slim GAAP profit back in fiscal 2019, but it turned unprofitable again in fiscal 2020. Its net loss widened significantly in fiscal 2021 but narrowed again in the first half of fiscal 2022. Analysts expect it to remain unprofitable this year. 

BlackBerry's stock isn't cheap at eight times this year's sales, and it still faces three significant challenges. First, its QNX business will likely remain under pressure until the global chip shortage ends. Second, Spark faces significant competition from other cloud-native and hybrid cybersecurity companies like CrowdStrike and Palo Alto Networks. Lastly, its organic growth is still weak since it previously relied heavily on acquisitions and patent lawsuits for growth, and it lacks a clear path toward profitability.

Nokia's turnaround looks more viable

Nokia has struggled to integrate its acquisition of Alcatel-Lucent over the past five years. Instead of investing in new 5G technologies, Nokia focused too much on cutting costs and integrating Alcatel's business. The escalating trade war also cut Nokia off from big contracts in China.

Nokia eventually suspended its dividend in 2019 to free up more cash for its 5G expansion, but it had already fallen behind its Swedish rival Ericsson (ERIC 3.14%). Instead of staying aboard to fix those issues, Nokia's CEO Rajeev Suri abruptly resigned last year.

Nokia's revenue rose 3% in 2019 but declined 6% in 2020 amid its 5G setbacks and its losses of Chinese contracts. However, its revenue rose 4% year over year in the first half of 2021 as its new CEO, Pekka Lundmark, focused on strengthening its lagging cloud and networks business. It also stabilized its 5G business and offset its loss of Chinese contracts by pulling customers away from China's Huawei and ZTE in non-Chinese markets.

Nokia's adjusted earnings fell 4% in 2019, rose 18% in 2020, then surged 167% year over year in the first half of 2021 as its gross and operating margins expanded against the pandemic's impact a year ago. Analysts expect its revenue and earnings to rise 5% and 28%, respectively, for the full year.

Those are solid growth rates for a stock that trades at just 15 times forward earnings. Nokia hasn't reinstated its dividend yet, but it could certainly do so -- and attract a lot of income investors -- if its profits continue to rise.

The obvious winner: Nokia

Nokia made some big mistakes over the past five years, but it's getting its business back on the right track as the 5G market expands. It's also consistently profitable, and its stock is fairly cheap.

BlackBerry isn't doomed yet, but its core businesses are sluggish, and it's relying too heavily on the auto sector's recovery to stabilize its business. Those challenges make it a much weaker investment than Nokia right now.