Inflation is top of mind today for consumers and investors. For consumer products companies like Procter & Gamble (PG 0.54%), the aim is basically to push through rising prices without consumers trading down to lower-priced options.

Some companies handle this better than others and, so far, P&G appears to be doing an excellent job of getting consumers to pay more. Here's how.

Any number of ways

Consumer staples companies have a great deal of experience when it comes to raising prices. Right now, the issue is all about offsetting inflation, but hiking prices is basically one of their key mechanisms for growing the top line. There are "good" ways and "bad" ways to do it.

A person doing laundry.

Image source: Getty Images.

For example, a company can simply charge more. In a broad way, that's what Dollar Tree (DLTR -0.16%) did when it went from charging $1 for everything in the store to $1.25 for most things. But that is not the normal approach, given the shock it might cause to consumers. A company often will raise the price by showing the old cost as a sale price while listing the new, higher cost as the normal price. In this way, consumers kind of 'back into" the price hike.

Another option is to change the size of packages. Essentially, this means putting less in each package so consumers are buying the same item, but getting less. Or a company can switch to a less expensive ingredient, essentially cutting costs but also potentially reducing product quality. Again, the end result is that a consumer is paying more for less.

These are a few of the big ones; there are other ways companies manage to raise prices in the face of rising costs. But Procter & Gamble prefers to do things a bit more directly. And so far, it is proving incredibly effective.

What it's doing and how well

The core numbers are important here. P&G was able to boost organic sales by 10% in the fiscal third quarter. There were several things that went into that, including price, mix, and volume. Price (charging more) and volume (selling more) are exactly what they sound like, but mix is a bit more complex.

Some companies offer various price points for similar products, so a person can trade down to cheaper alternatives. While it is good to keep customers in the product family, buying cheaper products reduces organic sales.

But a company can also get customers to trade up to higher-priced products. This added 2 percentage points to P&G's sales growth in the fiscal third quarter. This wasn't an across-the-board move, with some product categories seeing better results than others. Notably, P&G's healthcare division witnessed a five-percentage-point boost from mix, nearly double the three percentage points it got from price.

The company highlighted a strong cold and flu season for some of the healthcare group's boost, but also noted "innovation in sleep and digestive wellness." The key word there is "innovation," and it is a strong point for P&G, which has a long history of spending on research and development (R&D). Basically, it brought out new products or introduced new variants of existing products that provided enough benefits to justify charging a higher price. 

This is perhaps the second-best way to get price increases -- the best being to create an entirely new product category, as P&G did when it introduced the Swiffer. While you can argue that introducing a new product category isn't a price increase, the counter argument is that the new product took price from zero to some positive number.

P&G's product portfolio, which tends to sit at the high end of most of the categories in which it plays, is perfect for the R&D approach to price hikes. In essence, the company is using quality to justify increased prices, which is only possible if you are "leading" the industry.

This too shall pass

Procter & Gamble is doing exceptionally well right now as it looks to offset the impact of inflation by raising prices. Offering more quality is management's preferred mechanism, and its consumer products portfolio is filled with opportunities to support the effort.

The problem is that consumers pinched by inflation eventually will start to push back, which is something the company is monitoring closely. That doesn't mean that P&G will stop innovating, just that the near-term benefits of that innovation might not be as apparent. However, the important takeaway here is that the company's current ability to improve mix should be seen as a strength over the long term.