Growth stocks like Nvidia and Meta Platforms have contributed the bulk of the S&P 500's year-to-date gains. But that doesn't mean all dividend-paying companies are underperforming the benchmark.

The Dow Jones Industrial Average is known for its blue chip industry-leading companies. Many of these companies generate enough profit to reinvest in the business and reward shareholders with dividends.

An especially elite cohort are Dow stocks that are also Dividend Kings,  meaning they have paid and raised their dividends for at least 50 consecutive years. Here are the five Dow Dividend Kings, including the two that are beating the S&P 500 year to date.

An adult and a child unload dishes from a dishwasher.

Image source: Getty Images.

Winners keep on running

Procter & Gamble (NYSE: PG) and Walmart (NYSE: WMT) are the only Dow Dividend Kings beating the S&P 500 in 2024.

PG Chart

PG data by YCharts

Interestingly enough, they are also the best-performing Dow Dividend Kings over the last year, three-year, five-year, and 10-year periods.

Companies can have long track records of dividend raises and rich histories that have earned them a place in an esteemed index like the Dow. But that doesn't mean investors should expect these companies to be suitable investments from here on out.

The market is forward-looking, and the best dividend stocks are the companies with a clear path toward growing earnings. Any company can raise a dividend to appease investors, but some can't support dividend payments, and ideally stock buybacks, with income from the business.

A margin marvel

P&G and Walmart are fairly different businesses, but they have both done a masterful job of pivoting to meet consumers' needs.

P&G has a streamlined brand portfolio that focuses on supply chain management and pricing power. These advantages were displayed over the last few years as supply chain disruptions and inflation put P&G and its peers to the test.

P&G's revenue isn't that much higher today than a decade ago, but the stock price has doubled because of margin expansion and more efficient operations. P&G proves that brands matter, even for household and basic needs products.

PG Chart

PG data by YCharts

A revered revenue compounder

P&G realized that its growth path wasn't through sales but higher margins. Meanwhile, Walmart played the exact opposite strategy to perfection.

Its margins are lower today than a decade ago, but sales have exploded higher. And its margins are improving as consumer spending has rebounded. The stock price is up over 128% over the past decade, better than even P&G.

WMT Chart

WMT data by YCharts

P&G charges premium prices and relies on its brand power. However, Walmart appeals to consumers' value needs by being a place where they can go for the best prices on various product categories.

Walmart has done an excellent job improving its store layouts, investing in e-commerce, and catering to the evolving needs of consumers. During the height of the COVID-19 pandemic in September 2020, the company launched Walmart+, which charges a monthly or annual membership for free home delivery and other perks.

On its Q4 fiscal 2024 earnings call, Walmart said that Walmart+ members spend nearly twice as much as nonmembers, showing that the program effectively taps into a loyal customer base. Not long ago, Amazon posed a potentially existential threat to Walmart and its peers like Target. However, Walmart has adapted and is back in growth mode.

Rewarding shareholders

Aside from performing well as businesses, P&G and Walmart have also done an excellent job of returning capital to shareholders. P&G has a nice balance of dividend raises and buybacks, while Walmart has until recently made bare minimum dividend raises but has repurchased a considerable amount of its own stock.

WMT Shares Outstanding Chart

WMT Shares Outstanding data by YCharts

On Feb. 20, Walmart announced a 9% increase to its dividend, its largest increase in over a decade. Yet, even with that raise, Walmart only yields 1.4% compared to 2.3% for P&G. Johnson & Johnson, Coca-Cola, and 3M -- the other three Dow Dividend Kings -- all have higher yields than P&G and Walmart mainly because these stocks have underperformed the market.

A common mistake is to assume that a stock is a better passive income investment because it has a higher yield. 3M is a good example of a stock having an artificially high yield just because it has been such a terrible investment. 3M has made bare minimum raises to its dividend in recent years, but the yield is 5.8% because the stock is lower today than it was 10 years ago.

Ideally, investors want to target dividend stocks that produce passive income, reward shareholders with buybacks, and sprinkle in some long-term capital gains. P&G and Walmart check both those boxes for investors.

Good ideas at expensive valuations

Unfortunately, Walmart and P&G are expensive stocks. P&G has a price-to-earnings (P/E) ratio of 27 and Walmart has a P/E of nearly 32. These are high prices to pay for stodgy dividend-paying companies, no matter how good the quality and track record of dividend raises.

P&G and Walmart are phenomenal businesses, so buying them even at premium valuations will probably work out over time. However, they are also well-known quality dividend stocks, and their valuations reflect their popularity.

A better course of action may be to keep both companies at the top of a watchlist and wait until the valuations are more reasonable relative to the market.