It may feel comforting to park your savings in a bank account or sock it away in a tin under your bed, but the reality is that your money will slowly lose its value due to inflation. Inflation has been in the news recently as it hit a four-decade high of 8.3% in April. The Federal Reserve hiked interest rates by half a percentage point, its sharpest single increase in 22 years, to combat this scourge.

However, there is a way to beat inflation, and that's to park your money in stocks that can successfully raise their prices over time to either match or exceed the long-term inflation rate. Such businesses normally have strong brands and competitive moats, are household names, and are well-loved by consumers, allowing them to raise prices without losing a chunk of their customers.

Here are three inflation-resistant stocks that you can consider adding to your investment portfolio.

Burger, Fries and a Coke

Image source: Getty images.

3M

3M (MMM -1.31%) is no doubt one of the most successful and innovative industrial conglomerates in the market. The company generated $35.4 billion of sales in 2021, and has a diversified business that deals with everything from adhesives and ceramics to wound care products and stationery. The diversity of its portfolio ensures that this stalwart is adequately insulated from economic upheavals such as recessions, while also allowing it to enjoy the upside from the different industries where it has a presence.

For 2021, 3M saw its net sales rise 9.9% year-over-year to $35.3 billion while net income rose 8.7% year-over-year to $5.9 billion, demonstrating its resilience throughout the pandemic. The company also has a stellar track record of paying out increasing dividends, chalking up 64 consecutive years of increases and putting it firmly on the list of dividend kings. It also spends around 5% to 6% of its sales on research and development which ensures it continues to devise innovative solutions for its customers.

The conglomerate will continue to prioritize growing faster than the markets it serves, and has also been active in capital recycling. In March, it divested its floor products business in Western Europe as part of its portfolio management plans, and in April the company acquired LeanTec, a provider of digital inventory management solutions for the automotive aftermarket segment. These moves, along with its strong performance track record and cutting-edge products, should serve 3M well into the future.

Procter & Gamble

If you're looking for a stock that has a long track record and has been through multiple economic cycles, look no further than Procter & Gamble (PG -2.38%). The company has been in business for more than 180 years and boasts a broad portfolio of consumer goods in 10 categories, selling to more than 180 countries. With well-known brands such as Pantene, Olay, Oral-B, and Pampers, Procter and Gamble has superior pricing power that can help it to stay ahead of inflation.

For its fiscal 2021, ended June 30, net sales rose 7% year-over-year while net income increased by 10% to $14.3 billion. The company's momentum has carried over to the first nine months of fiscal 2022, where net sales increased 6.1% year-over-year while net income inched up 2.5% despite the impact of inflation.

Procter and Gamble also increased its quarterly dividend to $0.9133 per share, marking its 66th consecutive year of dividend increase. Its guidance for fiscal 2022 sales growth of 4% to 5% and net income growth of 6% to 9% showcases the company's ability to continue expanding despite the cost pressures it faces.

McDonald's

As one of the most widespread fast-food chains, McDonald's (MCD 0.70%) is a powerhouse with 38,000 locations worldwide. The company stood firm in 2021 even as the pandemic swept across the world, reporting a 21% year-over-year jump in total revenue to $23.2 billion and a 59% surge in net income to $7.5 billion. Its famous "Golden Arches" and focus on families have kept demand high for the  and this trend is likely to sustain over the long term.

That momentum has carried forward into the first quarter of fiscal 2022, with McDonald's reporting total comparable store sales of 11.8%, up from 7.5% in the prior year's quarter. Total sales increased by 11% year-over-year, and net income (excluding exceptional and one-off items) climbed by 19%. The company has also declared a quarterly dividend of $1.38 per share, up 7% from the year before, and has increased its dividend for an impressive 45 consecutive years.

McDonald's is not resting on its laurels, though, and is actively building its network by partnering with food delivery companies. In mid-May, McDonald's and Deliveroo agreed on a new, long-term partnership that will see the two companies working hand in hand to broaden the fast-food chain's reach even further.