Unfavorable trends in the fast-food and soda industries have put both McDonald's (MCD -0.43%) and Coca-Cola (KO -0.24%) on defensive footing lately. The burger giant posted its second straight year of declining traffic in 2016. Coke, meanwhile, saw its volume growth tick down from 2% to 1% last year.

The blue-chip companies have aggressive rebound plans, though. It would be a mistake to discount their chances at recovery, too, given the resources they command that include a few of the world's most valuable brands -- not to mention entrenched market positions. But which would make the better stock buy today?

Here are a few key statistics to set the stage.

Coca-Cola vs. McDonald's stocks

Metric

McDonald's 

Coca-Cola 

Market cap

$126 billion

$194 billion

Sales growth

4%

4%

Profit margin

19%

16%

Dividend yield

2.4%

3.2%

Forward P/E

24

24

52-week stock performance

31%

5%

Profit margin and sales growth for McDonald's (comparable-store sales) and Coca-Cola (organic revenue) are for the past complete fiscal year. Data sources: Company financial filings.

McDonald's stronger rebound

McDonald's business is enjoying much stronger operating trends than Coca-Cola's these days. The fast food titan in late July posted its best quarterly growth performance in over five years as consumers responded positively to new menu introductions and expanded all-day breakfast options. Customer traffic is rising, and at an accelerating pace, which suggests the Golden Arches might finally be gaining market share again. "We're building a better McDonald's and more customers are noticing," CEO Steve Easterbrook said in a recent press release to investors.

A man eating a burger.

Image source: Getty Images.

Coca-Cola, meanwhile, can't claim dramatic progress in its rebound initiative. Volume was flat last quarter thanks to growth in sugar-free cola in key markets like Europe and Latin America that offset declines in the non-sparkling side of the business. The no-sugar brand is set to launch in the U.S. in August, and executives are hopeful that it will help end the long-term slump in the Diet Coke segment. CEO James Quincey can't yet point to accelerating sales gains, but he said executives are encouraged by recent introductions like Coca-Cola Zero Sugar. "We are in a period of substantial transformation and change that is never easy," Quincy said in late July as the company affirmed its outlook for minor organic revenue gains.

Profits and outlook

While Coca-Cola and McDonald's are two of the most profitable businesses on the market, McDonald's wins this margin matchup. Its bottom-line profit margin not only beats Coke's, but it is trending sharply higher, too. The burger giant is benefiting from a refranchising initiative that's shifting more of its business toward highly profitable franchise fees and royalties. Margins should continue expanding at least into 2018, too, as the company moves toward its long-term goal of owning just 5% of its store base, compared to the 15% it controlled at the end of 2016.

Cola in a glass.

Image source: Getty Images.

Coca-Cola is engaged in an aggressive refranchising scheme, too, and by selling off its low-margin bottlers it aims to trade a lower revenue base for higher profit margins. The shift helps explain why sales dove 16% last quarter even as non-GAAP operating margin soared higher by almost 4 full percentage points.

Foolish bottom line

In my view, McDonald's stronger operating performance and improving profitability make it a better long-term bet today. Income investors might be more attracted to Coke's 3% dividend yield given that McDonald's is barely above that of the broader market. But the fast food giant has demonstrated that, with some changes, its core product still resonates with today's consumers, while Coke can't make the same claim.