Stocks tend to rise at a faster rate than inflation. That fact makes investing in the stock market an attractive option when you're looking to protect against the slow but steady loss of purchasing power that inflation creates. Other investment instruments like cash savings or bonds just don't offer the same defense.

Yet some stocks are better than others if you're worried about accelerating inflation. These businesses have a proven ability to raise prices over time.

Let's look at three standout performers in this arena: Netflix (NFLX -0.08%), Procter & Gamble (PG 1.52%), and Costco Wholesale (COST 0.84%).

A couple holding cash.

Image source: Getty Images.

Netflix

It wasn't long ago that Netflix was charging most of its users less than $8 per month for unlimited access to its streaming service. But average prices in the core U.S. market hit $13.32 in 2020, up from $12.57 in 2019 and $11.16 in 2018 .

Streaming fans happily paid those rising prices. In fact, Netflix expanded its U.S. membership from 67 million to 72 million over the last three fiscal years.

Besides that loyal and growing customer base, two other factors imply big price increases on the way. First, Netflix is executing a huge push into premium movie releases in 2021, which should give it room to ask for a bit more from its users. Disney, after all, is charging $30 for premium access to some of its cinema-quality releases on the Disney+ service.

Second, Netflix tends to boost prices roughly in accordance with trends in average viewing hours. The streaming video leader set new records on this score in 2020, and a flood of exclusive content should support many more years of gains ahead.

Procter & Gamble

Procter & Gamble dominates several global consumer-staples niches, and that factor alone makes it an attractive investment option. But the company is also great at boosting the value of franchises like Tide detergent and Bounty paper towels so that investor returns can grow.

In its most recent quarter, organic sales rose 8% thanks to a healthy mix between rising volumes (5%) and increased average prices (3%). Innovations like fabric beads and unit-dose laundry detergent (Tide Pods, for example) have helped P&G grow sales by more than its fair share through the pandemic.

Its dividend offers another great counterweight against inflation. That payout, which has risen in each of the last 63 years, will see its 64th consecutive annual increase in April. And with annual earnings soaring over the last year, investors could be in for a bigger boost than last year's 4% increase.

Costco

Costco makes almost no profit on the merchandise it sells. And yet its annual income grows at a rapid clip with each passing year.

COST Operating Income (TTM) Chart

COST Operating Income (TTM) data by YCharts. TTM = trailing 12 months.

That seeming contradiction is explained by the warehouse retailer's membership fees, which make up most of its yearly earnings. Costco charges $60 a year for basic access to its stores and $120 a year for its premium subscription.

Shoppers would be happy to pay more for that service, given the surging customer traffic Costco enjoyed throughout the pandemic. Management usually increases the monthly fee about every five or six years. Considering that Costco's renewal rate is sitting near a record-high 91% today, the chain should have no issues selling its next increase to that loyal shopper base.

Sure, rising costs will create a challenge for Costco, just like they would for Netflix and P&G. But these companies have a good track record for keeping earnings growth ahead of any change in their expense burdens. That's a simple but powerful formula for market-thumping investor returns over time.