Inflation is a huge concern for investors and companies today. Rising prices can chip away at profits and lead to less-than-stellar returns. But not all businesses will be affected the same way since some are more resistant to inflation and can increase their prices without having to worry about a significant drop in demand.

A couple of inflation-resistant stocks that investors should consider adding to their portfolios for some stability right now are Petco Health and Wellness (WOOF 3.85%) and Kraft Heinz (KHC 0.04%). Both stocks have been outperforming the struggling S&P 500 this year (it's down 8%), and that's a trend that's likely to continue.

People discussing a sales report.

Image source: Getty Images.

1. Petco Health and Wellness

One way people filled the void while staying at home alone during the early stages of the pandemic was to buy a pet. As a result, the U.S. pet industry was worth a record high $110 billion last year. Americans spent more on not only treats and supplies, but also on vet care.

What's also telling is that Petco Health and Wellness, which is a top name in pet care and operates animal hospitals, recently released its fourth-quarter numbers -- and they continue to look strong. For the period ended Jan. 29, net sales rose by 13% to $1.5 billion, and the company's net profit of $27.3 million was a big improvement from the $6.9 million loss it incurred in the prior-year period.

The business projects that sales for the current fiscal year will come in around $6.2 billion, which would represent a year-over-year increase of just under 7%. A big reason for the upbeat outlook is that Petco is confident consumers aren't going to suddenly stop spending on their pets since that hasn't happened even amid rising costs. On the company's most recent earnings call, management noted that it was able to manage inflation and was "effective in passing through input price increases."

Although this isn't a fast-growing business by any means, Petco can be one of the safer places for growth investors to park their money today. Several analysts see shares of the pet wellness company rising to at least $28 over within the next few years, suggesting an upside of more than 27% from where it is today. 

2. Kraft Heinz

A big advantage of having top brands is that there's often more flexibility in making price increases than if consumers aren't familiar with or loyal to them. And Kraft Heinz owns many popular brands, including Philadelphia, Oscar Meyer, Jell-O, and, of course, Kraft and Heinz. CEO Miguel Patricio stated last year that amid inflation, the company was "raising prices, where necessary, around the world."

By not trying to keep its prices low and take the hit itself, Kraft can protect its margins and put itself in a position to ensure its operating profits remain intact. In the trailing 12 months, the company's operating margin has been 19.6% of revenue while its net margin was 3.9%. Those aren't incredibly strong margins, and letting inflation chip away at them could make it difficult for the company to stay out of the red.

Unlike retailers that are aggressively focused on nothing but price, Kraft can weather the storm more effectively than other companies by raising its prices. And although its quarterly sales have fluctuated, in the past three years they've consistently been over $6 billion and remain steady today.

Chart showing Kraft Heinz's revenue reaching a high in 2021, falling, and rising again recently.

KHC Revenue (Quarterly) data by YCharts

Year to date, the stock is up 17% and has been one of the better investments to hold in 2022. Plus, its dividend yield of 3.8% gives investors an extra incentive to hold on to the stock as that payout is more than double the S&P 500 average of around 1.4%.

If inflation continues to be an issue this year, Kraft may remain a popular company to invest in, and the stock could achieve even higher gains in the months ahead. For long-term investors, the company's stability and top dividend make it an attractive buy for many years.