At a time when inflation is running amock, it's worth taking a lesson or two from longtime investors who've seen it all before.

Consider Warren Buffett's thoughts on the matter. When inflation was rampant in 1977, he wrote, "Our acquisition preferences run toward businesses that generate cash, not those that consume it. As inflation intensifies, more and more companies find that they must spend all funds they generate internally just to maintain their existing physical volume of business."

Not surprisingly, some of Buffett's largest and longest-held positions are excellent dividend stocks. Dividend stocks are focused on cash generation, and that protects their businesses during these inflationary periods. They also provide generous passive income. Some of the best are Coca-Cola (KO -1.30%)Kroger (KR -1.69%), and Procter & Gamble (PG -0.33%). Let's take a closer look at each.

One of the best dividend stocks on the market

Berkshire Hathaway has held shares of Coca-Cola for more than 30 years, and it currently owns 9.2% of the stock. The beverage giant makes up 6.8% of the total Berkshire Hathaway portfolio and is its fourth-largest holding.

Coca-Cola is a classic Buffett stock, mostly because of its focus on cash generation and its dividend, which is really a commitment to its own business. The company is a Dividend King, having raised its payout annually for the past 60 years -- even through the massive sales declines at the beginning of the pandemic.

While the company innovates with new products, its well-oiled business churns out cash through its core brands, giving it enough to plow back into the business while maintaining and growing the dividend. Coca-Cola's payout ratio is presently a bit high at 77%, but the company has tons of cash to cover its dividend, which is super-important to management.

KO Payout Ratio Chart

KO Payout Ratio data by YCharts

Coke's shares are down slightly this year. At the current price, its dividend yields 3.1%, which should please new investors.

Big supermarkets, lots of cash

Among U.S. supermarkets, Kroger comes in third in size after Walmart and Costco Wholesale (leaving out Amazon as a different kind of business). But unlike the other two, it doesn't follow a discount model; rather, it offers a premium experience through its network of 2,800 stores. Over the past few years, Kroger has benefited from customers spending on essentials, and it has revamped its digital channels to handle more demand. Revenue has climbed in this environment. 

It's been in the news lately as it has proposed a merger with the next-biggest U.S. supermarket company, Albertsons Companies. The deal is facing regulatory scrutiny as it would combine the two largest non-discount grocery retailers. If it does indeed go through, the newly merged company will likely overtake Costco as the second-largest food retailer in the U.S.

Buffett first took a position in Kroger in 2019. At that time, it was just getting ready to remake itself. What he might have seen then was a foothold in stability. The company paid a dividend but stopped for several decades before resuming it again in 2006, and it's now a growing a reliable dividend, as are all of the stocks on this list.

KO Dividend Chart

KO Dividend data by YCharts

Kroger stock is down just under 4% this year, and at this price, the dividend yields 2%.

A solid business with beloved brands

A theme through all of these stocks is a well-established company with well-loved products that bring in tons of cash. Procter & Gamble is no exception. The company owns popular brands, such as Tide laundry detergent and Bounty paper towels. It makes products that people across the globe use every day and frequently purchase.

Buffett first came to own its shares in 2005 through Berkshire Hathaway's acquisition of the Gillette razor company. Procter & Gamble is another example of a company with slow but consistent growth and the ability to keep producing sales well into the future. 

Inflation has been hitting Procter & Gamble's margins and profits, and volume was down in the company's 2023 fiscal first quarter (ended Sept. 30). The company has been increasing some of its prices, taking the risk that some customers will head toward discount brands. But management noted that 26 of 50 global brands maintained or increased market share in the latest quarter, which was the first to really reflect high inflation. It expects profitability to suffer in the near term and is counting on brand power to carry it through. 

The company's stock is down 21% this year, and its dividend yields 2.8% at this price.

KO Dividend Yield Chart

KO Dividend Yield data by YCharts

Procter & Gamble is also a Dividend King, and it has one of the longest dividend-raise streaks on the market, at 66 years. It's as reliable as you can get for steady and growing passive income.