AT&T (T -1.37%) and Procter & Gamble (PG -0.03%) are both considered by many to be safe dividend stocks for long-term investors. AT&T is one of the top telecom companies in the U.S. and P&G is one of the biggest consumer staples companies in the world.

Over the past 12 months, AT&T's stock price rose 2% as P&G's stock price dipped 5%. Both stocks held up better than the S&P 500, which declined 6% during the same period. Those returns weren't impressive, but they suggest both stocks can still be considered safe haven plays as the bear market drags on. But is one of these blue-chip stalwarts a better buy right now?

An adult and two children save coins in a piggy bank.

Image source: Getty Images.

Don't confuse the old AT&T with the new one

AT&T tried to become a pay-TV and media superpower by acquiring DirecTV in 2015 and Time Warner in 2018. Those massive acquisitions caused its debt levels to skyrocket, and the growth of its core telecom business stagnated as it chased Netflix with a fragmented and unprofitable streaming video ecosystem.

It abandoned those efforts by spinning off DirecTV and WarnerMedia over the past two and a half years. It also streamlined its business by divesting its non-core assets and focusing on its wireless and wireline businesses again. Therefore, today's AT&T is no longer a sprawling media giant -- and it's arguably better equipped to compete against Verizon Communications and T-Mobile US in the telecom market.

AT&T's wireless segment gained 2.9 million postpaid phone subscribers in 2022, while its larger competitor Verizon only added 201,000 comparable subscribers. The expansion of AT&T's consumer-facing fiber networks also offset the slower growth of its business wireline segment, which faced tougher macroeconomic headwinds.

AT&T's revenue rose 2% (on a stand-alone basis from continuing operations) in 2022. It generated $14.1 billion in free cash flow (FCF) for the full year, which comfortably covered its $9.9 billion in dividend payments, but its adjusted EPS still slipped 2% as it incurred higher expenses at its 5G and business wireline divisions.

For 2023, AT&T expects its adjusted EPS to decline another 5% to 9% (mainly due to higher pension costs and a higher tax rate), but it believes its annual FCF will still rise at least 13% to more than $16 billion. Therefore, AT&T's forward dividend yield of 5.6% still looks safe -- even though it reduced that payout after it spun off WarnerMedia last year -- and its low forward price-to-earnings ratio of 8 could limit its downside potential.

P&G also slimmed down its business in recent years

P&G was once criticized for accumulating too many brands and allowing its losers to overwhelm its winners. But since 2014, the consumer staples giant has shrunk its portfolio from about 180 brands to only 65 brands -- which currently include Tide, Pampers, Tampax, Charmin, Bounty, Gillette, Oral-B, Head & Shoulders, Pantene, and SK-II.

Those streamlining efforts, which included its sale of 41 beauty brands to Coty in 2016, turned P&G into a more efficient company. Today, it still reaches about 5 billion consumers across 180 countries with a well-diversified portfolio of beauty, grooming, healthcare, home care, baby, feminine, and family care products.

That scale gives it a lot of pricing power throughout economic downturns. That's why P&G's sales remained stable throughout the pandemic, which drove more shoppers to stock up on household essentials, as well as inflation, which it successfully countered by raising its prices. In fiscal 2022 (which ended last June), P&G's organic sales rose 7%, its EPS grew 6%, and it generated an adjusted FCF of $13.8 billion -- which easily covered its $8.8 billion in dividend payments.

For fiscal 2023, it expects its organic sales to grow 4% to 5% as its diluted EPS rises 0%-4% -- even after absorbing a $1.50-per-share impact from unfavorable currency headwinds. That's a stable outlook, but P&G's stock also looks a bit pricier than AT&T's at 24 times forward earnings. It also pays a lower forward dividend yield of 2.5%.

However, P&G's debt-to-equity ratio of 1.6 is much lower than AT&T's ratio of 2.8 -- which remains high due to its acquisitions of DirecTV and Time Warner. P&G is also still a Dividend King that has raised its payout for 66 consecutive years, while AT&T's streak ended after it spun off Warner Bros. Discovery. P&G also arguably faces fewer direct competitors than AT&T, which can't significantly raise its prices in its three-way battle against Verizon and T-Mobile.

The better buy: AT&T

AT&T still has some glaring flaws, but it's in much better shape than it was before. P&G is a solid evergreen stock, but its valuation seems to have been inflated by the ongoing flight toward defensive stocks. Therefore, I believe P&G's stock has less room to run this year than AT&T's -- which could command a higher valuation once it convinces investors that it's turned over a new leaf and its core telecom businesses have stabilized. AT&T's high yield should also make it an attractive alternative to fixed-income investments as interest rates continue to rise.