Welcome to the consumer electronics equivalent of an Ali-Frazier fight.  To consider just one area where they compete, Apple (AAPL -0.81%) and Samsung (NASDAQOTH: SSNLF) so dominate the smartphone and tablet businesses that between them, the two tech giants regularly account for more than 90%  of smartphone industry profits in any given quarter. Clearly, these are powerhouses.

As to which is the better buy today, the answer is far less clear. This article will run Samsung and Apple through a three-part analysis to gauge which tech company's shares looks like the better investment right now.

Lady using her Samsung smartphone to pay at a shop to complete a transaction using Samsung Pay

Image Source: Samsung 

Financial fortitude

The Ali-Frazier analogy certainly holds true in the financial analysis of these two famously profitable companies. To give this discussion some color, here a quick review of some of the most important solvency and liquidity metrics for Apple and Samsung.

Company Cash & Investments Debts Cash from Operations Current Ratio
Apple $246.1 billion $87.5 billion $65.4 billion 1.2
Samsung  $76.8 billion $13.3 billion $41.3 billion 2.6

Data source: Apple investor relations , Yahoo!  Finance

As you can see, both companies are paragons of financial stability. However, as has received plenty of attention in recent years, the bulk of Apple's current cash and investments reside in overseas accounts; it reported having $230 billion overseas in its most recent Form 10-Q.  Apple has adeptly borrowed against that debt to fund its various capital return efforts, but Samsung does not face such an issue. Regardless, Apple enjoys substantially more net cash and produces over $20 billion more cash from its operations than Samsung. So while neither company is a pauper, Apple earns a win in this first category.

Winner: Apple

Durable competitive advantages

Given that they are two of the largest and most powerful companies in the world, it takes no grand insight to see that both Apple and Samsung enjoy competitive advantages to varying degrees.

Apple's cash hoard is it own competitive advantage, giving it unparalleled flexibility to pursue whatever potential strategic goals it desires. Apple's largest source of staying power, though, is its closed-loop ecosystem, which is buttressed in equal degrees by its leading hardware design, iOS software, app ecosystem, and prized brand. In combination, these factors allow Apple to command far higher prices for its devices than most other consumer electronics manufacturers do for similar equipment.

These higher per-unit prices translate into above-average margins for Apple. As just one example, the Mac maker produced a net income margin of 20.7% over the past 12 months,  more than twice the S&P 500's average profit margin according to FactSet data.  However, Apple's success also rests on its ability to consistently create and market sleek devices that consumers love. Though it has yet to have a stumble on that front in the iPhone era, failure to execute its well-worn playbook in any given year could adversely affect the company's financial performance and stock price.

As one of the largest electronics makers in the world, Samsung should be able to maintain its place atop of the global tech industry over the long term. The company operates three main reporting segments: consumer electronics (TVs, appliances, etc.), IT & mobile communications (smartphones), and device solutions (semiconductors and displays). Consumer electronics and IT & mobile produced operating margins of roughly 5% and 10% respectively in 2016; call them average to below-average businesses based on the FactSet profit margin numbers cited earlier. However, Samsung's semiconductor unit, which designs and manufactures a host of chips for itself and other electronics firms, is the financial engine that powers its performance; the unit produced 20% operating margins in 2016.

In the category of near-term risks, Samsung's place in South Korea's growing political corruption scandal creates something of an overhang for the chaebol, the Korean word for the handful of large conglomerates that dominate the business landscape in the East Asian country. Last month, Samsung CEO Jay Y. Lee was arrested  and will be indicted on charges including "bribery, embezzlement, hiding assets overseas and perjury" as part of the investigation that lead to South Korean president Park Geun-hye's impeachment.  In all likelihood, this shouldn't damage Samsung's long-term business outlook, though it certainly could create issues for the company and its management structure in the coming quarters.

Winner: Apple

A lineup of an iPhone, iPad, and Apple Watch

Image source: Apple

Valuation

Turning the final segment of our analysis, let's take a look at three of the most popular valuation metrics for the two companies.

Company P/E
Forward P/E EV/EBITDA 
Apple 16.9  13.9 10.9
Samsung  13.5 9.5 4.6

Data source: Yahoo Finance , S&P Global Market Intelligence 

Importantly, Apple's massive hoard of cash and investments artificially inflates its valuation. As I recently pointed out, subtracting Apple's net cash and investments from its market capitalization actually lowers Apple's current P/E ratio to around 12.5,  depending on Apple's current stock price. Knowing that Apple is cheaper than Samsung and enjoys superior economics to the South Korean powerhouse -- see the durable competitive advantages section above -- totally reframes this discussion in Apple's favor.

Before wrapping up this section, it's also worth mentioning that both Apple and Samsung are materially undervalued compared to the market averages; the S&P 500 currently trades at a pricey 26-times earnings.  So though Apple earns a win in this section, both companies appear at least somewhat under-priced.

Winner: Apple

And the winner is... Apple

By virtue of winning all three segments, Apple earns itself an easy win in comparison to Samsung. That isn't to say Samsung isn't an interesting investment as one of the strongest companies in all of tech, especially when taking its rock-bottom valuation into consideration. However, to quote the classic film Highlander, "There can be only one," and Apple pretty clearly stands as that one -- the better stock of these two dueling tech companies to own today.