When it comes to valuation, most investors fall back on things like the price-to-earnings (P/E) ratio. Earnings are too variable for me, so I prefer metrics like price-to-sales ratio and, my personal favorite, relative dividend yield. Right now the dividend yields on offer from Hormel Foods (HRL 0.76%) and Clorox (CLX 0.16%) are elevated and I think both stocks are worth buying. Here's why.

1. Hormel: This too shall pass

Hormel has increased its dividend annually for over 50 years, making it a Dividend King. Over the past decade its dividend has grown at an annualized clip of 14%. And today, its dividend yield is toward the high end of its historical yield range. While the 2.1% yield may sound anemic when looked at in isolation, that's clearly not the full story. 

Blocks spelling out calm and panic.

Image source: Getty Images.

Hormel is an iconic food maker, with brands like SPAM, Planters, Columbus, and Wholly Guacamole, among many others. It has a flare for innovation, has been buying up higher-margin products while shifting out of commodity businesses, and has a direct selling force in the food service space that gives it a competitive edge. It is also working to expand its reach into the international sphere. There's a lot to like here and no reason to think that the company's business is faltering, even if near-term performance is pressured.

But investors tend to think short-term -- which is why the impact of inflation is such a concern right now. Hormel, like so many other companies, is facing increased costs for ingredients, employees, and shipping. It will need to pass those costs on to customers via price increases, but there's a time lag inherent to this process. So margins are likely to be weak for a time, which could be extended if there is a recession. Thus, investors are down on Hormel's shares even though it has worked through similar situations many times over the past 50-plus years. If you can think long-term, now is the time for a deep dive at Hormel.

2. Clorox: Coming back from a big hit

Clorox's cleaning business saw a massive spike in demand during the early days of the pandemic. The company ramped up supply to appease customers. And Wall Street bid the stock up in a shortsighted frenzy, given that the demand spike, like most such exogenous shocks, wasn't destined to last. The pain came to a head in the fiscal second quarter of 2022, when sales dropped 8% and gross margin contracted a massive 12.4 percentage points. The stock, understandably, plunged when its earnings came out.

Today, the stock's yield, at 3.3%, is toward the high end of its historical range and the shares are 40% or so below the peak they reached during the early days of the pandemic. This despite the fact that Clorox has a 45-year streak of annual dividend hikes behind it, with a 10-year annualized dividend growth rate of around 7%. To be fair, the consumer staples giant has some hard work ahead as it looks to get margins back to historical levels given the inflationary backdrop and the potential for a recession. But when you dig in a little, things aren't actually as bad as they seem.

Most notably, the biggest problem is in the company's cleaning business. Most of the other products it sells are doing just fine. In fact, the company has already shown signs of improvement in the fiscal third quarter. Notably, gross margin was off by 7.6 percentage points, much better than the previous quarter as price hikes and cost-cutting started to take hold. And sales were up 2%. Sure, cleaning supplies remain a weak spot, but that's not at all shocking given the unusual demand spike during the pandemic. 

All in, Clorox looks more like a company that got caught up in a severe and sudden market event that won't have a lasting impact on its business. If you can think like a contrarian, you might want to take a closer look.

Do you zig or do you zag?

If you do the same thing as everyone else on Wall Street, you'll likely end up with the same results as everyone else. Do things a little differently and your performance will deviate, hopefully in a good way. That's why I look at relative dividend yield and not P/E, as it helps me identify great dividend stocks at discount prices. And that's exactly why I think Hormel and Clorox are attractive today. If you take the time to look into these iconic names you might find you agree.