The price-to-earnings ratio is the usual go-to valuation metric for stocks, but earnings can be incredibly volatile, limiting the value of this ratio for long-term investors. That's why I prefer a metric based on something a bit more consistent -- like dividends. Simply put, when a reliable long-term dividend payer's yield is historically high, I want to do a deep dive.

Right now, Hormel Foods (HRL 0.29%) and Clorox (CLX 1.42%) fall into this category. Here's why you might want to own them, just like I do.

Making all the right moves

Hormel's roughly 2% yield is toward the high end of its historical range. To be fair, I bought when the yield was a bit over 2%, but that doesn't materially alter that fact that this iconic food maker looks fairly cheap compared to its history. The dividend, meanwhile, has been increased for an incredible five decades, making Hormel a Dividend King.

One of the subtle facts of note here is that The Hormel Foundation owns around 48% of the company's shares, helping to both ensure its independence and increase the likelihood of dividend consistency (the foundation uses the dividends it receives to fund its charitable giving). 

A person with a full shopping cart in front of an open car trunk.

Image source: Getty Images.

But the real story is the company's strong brand portfolio, which includes such names as Hormel, SPAM, Planters, Columbus, and Jennie-O, among many others. In fact, Hormel has leading brands throughout domestic grocery stores, with a growing presence in convenience stores and international markets. Acquisitions have been a key part of the company's portfolio growth, but innovation is also important. For example, the company created peanut butter balls in its Skippy platform to turn what is normally a spread into a grab-and-go snack. 

Hormel also has a substantial foodservice business, which often gets overlooked. There are a couple of interesting things to note here. First, it has a direct selling force so it has its finger on the pulse of the food-service sector. And second, it sells prepared meat, which helps reduce staffing needs for restaurants. This is a big win in today's tight labor market. 

Although Wall Street is likely worried about inflation today, Hormel's history suggests it will eventually be able to pass its rising costs on to customers. And in the meantime, you can buy a relatively cheap stock with a great dividend history.

That was bad, but it's getting better

Clorox is another iconic name with a collection of leading brands, from namesake Clorox to Burt's Bees and Glad. It has increased its dividend annually for 45 years, making it a longtime Dividend Aristocrat. It has a generous 3% dividend yield. Like Hormel, I bought Clorox when its yield was a bit higher, but that doesn't change the fact that it still looks fairly cheap compared to its own historical yield history.

The problem is that Clorox's margins crashed 12.4 percentage points in the second quarter of its fiscal 2022. There were a couple of factors behind that, including inflation. Like Hormel, Clorox will eventually pass its own rising costs on to consumers.

The other key issue in the fiscal second quarter was that it lapped a period in which the company's cleaning products were seeing heightened demand because of the coronavirus pandemic. That was a windfall event that disrupted the company's business as it had to quickly ramp up production. Now that demand has fallen off, the company's financial results are being impacted in the opposite direction. 

Clorox stated in its fiscal second-quarter earnings update that it was working quickly to get back on track, including increasing prices and ending deals with contract manufacturers. And when it reported fiscal third-quarter 2022 earnings in early May, margins were off by 7.6% year over year. That's still not exactly good, but it shows that the steps which management is taking are having the desired effect. Moreover, organic sales increased 2%, so the business is hardly in a bad state. 

All in, it looks like investors aren't reading deeply enough into Clorox's results to see the long-term opportunity here. If you can stomach a little uncertainty as it works to get profitability back to historical levels, now is a great time to examine this iconic company.

Out of step

Hormel and Clorox are facing notable headwinds today. But their histories suggest that they know how to deal with a little adversity. And the historically high yields on offer deserve a closer look. If you are comfortable taking a contrarian view, you can collect generous dividends (along with me) while you await better days.