Image: McDonald's.

The restaurant world changes constantly, and companies have to adapt to changing times. McDonald's (MCD -0.30%) has led the fast-food industry for decades, and it still has a worldwide presence in representing American culture in locations scattered across the globe. Starbucks (SBUX 0.29%) has had a shorter history, but its coffeehouse chain has grown quickly to have a similar network footprint and loyal customer base. Investors looking at the two companies are curious which stock is the better buy right now. Let's look at how McDonald's and Starbucks compare on some key metrics to see which one might be a smarter pick for investors.

Valuation
Starbucks and McDonald's have both soared over the past year. Starbucks has climbed 31% since April 2015, but McDonald's is up an even more impressive 37% over the same time period.

You'd probably expect that after such a large run-up in share prices, both McDonald's and Starbucks might be in danger of overvaluation. When you look at simple valuation metrics, both stocks do in fact have above-average valuations. For McDonald's, its stock currently carries an earnings multiple of 26 based on trailing earnings. That's above the level of the overall market, but Starbucks has an even higher trailing earnings multiple of 37 times. At their elevated levels, these price-to-earnings ratios appear to show investors' preference for blue-chip stocks that they can trust to get through possible hard times in the future.

Both companies look less expensive when you integrate forward projections of future earnings. McDonald's retains the edge, though, with a forward multiple of 21 comparing favorably with Starbucks' higher valuation at 28 times forward earnings estimates. Based on valuation, McDonald's has an edge over Starbucks.

Dividends
When it comes to dividends, McDonald's once again shows its advantage over Starbucks. McDonald's has a current dividend yield of 2.8%, which is more than twice what Starbucks shareholders receive from the coffee stock's dividend yield of 1.3%.

Admittedly, McDonald's has put more of an emphasis on dividends. It pays out about 70% of its earnings in the form of dividends to shareholders, compared to just 40% for Starbucks. Yet over time, McDonald's has demonstrated its commitment to dividend investors by increasing its payouts on a regular, reliable basis. The fast-food giant currently has a 40-year streak of boosting its dividend annually, putting it among the elite of the dividend-paying world. Starbucks has started to get on the dividend-paying bandwagon, with moves to boost its payout four-fold between 2010 and 2015. Nevertheless, McDonald's has a longer track record that appeals to investors focused on dividends.

Growth
The real potential that Starbucks sees in their stock comes from the coffee company's growth prospects. Store expansion has been a huge driver of gains in the recent past, with Starbucks adding 500 new stores in the most recent quarter and expecting 1,800 more openings over the next year. Comparable-restaurant sales growth has been strong and sustained both in its core domestic market and across the globe, and that has investors confident that Starbucks can continue to grow at a double-digit percentage base well into the future.

McDonald's has struggled in recent years, but it has more recently seen new signs of positive activity. In its most recent quarter, global comparable sales rose 5%, and domestic gains of 5.7% were higher by almost half than what many of those following the stock had expected to see. Some are skeptical about the spike higher, noting that the positive impact of the introduction of an all-day breakfast menu is likely to die down relatively quickly. The ability to maintain pricing power has helped McDonald's keep its revenue rising, but a lot depends on whether McDonald's can keep the momentum that it has built over the past several months and channel it into further growth initiatives.

For now, McDonald's still has more to prove than Starbucks does, and it's hard to be certain whether the fast-food giant can keep finding ways to appeal to customers given lower traffic counts. Because of that, Starbucks represents the better buy for investors right now, even with dividend and valuation figures that on their face suggest that the stock might not hold up to scrutiny. Only once McDonald's has proven it can keep making progress will many investors be ready to make long-term bets on the company.