The smartphone market has been sluggish over the last few years, but that hasn't prevented Apple (AAPL -1.27%) and Samsung (NASDAQOTH: SSNLF) from roughly doubling shareholders' investments since 2015. To offset weak growth in units sold, Apple has been doubling down on premium features in its iPhone lineup in order to grow revenue by way of increased selling prices.

On the other side, while the Korean tech giant continues to hold its market share lead in the global smartphone market, the company has recently enjoyed strong growth in its flash memory business, which currently accounts for the majority of Samsung's annual operating profit. 

We'll compare both stocks on a range of metrics to determine which is the better buy for investors today.

A lit light bulb sitting on a stack of coins.

Image source: Getty Images.

Recent performance and growth prospects

Apple's revenue grew 17% year over year in its third fiscal quarter, driven by higher selling prices for the iPhone. The upgrade cycle toward higher-priced phones pushed average selling prices up 20% year over year to $724, which more than made up for a meager 1% increase in units sold. 

Apple's new iPhone XS and iPhone XR are priced to keep average selling prices moving higher. The iPhone XR is expected to be a strong seller this fall and starts at $749, while the high-end iPhone XS Max starts at $1,099. This means strong sales of either model should be enough to push average selling prices (and revenue) higher over the next year, even if units sold remain flat.

Analysts expect Apple to grow revenue 15% for fiscal 2018 (which ends in September). A lower tax rate and share repurchases should boost earnings per share by 28%. Over the next five years, analysts expect the iPhone maker to grow earnings 10.75% per year.

Meanwhile, Samsung's net sales dropped 4% in its most recent quarter, weighed down by a 22% decline in sales of mobile devices. Samsung has faced increasing competition from other smartphone makers recently. This caused its market share to slip 200 basis points year over year to 20.9% in the second quarter, according to IDC. Management expects the smartphone environment to remain "tough" in the second half of the year. 

Recent reviews of Samsung's premium Galaxy Note 9 have been generally positive, but investors should be aware that the Korean tech giant makes much more than smartphones. Samsung is the market share leader in flash memory products. They are part of its semiconductor segment, which made up 31.6% of Samsung's net sales last quarter and 78% of total operating profit.

This could be an Achilles' heel for Samsung in the short term, as NAND flash memory prices are expected to soften, which could put pressure on the top and bottom line in the coming quarters. 

That said, strong demand from data centers pushed semiconductor revenue up 25% year over year last quarter. Analysts expect Samsung to grow revenue 4.8% and earnings 18.5% this year. Over the next five years, analysts expect earnings to grow 8.2% annually. 

Overall, Apple has the edge due to its better recent performance and expected growth.

Winner: Apple

Financial fortitude

Apple and Samsung are both financially sound companies with more cash than debt. Also, both companies are very profitable, as you can see in this table:

Metric Apple Samsung
Cash $243.7 billion $74.5 billion
Debt $96.6 billion $15.9 billion
Revenue (TTM) $255.3 billion $218.8 billion
Net income (TTM) $56.1 billion $41 billion
Free cash flow (TTM) $58.9 billion $34.3 billion

Data sources: Apple and Samsung. Chart by author. TTM = trailing 12 months.

While Apple and Samsung are fierce competitors in the smartphone market, the two companies couldn't be more different from each other otherwise. Apple's business is centered around its consumer hardware devices (Mac, iPad, iPhone, and Apple Watch) and services (iCloud, App Store, Apple TV, Apple Pay and Music, etc.). 

On the other hand, Samsung is involved in more capital-intensive endeavors, such as consumer electronics, audio, and display panels. Also, its smartphone segment is not as profitable as Apple's. Apple typically generates over 80% of the smartphone industry's profit while commanding less than 15% of total smartphone units sold. 

Apple is the winner on this one. It spends far less in capital expenditures each year, reflecting its focus on doing a few things really well, as opposed to Samsung, which has to spend capital on several different segments. This has allowed Apple to generate more free cash flow and pile up more cash on the balance sheet, which it can either reinvest or distribute to shareholders.

Winner: Apple

Dividends, share repurchases, and valuation

Over the last few years, Apple has distributed nearly all of its annual free cash flow to shareholders in the form of dividends and share repurchases. Samsung has distributed less than 50% of its free cash flow in dividends and buybacks. Here's a comparison of how both stocks stack up on capital returns: 

Metric Apple Samsung
Dividend yield 1.3% 3.0%
Dividends paid (TTM) $13.5 billion $6.5 billion
Payout ratio 23.7% 19.1%
Share repurchases (TTM) $61.4 billion $3.5 billion

Data sources: The companies and Yahoo! Finance. Chart by author. TTM = trailing 12 months. 

Samsung currently pays a higher dividend yield of 3.0% compared to Apple's dividend yield of 1.3%. Both companies pay out about the same proportion of earnings as dividends, as noted by the payout ratio in the table above. The main reason for the difference in dividend yield between the two companies is valuation.

Metric Apple Samsung
Market cap $1.09 trillion $280 billion
Forward P/E ratio 16.4 6.5
Price/sales ratio 4.1 1.3
PEG ratio 1.7 0.8

Data source: Yahoo! Finance. Chart by author.

Apple currently trades for a forward P/E ratio of 16.4 based on the consensus analyst estimate for next year's earnings. Samsung is much cheaper, with a forward P/E of 6.5. The iPhone maker has the upper hand on the total amount of capital it distributes to shareholders, but comparing the two on actual dividend yield, payout ratio, and valuation, Samsung is the clear winner.

Winner: Samsung

And the winner is...Apple

Samsung has a higher dividend yield and lower valuation, but Apple has an advantage in growth, as well as being in a much superior financial position overall. Apple is also building a deep connection with its users, as indicated by its strong growth in services revenue.

While iPhone sales are still the company's main revenue driver, that is starting to change. Revenue from subscriptions, apps, and Apple Pay, among other services, grew 31% year over year last quarter and made up 18% of total revenue. It's the fastest-growing category for Apple, which reflects the investment users have made across the company's ecosystem.

The growth in services revenue serves as a proxy for gauging Apple's widening competitive moat. Once customers have spent money on numerous apps and other content, not to mention all of the messages, photos, and videos stored and synced across all Apple devices through iCloud, they become less likely to switch to competing smartphone makers.

All of this considered, Apple is the better buy for investors today.