Microsoft (MSFT 1.51%) and IBM (IBM 1.11%) are frequently cited as "mature" tech stocks that you buy for income and stability instead of growth. Both stocks have outperformed the S&P 500's 4% gain -- Microsoft is up 9% for the year, and IBM has climbed about 13%. But is either stock still worth buying today with the market near all-time highs? 

The Surface Pro Studio. Image source: Microsoft.

The similarities between Microsoft and IBM

At first glance, Microsoft and IBM are very different companies. Microsoft generates most its revenue from licensing and subscription fees for Windows and Office. It generates additional revenue from sales of its Azure cloud platform Dynamics CRM, Surface hardware, Xbox consoles, and search-based ads. IBM's core business is split between business services, technology services, hardware systems, and enterprise software.

But Microsoft and IBM both face two similar challenges -- slower enterprise spending, and the technological shift toward mobile and cloud-based solutions. Sluggish enterprise spending causes companies to stick with older versions of Windows and Office, and to spend less on IBM's IT services, hardware, and software. Both companies are also struggling to remain relevant in a mobile world. That's why Microsoft's revenue fell 2% last year, while IBM's top line declined 12%.

Neither Microsoft nor IBM has a meaningful presence in mobile hardware, but both companies are pivoting their businesses toward higher-growth cloud solutions to offset declines in other older businesses. Microsoft's core strategy in that market revolves around growing its commercial cloud business (Office 365, Dynamics, Azure), which achieved an annual run rate of $13 billion last quarter.

IBM's plan is similar -- to grow its "strategic imperatives" businesses (cloud, analytics, mobility, security, and social) at a faster rate than its older businesses. IBM's cloud "as a service" business, which can be compared to Microsoft's commercial cloud business, hit an annual run rate of $7.5 billion last quarter.

IBM Watson Element for Educators. Image source: IBM.

How fast are Microsoft and IBM growing?

Microsoft has posted positive single-digit annual sales growth for three consecutive quarters. IBM, however, has posted annual sales declines for 18 consecutive quarters. Looking ahead, analysts expect Microsoft's revenue to rise 2% this year, but IBM's to decline 2%. That's partly because Microsoft's business (mostly software) was easier to pivot toward higher-growth cloud businesses than IBM's complex mix of business software, hardware, and IT services.

IBM slimmed down its hardware business over the past few years with the sale of its PC business, low-end servers, and its chipmaking unit. But the hardware business remains a dead weight on Big Blue's top line, causing its Systems revenue (8% of sales) to fall 21% annually last quarter. Its core business and technology services are also losing ground to nimbler rivals.

Both companies rely heavily on inorganic growth to strengthen their ecosystems. Microsoft's acquired LinkedIn to gather more employer and employee data for its analytics business, and to widen Dynamics' moat against Salesforce's market-leading CRM platform. IBM has been acquiring smaller cloud, mobile, and security businesses to strengthen its strategic imperatives. Both companies have adequate cash to continue that strategy -- Microsoft generated nearly $27 billion in free cash flow over the past 12 months, while IBM generated over $14 billion.

Dividends and buybacks

Microsoft currently pays a forward yield of 2.6%, which is supported by a payout ratio of 69%. IBM pays a higher forward yield of 3.7%, yet has a lower payout ratio of 44%. From an income investor's perspective, IBM might seem like a better pick.

Microsoft spends more cash on buybacks than IBM. Over the past 12 months, it spent nearly $15 billion on buybacks, but Big Blue spent just over $3 billion. However, IBM intentionally started reducing those buybacks last year to conserve its free cash flow for investments and acquisitions in its higher-growth businesses.

Profitability and valuations

Microsoft's earnings, lifted by buybacks and its shift toward higher-margin cloud businesses, are expected to rise 6% this year. IBM's earnings are expected to fall 10% due to its ongoing sales declines, increased investments, and reduced buybacks.

Microsoft currently trades at 29 times earnings, which matches the industry average of 29 for business software and services companies. IBM trades at 13 times earnings, which is lower than the industry average of 21 for IT services companies. Those metrics indicate that investors could be a bit too excited about Microsoft, while ignoring IBM's cheap valuation.

The winner: IBM

Microsoft initially looks like a better buy than IBM -- it clearly has better sales and earnings growth, and its turnaround efforts are producing more visible results. But IBM's higher dividend, lower payout ratio, and lower P/E ratio indicate that it's the better pick at current prices. Microsoft has lots of growth potential -- especially with new products like HoloLens, VR headsets, and Xbox Scorpio on the way -- but I'd like to see a higher yield and a lower P/E before I start a position.