Though a handful of other names are in the discussion, there's a credible argument to be made that Apple (AAPL 1.27%) and International Business Machines (IBM 1.05%) are the two most impactful tech companies of all time.

Interestingly enough, the two companies were the bitterest rivals during the dawn of the PC era. In fact, Apple's famous 1984 commercial -- widely hailed as one of the best ads of all time -- painted IBM as the soulless Big Brother character. A generation later, Apple and IBM find themselves in very different positions, though both remain among the most prominent companies in tech. But which is the better buy right now?

To answer this question, let's look at Apple and IBM across three important investing categories, to gain a clearer sense of which looks like the more attractive stock to own today.

Financial fortitude

As a baseline, any investor should want to make sure a potential investment is financially stable before assessing its earnings, growth potential, and valuation aspects. As such, here's a brief snapshot of some of the most common measures of liquidity and solvency for the two tech titans.

Company

Cash and Investments

Debt

Cash From Operations

Current Ratio

Apple

$256.8 billion

$98.5 billion

$66.3 billion

1.4

IBM

$10.7 billion

$42.7 billion

$15.3 billion

1.2

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

As you can clearly see, this comparison is hugely lopsided in Apple's favor. As perhaps the richest company in the world today, Apple's net-cash balance alone is larger than most of the Fortune 500's market capitalizations. It bears noting that $239 billion of Apple's cash and investments are parked overseas, and the company uses domestic cash flows and borrowings against its cash to fund its operations and capital return, which is easily sustainable for a company with Apple's profitability.

Turning briefly to IBM, that company's debt might appear startling at first. However, IBM's current cash on hand and highly profitable business model mean it will have no problem servicing its debt load through all phases of the business cycle. However, Apple's financial might simply cannot be ignored, so the Mac maker scores an easy win in this first portion of our analysis.

Winner: Apple.

A shot of Apple's jet black iPhone

Image source: Apple.

Durable competitive advantage

Given their staying power, it should come as no surprise that Apple and IBM each enjoy observable, albeit different, durable competitive advantages.

Apple's power lies in its closed-loop product strategy, in which the company controls all aspects of the customer experience, outside of the actual manufacturing of its devices. This requires the company to maintain significant expertise in hardware and software engineering, marketing, supply-chain management, and much more. Historically, Apple has been able to consistently excel in each of these departments, and crafting one of the most compelling overall consumer experiences enables Apple to charge premium prices compared to other smartphone manufacturers.

Keep in mind that Apple's iPhones sold at an average selling price (ASP) of an estimated $217 last year, far higher than the $695 ASP for smartphones running on Alphabet's Android mobile operating system. Moreover, this gap could conceivably widen if Apple plans to price its forthcoming 10th-anniversary iPhone as high as $1,000, which has been a persistent rumor in recent months. Of course, this only scratches the surface of what makes Apple such an extraordinary company, but it should provide a solid foundation for further research on the world's largest publicly traded company.

Turning to IBM: Big Blue's business model continues to shift in reaction to the breakdown of its once-dominant three-pronged strategy. For years, IBM printed profits by selling its hardware (mostly servers) to corporate clients around the world. This created an opportunity for IBM to also sell its higher-margin software and consulting services. However, the rise of cloud computing has effectively broken this kind of business model, and IBM has embarked on an ambitious pivot toward cloud computing, and other services like big-data analytics, that continues to play out in real time.

Crucially, it takes time to reorient a company of IBM's size, and the long-term nature of this shift has been a persistent drag on IBM's stock price in recent years. In the company's most recent quarter, the so-called "strategic imperatives" segments -- including mobile, cloud, and more -- increased sales by 13% to $7.8 billion. However, this couldn't offset the declines in IBM's legacy products. These countervailing forces have been the central storyline at IBM, which has seen its sales decline for 20 consecutive quarters. IBM will likely be just fine, but there is little question that Apple enjoys the stronger competitive position right now.

Winner: Apple.

Valuation

In the final section of our analysis, let's quickly look at Apple's and IBM's valuations. As a jumping-off point, take a look at these three common valuation metrics for each company:

Company

P/E

Forward P/E

P/CF

Apple

16.9

13.6

13.3

IBM

12.6

11.0

9.0

P/E = price to earnings, P/CF = price to cash flow. Data sources: Yahoo Finance, Reuters.

Both companies are clearly cheap, particularly compared to the S&P 500's price-to-earnings ratio of 25.6.

However, between the two, Apple's stock appears more attractive because of its positive growth expectations. For context, Apple is expected to increase its sales by 5.1% this year and 12% next year, whereas IBM's sales are expected to fall by 2.1% and 0.1% over these same periods.

Winner: Apple.

And the winner is: Apple

Given the company's clean sweep across all three categories, it should come as no surprise that Apple easily wins this contest. To be sure, IBM has some noteworthy positives working in its favor, but also faces some legitimate challenges as it navigates its business pivot. Apple is easily the better stock to own today.