According to last week's federal Consumer Price Index report, U.S. inflation is now the highest it has been in 40 years. Inflation of 7.5% means that costs will go up and many businesses will have a difficult time retaining high margins. Companies that produce positive free cash flow, turn a profit, and maintain a sturdy balance sheet stand a better chance of persevering through elevated inflation, even if it lasts longer than expected.

3M (MMM -0.66%) and Procter & Gamble (PG -0.03%) aren't the most exciting companies, but they make up for their lack of flair with stable and reliable dividends. 3M has paid and raised its dividend for 64 consecutive years, while P&G has paid and raised its dividend for 65 consecutive years. That makes both companies Dividend Kings -- members of the S&P 500 that have paid and raised their dividends for at least 50 consecutive years. After a period of three years, an investor could expect a $20,000 investment to earn $3,000 in passive dividend income. Here's what makes 3M and P&G great buys now.

Person writing on a sticky note in front of a clear wall with several sticky notes attached to it.

Image source: Getty Images.

3M is turning its business around

Out of the 30 companies that make up the Dow Jones Industrial Average (DJIA), 3M has been the third-worst-performing over the past five years, beating only International Business Machines and Walgreens Boots Alliance. At recent prices, 3M has produced a paltry 3.7% total return over that stretch, compared to 91% for the DJIA.

In many ways, the maker of N95 masks and Post-it notes (among other things) deserved to underperform the S&P 500 and DJIA. From 2016 to 2020, 3M increased revenue by just 7%, net income by 8%, and free cash flow by 26%, which is terrible even for a stodgy, dividend-paying company.

But 3M turned things around in 2021, when it grew revenue by 9.8% year over year to $35.35 billion and net income by 8.7% to $5.92 billion -- both all-time highs for the company.

MMM Revenue (Annual) Chart

MMM Revenue (Annual) data by YCharts.

The ongoing issue with 3M is that the company continues to post low-single-digit organic growth while struggling to improve its profitability. "Operating margins were impacted by higher raw materials, logistics, and outsourced hard goods manufacturing costs, manufacturing productivity impacts, along with increased compensation and benefit costs," said CFO Monish Patolawala on the company's recent fourth-quarter conference call. 

3M is clearly feeling the effects of inflation on its business and is unlikely to be able to pass along all the added costs to customers. Faced with the likelihood that it will have to absorb some of those costs, 3M's operating margin could very well fall this year.

3M may have its problems. But it's also an industry-leading business with a great balance sheet and a track record of outlasting tough times. Most importantly, 3M is also an incredibly inexpensive stock. At recent prices, it was trading at a price-to-earnings ratio of just 15.8, compared to its five-year median P/E of 20.6. With a 3.8% dividend yield, 3M is simply too cheap and has too high a yield to pass up.

A rock-solid consumer staple behemoth

Like 3M, Procter & Gamble makes products we use in our everyday lives. So naturally, it's an easy business to understand. However, unlike 3M, share prices of P&G are within striking distance of their all-time highs as P&G continues to deliver strong organic growth from a focused portfolio of brands.

P&G's restructuring from its fiscal 2015 to its fiscal 2017 paved the way for a more efficient business with better margin expansion and FCF generation. (P&G's fiscal year ends June 30.) In 2021, P&G delivered excellent results while many other consumer staples companies faced declining margins after they were unable to offset the impact of rising costs and supply chain challenges.

P&G expects rising commodity costs, higher freight costs, and higher negative foreign exchange impacts to inflict a $2.8 billion after-tax headwind on its fiscal 2022 results, or a negative impact of approximately $1.10 in earnings per share (EPS). Yet even with that headwind, P&G forecasts core earnings growth of 3% to 6% versus fiscal 2021 core EPS of $5.66. Put another way, P&G is forecasting around $7.00 in core EPS if you factor out the $2.8 billion headwinds, which goes to show how well its business would be performing if it weren't for short-term challenges. 

The glass-half-empty argument is that if inflation continues to rise at its current pace or simply lasts longer than expected, then we could see P&G incur higher costs, which could take a sizable slice out of its margins. However, the good news is that P&G generates plenty of cash to cover its dividend and can easily just buy back fewer shares of its own stock if times get tough. In fiscal 2022, it expects to pay over $8 billion in dividends and buy back a staggering $9 billion to $10 billion in stock. Put another way, P&G is so profitable that it has more than double the cash needed to support its dividend. That's the kind of business investors like to own in uncertain times. 

Not their first rodeo

The DJIA has underperformed the Nasdaq Composite in nine out of the last 10 years. But so far in 2022, the Dow is outperforming the Nasdaq and the S&P 500 as investors shift away from unprofitable growth companies toward diversified stalwarts. Value investing is back in style. And while that doesn't necessarily mean you should sell growth stocks and buy value stocks, it does mean that investing in quality businesses could be the simplest way to outperform the market.

Like most companies, 3M and P&G could adjust their guidance to the downside if inflation spirals further out of control. But income investors can take solace knowing that both businesses would still have plenty of FCF to cover their dividends.

Both businesses raised their dividends throughout the 1970s, which was a prolonged period of high inflation. 3M and P&G have been through several economic downturns and are no strangers to severe short-term uncertainty. 3M and P&G are great choices for risk-averse investors looking for quality dividend stocks they can count on.