Perhaps no two companies have benefited more from surging global demand for graphics processing units (GPUs) than Advanced Micro Devices (AMD 1.33%) and NVIDIA (NVDA 3.71%). Their powerful computer chips help to accelerate processing speeds while remaining energy efficient. And with GPU sales being fueled by insatiable demand from high-growth markets like video games, data centers, and cryptocurrency mining, AMD's shares have surged 300% over the past half-decade, while NVIDIA's stock is up an incredible 1,700%.

But which is the better buy today? Read on to find out.

Competitive position

AMD's discrete GPU market share rose to 33.7% during the fourth quarter of 2017, according to Jon Peddie Research, up from 29.5% in the prior-year period and less than 20% in 2015. AMD's strategy is to price its GPUs below that of NVIDIA while attempting to offer similar performance. This tends to work better at the low end of the market, where price is a key factor. But the performance of NVIDIA's premium GPUs has outpaced that of AMD at the high end. That's helped NVIDIA maintain its dominance of the overall GPU market with a 66.3% share, despite AMD's gains.

NVIDIA's Titan X GPU

NVIDIA produces some of the world's most powerful GPUs. Image source: NVIDIA. https://nvidianews.nvidia.com/multimedia?page=2 

Moreover, while AMD's and NVIDIA's GPUs are enjoying strong demand from gamers and cryptocurrency miners, NVIDIA GPUs are also being used in several other high-growth -- and potentially massive -- markets. These areas include data centers, the internet of things, and self-driving cars. All told, NVIDIA estimates that these markets will help to expand its total addressable market opportunity to more than $50 billion.

Based on the technological superiority of NVIDIA's GPUs and its leading position within multiple important, emerging industries, I'd argue that its competitive position is stronger than that of AMD.

Advantage: NVIDIA

Financial fortitude

Let's now take a look at how NVIDIA and Advanced Micro Devices stack up in regard to financial strength.

Metric

Advanced Micro Devices

NVIDIA

Revenue

$5.33 billion

$9.71 billion

Operating income

$0.20 billion

$3.21 billion

Net income

$0.04 billion

$3.05 billion

Operating cash flow

$0.07 billion

$3.50 billion

Free cash flow

($0.05 billion)

$2.91 billion

Cash & investments

$1.18 billion

$7.11 billion

Debt

$1.40 billion

$2.00 billion

Data sources: Morningstar, Yahoo! Finance.

NVIDIA's operating profits and cash flow dwarf that of AMD. It also generated nearly $3 billion in free cash flow over the past year, while AMD's capital spending continues to outpace its cash production. Additionally, NVIDIA has six times more cash in its coffers than its smaller rival. Together, these factors give NVIDIA a clear edge in terms of financial fortitude.

Advantage: NVIDIA

Valuation

No better-buy discussion should take place without a look at valuation. Let's check out some key value metrics for these chip leaders, including price-to-sales and price-to-earnings ratios.

Metric

Advanced Micro Devices

NVIDIA

P/S

1.71

13.56

Trailing P/E

234.01

45.17

Forward P/E

17.68

30.01

Data sources: Yahoo! Finance, Morningstar.

AMD's shares are substantially cheaper on a price-to-sales basis. This is to be expected, as NVIDIA is the far more profitable business with an operating margin of 33% over the past year, compared to less than 3% for AMD.

Advanced Micro Devices' astronomically high trailing P/E is largely because it was barely profitable in 2017. NVDIA's stock is more expensive on a forward price-to-earnings basis, but reasonably priced, I would argue, based on analysts' projections for earnings-per-share (EPS) growth of 34.8% this year and 15.6% next year. Still, with a forward P/E that's 40% less than that of its larger rival, I'll give AMD the edge here.

Advantage: Advanced Micro Devices 

The better buy is...

Advanced Micro Devices' shares may be cheaper, but with its more powerful competitive advantages, greater growth opportunities, and superior financial strength, NVIDIA is the better long-term investment.