Unless you've been hiding under a rock, you know that inflation has been eating away at your buying power in a big way over the past year or so. A key part of the pain has come as companies jack up their prices to offset their own rising costs. Unilever (UL 0.34%), one of the consumer staple industry's giants, recently provided some very painful details on that trend.

Meanwhile, another industry icon, Clorox (CLX 0.60%), has resorted to price hikes multiple times over the past year. And now, that company is leading the industry on the price front with yet another increase. What happens next with pricing could be good news or bad news for the consumer staples sector -- and for investors in these stocks. Let's dive in.

The pain is real

Unilever recently provided an unusual amount of detail on the cost increases it has been facing. The consumer staples company's fourth-quarter earnings presentation highlighted that cost headwinds were pretty mild between 2018 and 2020, but then started to tick up in 2021. The year-over-year jump was huge, with costs going from around 100 million euros to about 1.3 billion euros by 2021.

Then, in 2022, the numbers simply took off, with costs rising to 4.3 billion euros. The pace actually increased as the year progressed, making a bigger jump in the second half of 2022. The company has said that logistics and production inflation are a key issue as well, so commodity prices are not the only problem to watch.

A person shopping in snack aisle of a grocery store.

Image source: Getty Images.

Looking out to 2023, Unilever believes cost headwinds are going to remain a problem. In other words, this issue isn't going away. Which is why the company has been increasing consumer prices in an effort to protect its margins. It's exactly what every consumer staples company is doing right now, including Clorox. 

Only this is a delicate dance, because consumers don't like to pay more for the products they buy. So far, price increases have been fairly well received. Clorox noted when it reported earnings for its fiscal second quarter (ended Dec. 31, 2022) that "elasticities from our July pricing have been in line with our expectations." In other words, the drop-off in the volume of products sold was reasonable relative to the price increases it pushed through. 

The future?

The problem is, as Unilever has pointed out, costs are still rising at the corporate level, which is impacting every industry participant, including Clorox. That is why Clorox put through another round of price increases in late 2022 -- the fourth round in about a year. That's a lot of price action in a very short period of time. More notable, however, is that during the earnings conference call Clorox's management admitted that it was "leading" on price. In plain English, it is moving faster than its peers with regard to price increases.

There are risks to being ahead of the curve on pricing. If the Clorox's competitors don't follow along and increase prices, then Clorox products will look relatively more expensive than the competition. Consumers may choose to save money and buy the relatively less expensive products. The other side of the equation, even if other companies also raise prices, is that customers may be put off by yet another round of price hikes. That, again, would lead to reduced volume.

Clorox is, understandably, watching the impact of its latest round of price increases very closely. Investors looking at the consumer staples space should pay close attention, too. When the company reports fiscal third-quarter 2023 earnings, a lot will depend on whether or not the latest round of pricing stuck.

If competitors don't follow along or consumers push back by reducing purchases, Clorox will be forced to walk back the increase and the company's margin recovery will probably be less robust than hoped. If that unfavorable outcome happens, it suggests that the entire consumer staples sector will be facing a tougher environment in 2023 than it did in 2022, which was already a pretty hard year on the pricing front.

Not the end of the world, but...

Dealing with the impact of rising costs is a normal part of business and, over time, companies like Clorox and Unilever will figure out a way to improve their margins. The bigger question is how long that process takes, which is basically what Clorox is testing right now.

If it has to reduce prices, weak operating margins could be a much bigger headwind for much longer than hoped. And that's an issue that will likely play out throughout the entire consumer staples sector. Even if you don't own Clorox, you should be watching what it does on pricing right now.