When the stock market gets volatile, as it is today given the recent sell-off, investors often look for safe-haven investments. Dividend King Coca-Cola (KO -0.07%) is a consumer staples giant that fits that bill.

But there are other options, and one attractive choice is a direct competitor to Coca-Cola. In fact, fellow Dividend King PepsiCo (PEP -2.04%) offers both a higher yield and, the biggest plus, a more attractive valuation.

Coca-Cola is an industry leader, and the market knows it

Coca-Cola owns one of the most recognized brands in the world, with lots going for it. It has an incredible distribution system that spans across more than 200 countries. It is a leader in the advertising space. It has a strong research and development team. And it is large enough that it can act as an industry consolidator, buying up-and-coming brands and products to fill out its portfolio. There's a reason why Warren Buffett has owned Coca-Cola within Berkshire Hathaway for decades.

A person using a calculator with a piggy bank in the foreground.

Image source: Getty Images.

There's just one problem: Investors are well aware of Coca-Cola's many strengths. Now add in the fact that the business is performing fairly well even as market uncertainty has increased. It shouldn't be surprising to find that investors have bid the price of Coca-Cola up. Right now, the stock's price-to-sales and price-to-earnings ratios are above their five-year averages.

It isn't that conservative investors would be making a terrible choice in buying Coca-Cola today. But they would be paying a premium price. The 2.8% dividend yield, notably, is near the lowest levels of the decade.

NYSE: KO

Coca-Cola
Today's Change
(-0.07%) -$0.04
Current Price
$68.33
Arrow-Thin-Down
KO

Key Data Points

Market Cap
$294B
Day's Range
$67.76 - $69.98
52wk Range
$57.93 - $73.95
Volume
22,770,697
Avg Vol
18,835,625
Gross Margin
61.16%
Dividend Yield
2.87%

PepsiCo offers more yield at a more attractive valuation

There's another option if you are interested in Coca-Cola, and that's its competitor, PepsiCo.

To get the big numbers out of the way, PepsiCo's 3.6% dividend yield is near the highest levels in its history. And PepsiCo's price-to-sales and price-to-earnings ratios are below their five-year averages. Basically, where Coca-Cola looks expensive and is offering a historically modest yield, PepsiCo looks cheap and is offering a historically high dividend yield.

As for its business, PepsiCo has an incredible portfolio of brands, too. Only its brands span across beverages, snacks, and packaged food products. It is an industry leader in the first two and a highly capable competitor in the last category. Like Coca-Cola, PepsiCo has strong distribution, marketing, and R&D skills.

And it is large enough to act as an industry consolidator, which has been highlighted of late by the acquisitions of Siete Brands (Mexican-American foods) and the pending purchase of Poppi (prebiotic soda).

NASDAQ: PEP

PepsiCo
Today's Change
(-2.04%) -$2.92
Current Price
$140.27
Arrow-Thin-Down
PEP

Key Data Points

Market Cap
$196B
Day's Range
$139.15 - $145.40
52wk Range
$139.15 - $183.41
Volume
9,487,163
Avg Vol
7,464,290
Gross Margin
54.84%
Dividend Yield
3.79%

The difference with PepsiCo is that growth has slowed from the unusually fast pace experienced after the jump in inflation following the coronavirus pandemic. That growth was supported by the ability to raise prices, thanks to inflation. In addition, the snack category is dealing with a slowdown in demand too, as consumer preferences shift.

There are legitimate reasons why investors might be worried about PepsiCo. But long-term dividend investors should probably see this as an opportunity to buy a great company while it is on sale.

Sometimes it's worth buying a struggling business

Every company goes through hard times. When a well-run company hits a weak patch, it is often a good idea to see it as a chance to buy a great company at a good price. That's what PepsiCo looks like today, noting that this is not the first time the Dividend King has had to deal with adversity.

Sure, Coca-Cola is performing better at the moment, but paying a premium price for the stock limits the long-term appeal of the investment opportunity. PepsiCo's cheaper valuation and higher yield are likely to be far more rewarding over the long term.