It's been a rough go of it for PepsiCo (PEP 1.86%) investors lately. The stock is hovering around a five-year low and is down over 27% in the past year.

Despite the downward pressure on the stock price, Pepsi has continued to raise its dividend like clockwork. Earlier this month, it boosted its quarterly payout to $1.4225 per share or $5.69 per year -- marking the company's 53rd consecutive annual dividend increase.

Pepsi stock now sports a forward yield of 4.4% -- the highest ever. Here's why I think its yield just peaked and why the dividend stock is a no-brainer buy now.

Two people smile and high-five while sitting at an outdoor table in-front of a laptop computer.

Image source: Getty Images.

Pepsi's dividend yield is on the rise

Pepsi is part of an elite group known as Dividend Kings -- companies that have increased their payouts for at least 50 consecutive years.

The yield will increase when a company's stock price grows more slowly than its dividend. Whereas if a stock price goes up faster than the dividend growth rate, the yield will go down. In this vein, dividend yield can be misleading. A company can have a steadily growing and dedicated dividend program, but a low yield because the stock price does well.

For example, Microsoft has increased its dividend every year for 15 consecutive years, and most of its recent raises have been about 10% per year. But its yield has gone down over time because the stock price has increased by several fold.

In contrast, Pepsi's dividend yield has gone up because the company continues to boost its payout and its stock price has gone down. It wasn't long ago that Pepsi sported a yield of around 2% to 3%. But over the last five years, Pepsi has increased its dividend by 39%, but the stock price is flat -- pushing the yield to where it is today at a record high.

I could see Pepsi's yield peaking here for the simple reason that its stock price will grow faster than its dividend growth rate, which should be about 5% to 7% per year based on the size of Pepsi's recent increases.

A slowdown in consumer spending has impacted Pepsi

Pepsi stock has fallen deeper and deeper into the bargain bin mostly because of sluggish sales growth and limited pricing power. Pepsi has a massively diversified business spanning beverages like flagship Pepsi and other soda brands, juices, water, sports drinks, energy drinks, and more. It also owns one of the largest snack brands in the world -- Frito-Lay -- and package food giant Quaker Oats.

The company was hit hard by inflation and supply chain costs. It has been promoting value-added products to boost volumes while limiting price increases. However, consumer spending is tight, so Pepsi is facing a Catch-22. It either has to cut prices to boost volume or keep prices higher and sell fewer products. Both outcomes lead to sluggish growth.

In terms of pricing power, Pepsi has proved arguably less elite than peers like Coca-Cola. However, that discrepancy is already reflected in Pepsi's valuation.

Pepsi's valuation is beyond cheap

Coke has higher margins than Pepsi due to its bottling partner network and pure-play focus on beverages. By contrast, Pepsi controls more of its operations and is more diversified. But historically, both stocks have fetched similar valuations -- as evidenced by their nearly identical five-year median price-to-earnings (P/E) ratios.

Coke's P/E is above its five-year median, whereas Pepsi's is far below. However, Coke's forward P/E is well below the median, so the stock is still a good value. It's just that Pepsi has become too cheap to ignore.

PEP PE Ratio (5y Median) Chart

PEP PE Ratio (5y Median) data by YCharts

It would be one thing if Pepsi's dividend were out of control and its balance sheet were riddled with debt -- but that's hardly the case. Pepsi's payout ratio is 78% at present. It's not great, as 50% to 75% is typically considered healthy. But it's not bad considering Pepsi is still raking in the free cash flow.

Pepsi has a debt-to-capital (D/C) ratio of 72.5% compared to Coke's 65.2%. The higher the D/C ratio, the more a company relies on debt to finance its operations. So Pepsi is more dependent on debt than Coke, but its leverage is manageable.

Pepsi has been taking on debt for the right reasons. The company has made several savvy acquisitions, including Sabra and Obela snack and dip products, Mexican-American food brand Siete Foods, and prebiotic soda brand Poppi. These acquisitions help diversify its food and drink lineup and cater to mini-meal and health-conscious consumers.

A passive income powerhouse to buy on sale

Pepsi's declining stock price showcases investor frustration with the company's lack of growth. However, long-term investors who care more about where a stock will be years from now than where it is today can capitalize on Pepsi's out-of-favor status by buying the stock at its dirt-cheap valuation and getting a record dividend yield in the process.

If Pepsi shows signs of margin expansion and success with recent acquisitions, it wouldn't be surprising for the stock price to begin outpacing the dividend growth rate -- leading to a lower yield. However, that doesn't mean investors will get less passive income from buying the stock now.

For example, buying Pepsi at the current price of about $130 per share and a dividend per share of $5.69 presents a forward yield of 4.4%. If Pepsi were to go up to $150 per share, investors buying the stock for $150 would only get a yield of 3.8%. But the yield on cost for investors buying the stock now would still be 4.4%.

Add it all up, and Pepsi is a phenomenal opportunity for value investors looking for a stable source of passive income.