Inflation is hard on everyone as costs increase. That includes consumer-staples makers that face rising input costs. But Wall Street often takes too short a view of this sector, and that can open up opportunities for long-term investors. Two names worth looking at today if you have $1,000 to play with are Hormel Foods (HRL 0.96%) and Unilever (UL 1.19%).

1. Hormel: Steady increases

Obviously, investors should only put money to work that they don't expect to need in the short term. That way, it can grow over the long term. Which is exactly what food maker Hormel has done for investors over time -- and with a specific focus on growing its dividend.

To put some numbers on that, Hormel has increased its dividend for 50 consecutive years, making it a highly elite Dividend King. That's pretty impressive, and what's even more incredible is the rate of dividend growth. Over the past decade, the dividend has been increased at an annualized rate of 13%. Put another way, the dividend has gone from $0.30 per share per year in 2012 to an expected $1.04 in 2022. That's huge.

A person checking another person out at a grocery store with a person bagging.

Image source: Getty Images.

Backing that growth is a company with a stable of iconic brands, including Spam, Hormel, Skippy, and Planters, among many others. In fact, it's probably best to view Hormel as a brand manager, with a keen focus on innovation.

It also has a growing presence outside the United States, which is a key growth opportunity for the company. And, unlike many of its peers, it has a sizable business selling directly into the food service industry. What sets it apart here is that the core of its offering is pre-cooked meats, which helps restaurants save time and keep head count low.

It's an interesting company in more ways than one, including the fact that the Hormel Foundation has a massive ownership stake that basically ensures Hormel won't be taken over.

The one drawback here is that the yield is "just" 2.3% today. That happens to be historically high for the company, however, which suggests it is being priced cheaply right now as investors worry about the impact of inflation on margins. But food makers like Hormel have a long history of passing higher costs along to consumers via price increases.

There's just a lag between when the price hikes go into effect and when the company feels the sting of higher costs. Hormel should, over time, be just fine. Long-term investors looking for a solid dividend growth stock will want to do a deep dive on this stock now -- while investors are still taking a glass-half-empty view of things.

2. Unilever: Getting back on track

Unilever is dealing with the same inflationary concerns as Hormel is, which it should eventually work through. Only this consumer-staples company (it sells both food and personal-care items) is also dealing with a string of negative events that have left a sour taste in investors' mouths.

For example, the company tried to buy the over-the-counter healthcare business of GSK (formerly GlaxoSmithKline) at a price point that investors didn't like. That deal was eventually scuttled, but helped lead to activist investor Nelson Peltz buying a stake in the company and eventually getting a board seat.

Peltz famously helped to turn around Unilever's peer, Procter & Gamble, which is the key factor that investors should consider here. Unilever is in turnaround mode. That includes changing up the business structure, adjusting pay methodology, and selling assets, among other things.

All of this, meanwhile, has taken shape while the company has been dealing with a global pandemic and raging inflation. It is too soon to tell how much success the company's internal changes are having, even though there have been signs of success on the inflation front as management pushes through aggressive price hikes.

The fact that so much is going on at one time helps explain why the dividend yield here is 4.3%. As with Hormel, that's a historically high figure, but one that income-focused investors will likely appreciate a bit more.

Unilever has been around for a very long time, tracing its history back to the mid-1800s, so it seems likely to survive the current headwinds. And with the help of some outside guidance (from Peltz), there's strong reason to believe it will eventually thrive again. In the meantime, you get paid very well to wait for better days.

Things people buy

Underpinning both Hormel and Unilever are businesses that sell items people need and use regularly. While Hormel is most appropriate for dividend-growth investors and Unilever for those focused on current income, they both appear to be trading at attractive price points today.

If you have $1,000 or more to put to work, you should take a look at these staples stocks. You'll likely find that one of them, if not both, fits well inside your portfolio.