IBM (IBM 0.16%) and Oracle (ORCL 0.49%) both struggled to pivot their legacy businesses toward the higher-growth cloud market over the past few years.

IBM was weighed down by its legacy business software, hardware, and IT services segments. Former CEO Ginni Rometty divested Big Blue's slower-growth businesses and expanded its cloud ecosystem by acquiring big players like SoftLayer and Red Hat -- but its growth remained sluggish.

Oracle transformed its on-premise database software into cloud-based services and expanded its ecosystem by buying NetSuite in 2016, but its growth remained anemic. Oracle stopped disclosing the exact growth rates of its cloud services two years ago, and co-CEO Mark Hurd -- who led that cloud transformation -- passed away last year.

Drawing of cloud with circuits inside it

Image source: Getty Images.

I compared IBM and Oracle last December, and declared that Big Blue's expansion plans, more disciplined buybacks, and higher dividend made it the better buy. However, Oracle's stock slightly outperformed IBM since I made that call, so it's time to take a fresh look at both stocks.

IBM's biggest challenges

IBM's revenue declined 3% to $77.1 billion (but stayed roughly flat after excluding divested businesses and currency impacts) last year. Within that total, its cloud revenue rose 11% (14% on an adjusted basis) to $21.2 billion. Its adjusted earnings declined 7%.

Throughout the year, the growth of IBM's cloud and cognitive software and global business services units was offset by the weakness of its global technology, hardware systems, and global financing units. However, its acquisition of Red Hat, which closed last July, buoyed its revenue growth in the second half of the year.

In the first half of 2020, IBM's revenue fell 4% to $35.7 billion. Its cloud and cognitive software revenues grew, thanks to Red Hat, as mainframe upgrades boosted its system sales. Unfortunately, COVID-19 disruptions offset those gains by reducing its technology, business services, and financing revenues, and its adjusted earnings tumbled 26%.

IBM didn't provide any guidance for the full year, but analysts expect its revenue and earnings to decline 4% and 14%, respectively. Despite those challenges, IBM's CEO Arvind Krishna, who previously led the cloud and cognitive unit before succeeding Rometty earlier this year, expects Big Blue to generate fresh revenue growth from the hybrid cloud and AI services market with a blend of Red Hat's and IBM's services.

IBM's hybrid cloud expansion boosted its adjusted cloud revenues 34% annually in the second quarter -- accelerating from its 23% growth in the first quarter -- but still couldn't offset the weakness of its older businesses. However, that balance could shift after the pandemic passes.

Oracle's biggest challenges

Oracle's revenue declined 1% to $39.1 billion (and remained flat on a constant currency basis) in fiscal 2020, which ended on May 31.

Its stable growth in cloud services and license support revenues, which accounted for 70% of its top line, was offset by a sharp drop in its cloud license and on-premise license revenues. However, aggressive buybacks boosted its adjusted earnings 9%.

Oracle spent more than 100% of its free cash flow (FCF) on buybacks over the past 12 months. By comparison, IBM spent just 4% of its FCF on buybacks during the same period. As a result, the bears often accuse Oracle of "buying" earnings growth without growing its revenues.

An IT professional checks racks of servers.

Image source: Getty Images.

But there are flickers of hope on the horizon. Oracle's NetSuite ERP (enterprise resource planning) and Fusion HCM (human capital management) apps continue to generate double-digit revenue growth while reducing its dependence on its older database services, and it expects its revenue growth to "accelerate" after the pandemic ends. During last quarter's conference call, CEO Safra Catz declared that Oracle's "mix of business is becoming increasingly favorable" as its "growing" businesses become larger than its "declining" ones.

In the first quarter of 2020, Oracle expects its reported revenue to stay flat and for its adjusted earnings to grow 5% to 9%. Oracle also didn't offer any guidance for the full year, but analysts expect its revenue to stay roughly flat and its earnings to rise 5%.

The valuations and dividends

IBM trades at just 11 times forward earnings, while Oracle has a slightly higher forward price-to-earnings (P/E) ratio of 14. Both stocks are fundamentally cheap because investors aren't expecting much growth.

However, IBM became a Dividend Aristocrat of the S&P 500 earlier this year with its 25th consecutive dividend hike, and it currently pays a hefty forward dividend yield of 5.3%. Oracle pays a much lower forward yield of 1.4%, and it hasn't raised its dividend in over a year.

The winner: IBM

IBM and Oracle both want the growth of their newer businesses to offset the slowdown of their older ones.

Oracle's near-term growth looks more stable than IBM's, but Krishna could breathe fresh life into IBM by beefing up its hybrid cloud and AI offerings. I'm less excited about Oracle's plans under Katz, who has led the company for nearly six years with little progress in growing its revenues.

IBM's higher yield and lower valuation should satisfy investors until Krishna's strategies start bearing fruit. Therefore, I'd rather stick with IBM instead of Oracle, which doesn't offer investors enough compelling reasons to stick around.