There's a recession looming on the horizon. No one knows when it will come, whether in a few weeks or a few months, but there is one out there. Smart investors will prepare now for the inevitable.

A recent CNBC + Acorns Invest in You survey found that 81% of Americans are worried about a recession striking this year. With rampant inflation, rising interest rates, soaring gas prices, and even higher diesel fuel prices -- which increases the cost to transport goods by truck around the country -- the likelihood for the economy to stall seems high.

Bull and bear squaring off over stock tables.

Image source: Getty Images.

That means the chance for a double-digit correction to hit the stock market will follow and push us into a bear market. While recessions are part and parcel of the investing cycle, they tend not to last very long, relatively speaking. The Schwab Center for Financial Research says the average bear market lasts only about 17 months.

While that will give savvy investors an opportunity to scoop up stocks of good companies at low prices, you can also protect yourself heading into a downturn, and a flight to safety is often one of the best maneuvers you can take to insulate your portfolio from the coming storm. And Procter & Gamble (PG 0.54%) is arguably one of the best companies you can buy to bolster your holdings before it hits.

An adult and a child in a bathroom.

Image source: Procter & Gamble.

Buying what you know

The consumer products giant also happens to be one of the bluest of the blue-chip stocks. It has paid a dividend to investors for more than 130 years. There are literally just a couple of companies today that have a longer record, making it a safe haven for investors in all kinds of market conditions.

The breadth of its brand name product portfolio, which includes Crest, Charmin, Febreze, and Pampers -- products that are often the No. 1 or No. 2 brand within their particular niche -- means consumers are not only familiar with its products but are also readily willing to buy them. 

That familiarity makes Procter & Gamble brands ones that people will easily turn to when wanting to ensure they're getting quality for their money when times get hard. Having been in business for so long also means the stock knows how to weather all kinds of storms. It has been through recessions and depressions, wars, market crashes, and other calamities, yet continues to grow regardless.

A particular strength is its broad geographic diversity as well. While in a connected global economy it's not as much of a differentiating factor as it once was, different regions of the world still rise and fall at different rates from the U.S. Procter & Gamble has operations in approximately 70 countries with products sold in over 180 countries. More than half of its $76 billion in annual sales comes from international markets.

Person counting out $100 bills.

Image source: Getty Images.

A global footprint of growth

Not that rising costs and supply chain issues haven't impacted Procter & Gamble like other companies, but it just reported its single best quarter for core sales growth in 20 years. 

Fiscal third-quarter 2022 organic sales jumped 10% from the year-ago period on the strength of a 30% gain in sales of personal healthcare products such as Vicks, Pepto-Bismol, and Metamucil. 

Fabric and home-care products were also solid performers. They are its most profitable segment, representing 29% of net earnings. 

In addition to the consumer goods company paying a dividend for well over a century, it has raised the payout for more than 60 consecutive years, making it a Dividend King. There are few stocks as safe and secure as Procter & Gamble, making it one of the best companies to own in troubling times.

Safe and sound

This doesn't mean its stock won't go down, but the strength of its business allows its shares to inexorably rise over time. Over the past 50 years it has returned more than 5,100%, meaning a $10,000 investment back in the 1970s would be worth a half-million dollars today. In comparison, the S&P 500 has returned just 3,600%. 

Not bad for a stodgy, somewhat boring consumer products company, and one that makes Procter & Gamble a perfect buy for today's world.