Image source: Apple

In its famous 1984 commercial, Apple (AAPL 0.64%) portrayed International Business Machines (IBM 0.16%) as Big Brother. Once the fiercest of rivals, the two companies are far more similar than different today. Beyond their size and maturity, Apple and IBM shares have also been on a tear over the past 12 months.

AAPL Chart

AAPL data by YCharts

Considering their many similarities, it's appropriate for investors to wonder whose shares are the more attractive potential buy today. To better answer this question, we'll put Apple and IBM stocks through a three-part analysis to gain a clearer sense of which one is the better buy now.

1. Financial fortitude

Let's cut to the chase here: Apple wins the contest of financial fortitude by a landslide. It deserves noting, though, that this is more due to Apple's historic profitability rather than any financial imprudence on IBM's part.

Company

Cash and Investments

Debt

Cash From Operations

Current Ratio

Apple

$237.5 billion

$87.0 billion

$65.8 billion

1.3

IBM

$15.0 billion

$42.4 billion

$18.5 billion

1.2

Data sources: Apple investor relations, IBM investor relations, Yahoo! Finance.

Apple generates the bulk of its sales overseas, and its practice of keeping its cash offshore has triggered several not-so-small controversies in recent years. Apple held $216 billion of its cash overseas as of its most recent earnings report. That means Apple can't directly tap into the majority of its cash holdings without paying steep repatriation taxes. Rather, Apple borrows against its overseas cash to fund its capital return program.

Turning to IBM, Big Blue similarly has its financial house in order. Though it has leveraged its balance sheet to a certain extent, IBM generates plenty of cash flow to both service its debts and reinvest in its business. However, Apple's overall profitability simply can't be beat, making it the easy winner in this portion of our analysis.

Winner: Apple.

2. Durable competitive advantages

Turning to their competitive moats, Apple and IBM each enjoy some type of competitive advantage over their rivals. However, for both companies, their competitive advantages might not be as pronounced as they might initially seem.

Apple's platinum-grade brand, closed-loop operating system, consistent device leadership, and immense financial resources certainly all contribute to its ability to consistently generate above-average returns on capital. Some of these items should prove fairly straightforward. Apple's Fort Knox-esque cash reserves allow it to buy its way into virtually any industry that interests it. However, Apple's closed-loop software architecture receives far less attention but is arguably more important in terms of supporting Apple's competitive position.

In contrast to Alphabet's Android or Microsoft's Windows operating systems, Apple makes its software and app ecosystem available on its devices. That means users who migrate away from Apple's computers or mobile devices might not be able to bring their content with them, although third-party services such as Spotify have helped erode this situation in recent years. It also bears noting that Apple's product-driven sales model also presents something of a dormant risk. Should Apple somehow badly misstep with one of its annual device designs, its sales could suffer dramatically. Thanks to Apple's consistent device leadership, though, this situation has never come to fruition.

At IBM, the company's longtime relationships with customers and the large percentage of its sales that come from its legacy three-pronged business model provide it with something of a competitive moat as well. However, with the rise of the cloud-computing era and IBM's evolving place in that space, the company's competitive stance has perhaps weakened slightly. To cite one popular -- and important -- metric, IBM's sales have now declined for 18 consecutive quarters. IBM's backlog of prearranged service bookings also fell 0.7% in constant currency terms in its most recent quarter, although IBM still carries roughly 1.5 years' worth of revenue as bookings.

Winner: tie.

3. Valuation

On the surface, Apple and IBM appear to be comparably valued. In terms of their current P/E, forward P/E, and EV/EBITDA ratios, there appears to be little difference between the two at first glance.

Company

P/E Ratio

Forward P/E Ratio

EV/EBITDA

Apple

14.3

11.8

9.2

IBM

13.7

12.1

11.1

Data sources: Apple investor relations, IBM investor relations, Yahoo! Finance.

Pay extra attention to the EV/EBITDA ratio. It's arguably the most useful valuation metric, because it takes into account each company's equity, debt, and cash positions. This is particularly important to consider when analyzing a cash-rich company like Apple, which currently carries $12.73 in cash per share on its balance sheet. Subtracting that cash amount out gives investors a clearer sense of the value the market places on Apple's core operations.

Apple and IBM are both cheap compared with the market as a whole. In fact, after its recent rally, the S&P 500 benchmark trades at a valuation of 26, nearly double that of either Apple or IBM. This steep discount to the market reflects the view that Apple and IBM will probably exhibit little to no growth in the near term, which may not actually be the case. Though their revenue growth outlook isn't particularly rosy -- Apple and IBM sales are expected to rise 6%  and fall 2%, respectively, this year -- both companies are among the most effective users of dividends and stock buybacks to drive shareholder returns. In terms of the overall attractiveness of their valuations, though, Apple wins this category as well.

Winner: Apple.

And the winner is... Apple

Apple's edge in two of the three categories examined here make the iPhone maker the more attractive option today. However, that isn't to say that IBM, especially in light of its own cheap valuation, is not a buy. In fact, I like both Apple and IBM shares as interesting potential buys at a time when cheap shares of high-quality companies are becoming increasingly scarce.

So while Apple is the technical winner of this exercise, investors looking for blue-chip technology stocks to buy would do well to further investigate both Apple and IBM shares today.