Deere & Company (DE -1.91%) and Procter & Gamble (PG 0.13%) have both beaten the S&P 500 over the last five years. But they've done so for different reasons. 

P&G is famous for paying dividends and buying back a ton of stock. In fact, P&G is a Dividend King that has paid and raised its dividend for 66 consecutive years. Deere doesn't have the same track record. Even after the stock fell 28% in one month, it still only yields 1.2%. And Deere hasn't bought back nearly as much stock as P&G. However, Deere has proven that by retaining earnings and reinvesting in its business, it can produce outsized returns for its shareholders.

Here's a quick lesson on when buybacks make sense, when they don't, and why P&G and Deere are both excellent dividend stocks to buy now.

An older person sits in the cab of a tractor with a child. Both smile as a third person outside the tractor also smiles at the child.

Image source: Getty Images.

Slow and steady

P&G is the largest U.S. consumer staples company by market cap. And unlike many other consumer staples companies that overexpand and try and do too much, P&G has mastered the art of focusing on what it does best and doing it better than any of its competitors.

It was a lesson that P&G learned the hard way. In fact, it wasn't long ago that P&G overextended itself and spent the better part of two years between fiscal 2015 and 2017 restructuring its business, reducing its brand count and product categories, and only investing in markets it knew it could do well in. 

The result has been excellent for P&G and its shareholders. One of my favorite P&G charts shows its revenue, net income, free cash flow (FCF), and operating margin over the last 10 years.

PG Revenue (Annual) Chart
Data by YCharts.

P&G's revenue is lower today than it was eight-plus years ago. But its profits are close to a record high, FCF is at a record high and is up 67% in 10 years (even off lower revenue), and its operating margin is at an all-time high of 23.6%.

P&G's investment thesis is beautifully simple -- that it's going to put up excellent, consistent results through economic expansions and contractions. And it's going to buy back a lot of stock and keep raising its dividend. Buying back stock reduces the outstanding share could and increases P&G's earnings per share.

PG Shares Outstanding Chart
Data by YCharts.

Over the last six years, P&G's share count has decreased by over 10%, while Deere has decreased its outstanding share count by less than 3%. With a dividend yield of 2.6% that you can count on, P&G looks like a great buy for passive income-focused investors.

Focused on long-term growth

Deere's strategy prioritizes a healthy balance sheet and reinvestment. In its fiscal Q2 2022 presentation, Deere reminded investors that the pecking order for using cash from operations starts with maintaining its investment-grade balance sheet by keeping a manageable debt position. Next comes investments in the business. Third comes keeping a 25%-to-35% payout ratio on its common stock dividend. And last comes share repurchases.

Deere stock plunged last Friday despite record-high quarterly revenue and net income because investors are nervous about the effects of rising interest rates, supply chain disruptions, and the impact of inflation on Deere's costs and the pocketbooks of its customers. However, Deere is still forecasting $7 billion to $7.4 billion in net income for fiscal 2022 -- giving it a forward price to earnings ratio of just 13.4 at the midpoint.

Even if Deere's growth slows, the company's long-term investments in information technology, artificial intelligence (AI), and automation give it a unique advantage and position it to continue taking market share in the decades to come. Deere has a stellar track record of investing in technology and harnessing it to make leading products that have a superior return on investment for its customers. Investments in software along with its core hardware and equipment pave the way for Deere to grow its aftermarket services and keep customers engaged.

Given the long-term growth of the industries Deere serves (agriculture, construction, and forestry), it makes sense that the company should prioritize organic growth as a means to grow shareholder value. Therefore, Deere's dividend and buybacks should be viewed more so as cherries on top of the core investment thesis. If Deere had instead spent more on buybacks and dividend payments over the last five or 10 years, then the company would not have been able to grow its earnings at such an impressive clip, or be in the leading position it is in now. In other words, Deere has proved to investors that excess cash is better spent reinvesting in the business. 

A dynamic duo

P&G and Deere stocks work well together in a basket. Both companies are industry leaders. P&G anchors the portfolio with reliable, steady earnings and a growing dividend, while Deere's cyclical results are going to move up and down much more along with the broader economy. Investors looking for safe stocks they can count on won't go wrong with P&G. At the same time, Deere, whose 2022 stock gains have been erased in just one month, looks like a solid buy on sale.