It's hard to think of two more classic blue chip stocks than IBM (NYSE:IBM) and McDonald's (NYSE:MCD).

One is a tech giant that's been around for more than 100 years and the other is the world's biggest restaurant chain. Both are among the 30 components that make up the Dow Jones Industrial Average.

Though IBM and McDonald's aren't competitors, there's no doubt that investors look to each stock for similar qualities, including a reliable dividend payment and a business model and brand name that has been successful over generations. That makes them competitors for investment dollars.

As you can see from the chart below, over the past five years, McDonald's stock was far and away the better performer of the two as the company successfully recovered from challenges it encountered in the first half of the 2010s. However, there's no guarantee that that pattern will persist.

MCD Chart

MCD data by YCharts

Let's take a look at where each company stands to determine which would be the better buy for investors today.

IBM: A legacy tech company in transition

It would be hard to understate how much IBM has struggled in recent years. The company has been in the midst of a long transition from a hardware company to one that is more focused on delivering software and services, but it seems to have fallen behind competitors in key businesses like cloud computing. It also has been unable to grow its revenues from the businesses it sees as its future rapidly enough to make up for the declines from the units that it has sold off or has been winding down.

An IBM mainframe computre

Image source: IBM

In 2019, IBM's overall revenue fell 3.1% to $77.1 billion, though it was up 0.2% after adjusting for divestitures and foreign-currency moves.  

With its recent acquisition of Red Hat, IBM is taking aim at the massive opportunity in providing hybrid cloud services -- arrangements under which businesses use a mix of third-party public cloud and on-premises private cloud servers. Expect to see the company redirect some of its investment in the coming years as it attempts to capitalize on this growing trend.

Yet after years of its leadership talking about growth markets, IBM remains a slow-growth company on both the top and bottom lines. For 2020, it forecasts that its earnings per share will increase by just 4.2%, and its revenue has fallen throughout much of the last decade.

Even growth in its "strategic imperatives" businesses has been disappointing. Total cloud revenue rose just 11% to $21.2 billion in 2019, for example, a growth rate that pales in comparison to those delivered by peers like Amazon and Microsoft, the leading providers of infrastructure-as-a-service, the kind of service that had long been a strength for IBM.

IBM remains a reliable cash machine with profit margins well in the double-digit percentages, and it's about to become a Dividend Aristocrat, but the company's lack of growth and the stock's poor performance are warning signs for investors.

McDonald's: The arches, still golden

Under CEO Steve Easterbrook, who guided the company from 2015 until just a few months ago, McDonald's executed better than it had in a long time. The company successfully rolled out all-day breakfast -- something its customers had requested for years -- added digital-ordering kiosks, signed deals with third-party delivery services, fought back against rivals with a new value menu, and refranchised restaurants abroad to free up capital and improve cash flow.

The exterior of a McDonald's restaurant

Image source: McDonald's.

However, Easterbrook was fired in November after it was discovered that he had had an inappropriate relationship with a subordinate, and now the company's future seems less certain. 

Nonetheless, the fast-food giant is bringing strong momentum into 2020. In the third quarter, its global comparable sales jumped 5.9%, with 4.8% growth in the U.S. and even faster growth internationally, showing the company executing in all of its regions.  Earnings for 2019 have been flat, however, as intense competition forced the company to be more promotional; the company has also been spending aggressively to remodel restaurants under the Experience of the Future program. In the U.S., traffic is still falling, but the company has compensated for that by coaxing customers to spend more through initiatives like delivery and digital.

In November, Chris Kempczinski, who previously served as president of McDonald's USA, became the new CEO. He's expected to continue implementing the company's Velocity Growth Plan, focusing on digital, delivery, and Experience of the Future to grow the business over the coming years.

Which is the better buy?

In terms of valuation, IBM is significantly cheaper than McDonald's. The tech giant trades at a price-to-earnings ratio of just 11 compared to 27 for the fast-food chain. That shouldn't come as a surprise given IBM's lack of growth recently, while McDonald's continues to put up impressive comparable sales gains. How both stocks are dividend powerhouses. McDonald's is a Dividend Aristocrat, having raised its dividend annually for 43 consecutive years, while IBM is set to join that elite club this year when it boosts its payout for the 25th year in a row.

McDonald's dividend is currently yielding 2.3%, compared to IBM at 4.5%. However, McDonald's has been raising its payouts at a much faster pace in recent years.

Overall, while there are reasons that investors might consider IBM -- among them, its yield and its turnaround potential -- McDonald's looks like the all-around better buy. It has strong momentum and a smart strategy that has thus far delivered impressive results. While last year's sudden change of leadership brought some uncertainty with it, I expect McDonald's stock to continue to outperform IBM stock as the company takes advantage of opportunities in digital ordering, delivery, refurbished restaurants, and new menu items. McDonald's is the better choice.