If you're nearing or in retirement, dividend-paying stocks like Procter & Gamble (NYSE:PG) and Pepsi (NYSE:PEP) are likely high on your list of stocks to own. Both have solid business with recognizable moats and products that we are all familiar with.

Importantly, they both have a tradition of regularly upping their dividend payouts as well, which should be music to the income investor's ears.

Five small plants getting progressively taller, with an arrow to highlight the growth.

Image source: Getty Images

But between the two, which is the better buy today? That's a very difficult question to answer. And as you'll see below, even when we run both companies through the gauntlet of three crucial criteria, they still come out on relatively even footing. Here's why.

Sustainable competitive advantage

By far the most important thing for long-term investors to understand is a company's sustainable competitive advantages -- often referred to as its "moat." In the most basic sense, a moat is what differentiates one company from the next.

In the case of both Procter & Gamble and Pepsi, the key moat is the strength of their respective brands. Procter & Gamble is parent company to household items like Crest, Charmin, Gillette, Head & Shoulders, and Pampers, among others. A 2016 study by Tenet Partners and CoreBrands ranked Procter & Gamble as having the 60th most powerful brand in America.

Pepsi, on the other hand, is much more than just the eponymous soda. It is also parent company to Quaker Oats, Tostitos, Gatorade, Frito Lay, and many other consumables. Apparently, the strength of these brands is much higher, as the same 2016 study had Pepsi coming in 7th place in the country.

To be clear, both companies have their challenges as well. Though Pepsi does have some "good for you" foods on its roster, it also has a host of products that are falling out of favor in the developed world. Meanwhile, Procter & Gamble will increasingly face competition from the likes of Amazon's private label brands.

That being the case, Pepsi still comes out ahead on this metric.

Winner = Pepsi

Financial fortitude

As I already said, investors who put their money behind either of these companies are likely motivated by regular and growing dividend payouts. But while it might be tempting to go for companies that pay out all of their excess cash to shareholders, there's something to be said for owning a company with a safe pile of cash on the side as well.

That's because every company, at one point or another, is going to face difficult economic times. Those with lots of cash -- and not too much debt -- can actually benefit from such down times, buying back shares on the cheap, acquiring rivals, or underpricing the competition to steal market share.

Here's how Procter & Gamble and Pepsi stack up, keeping in mind that the former is valued at a 40% premium to the latter.

Company

Cash

Debt

Net Income

Free Cash Flow

Procter & Gamble

$15 billion

$18 billion

$15 billion

$9.4 billion

Pepsi

$19 billion

$31 billion

$6.8 billion

$6.5 billion

Data source: SEC filings, Yahoo! Finance. Net income and free cash flow presented on trailing twelve-month basis. Figures rounded to nearest billion

Both companies have healthy balance sheets with more than enough free cash flow going into their respective pockets every year to meet all of their obligations. That being said, Procter & Gamble has a more favorable cash-to-debt ratio, and that gives the company an edge.

Winner = Procter & Gamble

Valuation

And then we have the can of worms that is valuation. There's no one metric that can tell you just how expensive a stock is. Instead, I like to use a number of data points to get a more holistic picture.

Company

P/E

P/FCF

PEG Ratio

Dividend

FCF Payout

Procter & Gamble

24

25

3.5

3%

77%

Pepsi

23

26

3.5

2.7%

67%

Data source: SEC filings, Yahoo! Finance, E*Trade. P/E represents non-GAAP earnings.

This is about as close to evenly valued as I've ever seen after more than a year of writing such articles. Pepsi and Procter & Gamble trade for almost identical ratios across the board. And while one's dividend is a little higher, the other has more room for growth via the payout ratio from free cash flow.

Winner = Tie

My winner is...

So there you have it: Pepsi has a stronger moat, Procter & Gamble has the stronger balance sheet, and both companies are about evenly valued. Whenever this is the case, I use the company with the strongest moat as the tiebreaker. In this case, that means that Pepsi comes out ahead.

While I'm not a dividend investor myself, I think retirees should kick the tires on Pepsi if they're looking for a reliable dividend payer to add to their portfolio.

Brian Stoffel owns shares of Amazon. The Motley Fool owns shares of and recommends Amazon. The Motley Fool recommends PepsiCo. The Motley Fool has a disclosure policy.