It's been a rough three months for technology stocks. Shares of Advanced Micro Devices (NASDAQ:AMD) and NVIDIA (NASDAQ:NVDA) have taken a beating following fears of a slowdown in the chip industry. It's been particularly hard on these two graphics card makers because of the absence of demand from cryptocurrency miners, which padded their revenue growth earlier in the year. 

But investors should look at the recent market weakness as a buying opportunity since there are still things to like about both AMD and NVIDIA for the long term. In addition to selling graphics cards to gamers, both companies are positioned for growth in the booming data center market. Let's compare the two across key metrics and growth expectations to determine which stock is the better buy for investors today.

Two silver figurines of a bull and a bear facing each other while standing on a piece of paper depicting a stock chart and quotes.

IMAGE SOURCE: GETTY IMAGES.

Financial fortitude

Every company in the chip industry will at some point experience a period of soft demand, especially when the broader economy slows down. So it's a big plus to invest in a company that has a rock-solid balance sheet with lots of cash to fund growth and very little debt.

Here's a rundown of how AMD and NVIDIA compare on key financial metrics:

Metric AMD NVIDIA
Cash $1.06 billion $7.59 billion
Debt $1.17 billion $1.98 billion
Free cash flow (TTM) $178 million $3.39 billion
Net income (TTM) $356 million $4.69 billion

Data sources: AMD and NVIDIA. TTM = Trailing 12 months.  

The one thing that immediately jumps out is how much more cash NVIDIA has on its balance sheet, even after subtracting the debt. On the other hand, AMD has more debt than cash and generates only a fraction of the cash it needs to pay down its debt.

NVIDIA has the advantage here.

Winner: NVIDIA.

Capital returns

Another advantage of having more cash resources is being able to distribute more capital to shareholders in the form of dividends and share repurchases.

Between 2015 and 2017, AMD's cumulative amount of free cash flow generation was negative $354 million. The company's recent growth has helped it generate positive free cash flow of $178 million over the last year. But with debt to pay down, AMD hasn't paid dividends and probably won't any time soon.

On the other side, NVIDIA has generated a cumulative total of $7.9 billion in free cash flow since fiscal 2016 (its fiscal year ends in January). The company has paid a cumulative $1.1 billion in dividends to shareholders and repurchased a total of $3.1 billion worth of stock.

Currently, NVIDIA's dividend yield is only 0.4%, as it pays out less than 10% of its earnings in the form of dividends. With no dividend from AMD, NVIDIA has the edge on capital returns.

Winner: NVIDIA.

Growth expectations

AMD has made a big comeback over the last few years, especially in the server-chip market, where it has been gaining share against Intel. AMD is set to beat Intel to market with a 7-nanometer processor, while Intel has been experiencing delays in ramping up production of its 10-nanometer chip. 

The company just scored a big win to supply server processors for Amazon.com and its Amazon Web Services segment. AMD is also supplying chips for Microsoft Azure and other major cloud providers. It's expected that AMD will end 2018 with a mid-single-digit share of the server market, but analysts expect the company to reach a double-digit share by 2020. AMD's new server chip, codenamed "Rome," is expected to launch next year. 

Analysts expect AMD to report revenue growth of 22% this year and 7% in 2019. Sales of gaming cards are expected to slow down in the near term following the overhang of a crashing crypto market. However, earnings should grow faster than revenue as the company benefits from a sales mix shift to higher-priced products, such as server chips, which should boost margin. That's why analysts expect AMD to report $0.63 per share in earnings in 2019, representing 37% growth.

But it's uncertain whether AMD's recent wins in the server market will be sustained beyond next year. AMD is fighting mighty battles between two larger rivals -- Intel and NVIDIA -- that have much greater resources. As a result, analysts currently expect AMD to grow earnings just 0.56% annually over the next five years. 

AMD Revenue (TTM) Chart

AMD Revenue (TTM) data by YCharts

NVIDIA experienced a similar headwind in its gaming segment last quarter in the aftermath of the crypto collapse. Gaming revenue was up 13% year over year, which is solid but way down from the pace set in previous quarters. Longer term, the adoption of higher-resolution gaming displays and more gamers engaged with esports titles should drive growth in the gaming segment. 

In other areas, NVIDIA's impressive roster of customers among top cloud providers drove a 58% growth rate in data center revenue last quarter. Plus, the company's DRIVE AGX self-driving car technology continues to gain the support of top car manufacturers around the world, which led to a 19% increase last quarter in its year-over-year automotive segment revenue. 

Analysts expect NVIDIA to expand revenue by 26% this year, but crypto demand deterioration is expected to cause revenue growth to slow to 6% next year. While earnings are expected to decline slightly next year, analysts anticipate that the graphics card maker will improve earnings by 15% annually over the next five years.

Winner: NVIDIA.

Valuation

Not only is NVIDIA expected to grow faster over the next five years, but the stock is also currently much cheaper than AMD. Here's how these stocks compare across popular valuation metrics:

Metric AMD NVIDIA
Trailing Price to Earnings (PE) 64.17 20.15
Forward PE 31.60 20.91
Price to Free Cash Flow 128.05 28.12
Price to Earnings Growth (PEG)  82.68 1.51

Data sources: YCharts and Yahoo! Finance. 

AMD may amplify earnings faster next year, but long-term investors are typically more interested in where a company is likely to be in the next decade and beyond. NVIDIA not only has a lower valuation, but it still has huge long-term upside in promising growth opportunities, such as the data center and self-driving cars

Winner: NVIDIA.

NVIDIA is the better buy

The future is always uncertain, especially within the highly competitive chip industry, but I think NVIDIA's capital returns and consistent profitability are the key distinguishing characteristics between the two companies. With the stock down 46% over the past three months, this looks like a particularly opportune time to consider buying shares of the leading provider of graphics cards.

John Mackey, CEO of Whole Foods Market, an Amazon subsidiary, is a member of The Motley Fool's board of directors. Teresa Kersten, an employee of LinkedIn, a Microsoft subsidiary, is a member of The Motley Fool's board of directors. John Ballard owns shares of Nvidia. The Motley Fool owns shares of and recommends Amazon and Nvidia. The Motley Fool owns shares of Microsoft. The Motley Fool has a disclosure policy.