Better Buy: HP Inc. vs. International Business Machines Corp.

HP (NYSE: HPQ) and IBM (NYSE: IBM) are often considered mature tech plays that are owned for stability and income instead of growth. However, shares of HP have surged nearly 50% over the past 12 months, easily crushing the S&P 500's 14% gain and IBM's 8% growth during the same period. Let's discuss why HP flourished as IBM floundered, and whether or not both stocks will continue on their current trajectories this year.

How HP and IBM evolved

HP and IBM have both evolved significantly over the past few years. HP split with Hewlett-Packard Enterprise (NYSE: HPE) in late 2015. After that split, HP retained the company's PC, printing, and imaging businesses, while HPE retained the enterprise hardware and software units. The PC and printing markets seem like slow-growth ones, but HP is carving out new niches in both markets with premium laptops, 2-in-1 devices, mobile printers, and industrial 3D printers.

HP's curved all-in-one Envy. Image source: HP.

IBM has shrunk itself by divesting many of its non-core assets. It sold its PC and x86 server businesses to Lenovo, paid GlobalFoundries to take overits chip manufacturing business, and divested other lower-margin businesses. It then invested its cash into its five higher-growth "strategic imperatives" of cloud, analytics, mobile, social, and security-related businesses. Big Blue's core strategy is to grow those five businesses fast enough to offset ongoing declines at its aging IT services, hardware, and software businesses.

How fast are HP and IBM growing?

HP and IBM are both slow-growth companies. HP's revenue fell 6% to $48.2 billion last year, but analysts expect 1% growth thisyear. That slight recovery is attributed to warming sales of PCs, which boosted its Personal Systems (PC) revenues by 10% annually to $8.2 billion during the first quarter. That growth wasmainly supported by rising demand for its premium convertibles, detachables, and thinner devices with longer-lasting batteries.

HP's printing revenue fell 3% annually to $4.5 billion during the quarter, due to weak growth in commercial hardware and supply sales. However, HP also noted that sales of its mobile printers (for smartphones) were robust, that big enterprise customers were placing orders for its new 3D printers, and that its planned takeover of Samsung's printing business would enable the business to scale up.

IBM's revenue has declined annually for 20 consecutive quarters, indicating that the growth of its strategic imperatives still isn't offsetting declines in its older businesses, which are weighed down by sluggish enterprise spending and competition from nimbler rivals. Big Blue's total revenues dropped 2% annually to$79.9 billion last year, and analysts anticipate another 2% decline this year.

IBM's Watson being used on mobile devices. Image source: IBM.

Last quarter, IBM's strategic imperatives revenue rose 12% annually to $7.8 billion and accounted for 42% of its revenue over the past 12 months. But that growth still didn't prevent its total revenue from dropping 3% to $18.2 billion for the quarter. The only bright spot was that its Cognitive Solutions revenue -- which includes its closely watched Watson and cloud AI businesses -- rose by 2%. Meanwhile, revenue at all of its other main business segments (business services, technology services and cloud platforms, systems, and global financing) declined year-over-year.

Profitability, dividends, and valuations

HP and IBM both use buybacks to boost their earnings. HP spent $702 million, or 19% of its free cash flow (FCF), on buybacks over the past 12 months. IBM spent $3.68 billion, or 32% of its FCF, on buybacks during the same period.

That's how HP grew its non-GAAP earnings by 10% in fiscal 2016. But looking ahead, analysts expect that figure to rise less than 1% this year and about 5% next year. IBM's non-GAAP earnings fell 9% in fiscal 2016 (due to a gradual decline in buybacks), and analysts anticipate less than 1% growth this year and 2% growth next year.

Both companies have plenty of cash to fund their dividends. HP pays a forward yield of 2.9%, which is supported by a payout ratio of 33%. IBM pays a forward yield of 3.5%, which is supported by a payout ratio of 44%. Those low payout ratios indicate that both companies have plenty of room to raise their dividends.

HP trades at just 12 times earnings, which is much lower than its industry average of 20. IBM trades at 13 times earnings, which is also a discount to its industry average of 19. However, HP's price-to-sales ratio of 0.7 is significantly lower than IBM's P/S ratio of 1.9.

The winner: HP

It's a close call, but a simpler business model, a recovering PC market, and an evolving printing business all make HP a better buy than IBM at current prices. IBM offers a better dividend, but its strategy of growing its strategic imperatives to offset slowdowns at its other aging businesses simply isn't paying off yet.

10 stocks we like better than IBMWhen investing geniuses David and Tom Gardner have a stock tip, it can pay to listen. After all, the newsletter they have run for over a decade, Motley Fool Stock Advisor, has tripled the market.*

David and Tom just revealed what they believe are the 10 best stocks for investors to buy right now... and IBM wasn't one of them! That's right -- they think these 10 stocks are even better buys.

Click here to learn about these picks!

*Stock Advisor returns as of April 3, 2017

Leo Sun has no position in any stocks mentioned. The Motley Fool has no position in any of the stocks mentioned. The Motley Fool has a disclosure policy.