Western Digital (NASDAQ:WDC) is one of the leading manufacturers of hard disk drives (HDD) and solid state drive (SSD) technology. Shares of the disk drive maker are down 44% over the last year as the company has turned in a series of weak operating results, stemming from weak demand for disk drives and soft pricing trends. 

On the other side, Intel (NASDAQ:INTC) has faced challenges with slowing growth in PC sales, but recent results have been impressive for the chip giant. The company has reported a string of solid growth on the top line and double-digit earnings growth, as a result of recent efforts to shift its focus toward fast-growing data-driven markets like the cloud, Internet of Things (IoT), and self-driving cars.

An external storage drive connected to a laptop with a pen, mouse, and calculator lying next to it.

IMAGE SOURCE: GETTY IMAGES.

Intel stock is up only 11% over the last year and is currently cheap, which could signal that investors are not giving the chip giant the credit it deserves for its recent operating performance. However, before we jump to conclusions, let's compare the numbers between Western Digital and Intel to see which stock is the better buy for investors today.

Financial fortitude

Looking at balance sheet numbers like cash and debt totals may not be as exciting as discussing growth opportunities that could send a stock higher, but this is a crucial test for investors to consider. It's always beneficial to invest in a company that generates plenty of free cash flow and has no debt as that allows for more flexibility to take advantage of opportunities. However, debt isn't always a bad thing, especially if the company generates enough cash to offset it.

With that in mind, here's how both companies stack up: 

Metric Western Digital  Intel
Cash $4.013 billion $11.65 billion
Debt $10.61 billion $26.78 billion
Revenue (TTM) $19.39 billion $70.85 billion
Free cash flow (TTM) $2.145 billion $14.25 billion

Data source: YCharts. TTM = Trailing 12 months.

Both Western Digital and Intel have more debt than cash. But notice that Intel generates enough free cash flow in one year to pay off over half of its debt. On the other hand, Western Digital's debt burden is about five times higher than its annual free cash flow.

Intel has the clear edge on this one.

Winner: Intel.

Valuation and dividends

A better-buy comparison is never complete without comparing both stocks on a range of valuation metrics. Here's how the two stocks measure up: 

Metric Western Digital Intel
Trailing price to earnings (P/E) 17.63 11.47
Forward P/E 9.05 10.86
PEG ratio (0.91) 1.44
Dividend yield 4.17% 2.45%
Dividend payout as a percentage of free cash flow 27.51% 38.88%

Data source: YCharts and Yahoo! Finance. 

Neither stock appears overvalued, but I would give the edge to the chip giant. Intel has a lower trailing P/E but has a slightly higher forward P/E based on analysts' earnings estimates. However, notice that Western Digital has a negative PEG (price-to-earnings-growth) ratio. This is because analysts expect the disk drive maker's earnings to decline over the next five years, reflecting the cyclical nature of the storage industry, as well as the company's weak sales results in recent quarters.

On dividends, Western Digital beats Intel with a 4.17% yield compared to Intel's yield of 2.45%. What's more, the disk drive maker pays out 27.51% of free cash flow, which means Western Digital has plenty of cash to pay off debt while still rewarding shareholders.

Overall, this is a draw. Intel wins on valuation, but Western is the better dividend stock.

Winner: Tie.

Growth expectations

Western Digital has turned in uninspiring results in the last couple of quarters. In the fiscal second quarter, revenue declined 16% sequentially and 21% year over year as shipments of HDD continued their decline and prices for flash drives plummeted. Falling prices took a huge bite out of the company's profitability, as gross margin fell to 31.3% compared to 43% in the same quarter last year. This translated to a drop in operating income of 92% year over year in the last quarter. 

Demand for storage capacity will only increase over time as the world accumulates more data. However, Western Digital's recent operating performance highlights the double-edged sword of investing in storage stocks. The industry is highly unpredictable in terms of pricing. While Western Digital is a leader in the HDD market, the SSD market is more competitive with tech giants like Intel and Samsung Electronics providing flash storage solutions. 

Recent results provide more evidence that Western Digital won't be able to offset the secular decline in HDD shipments with growth in flash revenue. Demand is rising for SSD, but prices have been dropping rapidly as the technology becomes more widely available. With analysts expecting further price declines in 2019, this doesn't seem like the best time to buy shares of Western Digital. 

On the flip side, Intel could be on the verge of returning to its glory days. The company believes its addressable market opportunity is more than $300 billion as Intel is no longer dependent on a stagnant PC market. About half of annual revenue is derived from data-centric markets, including Internet of Things, communications, data centers, and self-driving cars, in which the chip company is investing heavily to capitalize on the growth in these attractive markets. 

Intel's latest results have been solid. In the fourth quarter, total revenue rose 9% year over year, fueling adjusted earnings growth of 18%. Full-year revenue climbed 13%, driven by data-centric revenue growth of 20% and PC-centric revenue growth of 9%. 

Looking ahead, there are near-term catalysts to keep demand up for Intel's products, particularly the rollout of 5G connection speeds, where Intel is ready with its network system on a chip code-named Snow Ridge. Plus, Intel's Mobileye self-driving car unit continues to look strong, delivering impressive 43% revenue growth last quarter. 

Winner: Intel.

Go with the chip giant

Overall, I believe this is a no-brainer choice. Intel is cheap and generates consistent free cash flow, and there are several fast-growing markets for the company to sell its chips to going forward. For these reasons, Intel is the better buy.