PepsiCo (PEP -0.62%) recently gave investors some new reasons to feel cautious about the stock. While the company achieved solid sales growth this past year, demand slowed into early 2024, according to management's early February update. The consumer staples company is also projecting weaker sales trends ahead as its inflation-based price increases end.

That's unfortunate news for income investors since Pepsi and its 3% dividend yield are so popular with fans of passive income. But there's another top dividend company that looks more attractive today and pays a hefty yield of nearly 2.5%. Let's look at some reasons to buy McDonald's (MCD -0.91%) right now.

Slower is OK

McDonald's shares fell in the wake of its early February earnings report, yet investors should see that drop as a chance to pick up a quality business at a discount. Sure, comparable-restaurant sales through late December slowed to 3% in the fourth quarter from 9% for the full 2023 year. The core U.S. market notched a mildly disappointing 4% increase compared to 9% in the prior quarter as well.

The chain will bounce back with some big growth avenues it can pursue this year. Its home delivery and drive-thru channels are highly popular, for example, and the chain is planning to stress its value proposition in the coming quarters to boost customer traffic back into positive territory.

Pepsi, on the other hand, seems much more constrained by the tough selling conditions that characterize the snacks, food, and at-home beverage niches. Investors should prefer to own stocks that have more control over their own fate, like McDonald's does.

Market-leading earnings

Mickey D's doesn't just have some of the highest profit margins in its industry, it is among the most profitable companies in any industry. Compare its nearly 50% operating profit margin with PepsiCo's 14%, or even with the 44% that Microsoft generates right now, and that's clear enough.

MSFT Operating Margin (TTM) Chart

MSFT operating margin (TTM) data by YCharts; TTM = trailing 12 months.

Most of this success can be attributed to the dividend stock's lucrative selling model that relies on royalties, rent, and franchise fees from its huge global footprint of franchisees.

It also helps that McDonald's maintains the world's most valuable fast-food brand, with all the pricing power that this asset delivers. "We remain confident in the resilience of our business amid macro challenges that will persist in 2024," CEO Chris Kempczinski told investors in mid-February.

Price and value

You'll pay a premium for McDonald's over PepsiCo and some other passive-income stocks, to be sure. Its price-to-sales ratio is over 8 compared to Pepsi's 2.5, in fact. Mickey D's also pays a more modest yield of 2.4%, while Pepsi is yielding closer to 3%.

Investors have to balance those weaknesses against the stock's clear operating advantages. McDonald's has shown it can grow through just about any selling environment. It can boost profit margins during booming consumer-spending periods and when shoppers are feeling price-sensitive. And through it all, the fast-food giant steadily hikes its dividend, as it has for nearly 50 consecutive years. That's a recipe for market-beating long-term returns for patient income investors.