It's been a ho-hum year for both Cisco (NASDAQ:CSCO) and IBM (NYSE:IBM) in terms of stock performance. Cisco has eked out a 3% gain in 2017, while IBM's tepid results last quarter whittled away at its positive performance year to date, driving its stock price down 6%. But looking beyond the near term tells a different story for both tech giants.

Cisco still generates the majority of its revenue from network switches and routers, though CEO Chuck Robbins' shift to software-driven recurring revenue is making significant progress. For IBM, the future is all about its strategic imperatives, which include the cloud, cognitive computing, data security, mobile, and the Internet of Things (IoT).

Considering both Cisco's and IBM's transformations, the question of which is the better buy boils down to value, and one of these companies has an ever-so-slight edge.

Futuristic picture of a digitized city.

Image source: Getty Images.

The case for Cisco

Much like IBM after announcing its most recent quarterly earnings, Cisco's relatively stagnant fiscal third quarter has led to a 7% easing since sharing the news. The 1% drop in total revenue to $11.94 billion seems to have been the catalyst for the recent share price performance. A more competitive market has driven down prices, which in turn has put pressure on gross margins, adding to Cisco's woes.

Despite the drop in sales, Cisco's efforts to improve efficiency pushed earnings per share up 5% last quarter to $0.60, excluding one-time items. The 9% decrease in operating expenses to $3.8 billion also had a positive impact on operating cash flow -- to the tune of a 10% increase to $3.1 billion. Though a leaner, meaner Cisco is certainly a positive, and the results are evident, it takes a back seat to its long-term recurring revenue initiative.

A whopping $38.5 billion, equal to 31% of Cisco's total sales last quarter, was recurring revenue. And considering Cisco's 13% jump in deferred revenue to $17.3 billion, investors can expect continued improvement in building a sustainable, relatively stable foundation of growth for years to come.

Last quarter's acquisitions of business process provider AppDynamics, Advanced Analytics and its suite of data crunching solutions, and the artificial intelligence (AI) solutions of MindMeld, make it clear that Cisco is well on its way to becoming a software-focused Infrastructure-as-a-Service (IaaS) leader.

The case for IBM

The 3% drop in total revenue last quarter to $18.2 billion marked the 20th straight decline, and it got most of the headlines driving IBM's share price down 8.5% since sharing the news. But like Cisco, there were a number of areas in which IBM made a case for its stock as the better buy -- at least for investors with an eye on the long term.

The transition IBM is undergoing is taking longer to bear fruit than some pundits and investors had hoped, but it is making progress with each successive quarter and will be a key component of its upcoming second-quarter earnings release on July 18. The $7.8 billion in combined strategic imperatives sales last quarter was an impressive 43% of total revenue, already above the 40% benchmark CEO Ginni Rometty had targeted for next year.

IBM's trailing $14.6 billion in annual cloud sales puts it near the top of the provider list in a market expected to reach $246.8 billion this year, and nearly $400 billion in 2020. Though margins have taken a hit following multiple acquisitions and pricing, IBM is delivering on its own cost-cutting initiative.

Last quarter's $6.35 billion in total expenses was a stellar 17% decline thanks to a $860 million drop in sales and administrative overhead. Both Cisco and IBM are fine-tuning their businesses efficiently and effectively, and they offer two of the tech industry's best dividends of 3.75% and 3.9%, respectively. The bottom line is that Cisco is a sound long-term stock, but IBM gets the edge because it's currently even more undervalued.

Tim Brugger has no position in any stocks mentioned. The Motley Fool recommends Cisco Systems. The Motley Fool has a disclosure policy.