Investors seem to be more interested in tech stocks today than in just about any other sector. The tech-heavy Nasdaq Index is up by 30% this year, while the Dow Jones Industrial Average is just barely in positive territory.  

That situation is setting up some attractive buying opportunities for some of the market's biggest, most stable businesses. Coca-Cola (KO) and Procter & Gamble (PG -0.78%), for example, have each underperformed the Dow despite showing solid sales and earnings results in 2023. Let's take a closer look at these two dividend giants to see which is the better fit for your portfolio.

Growing through challenges

Both companies are operating in a difficult selling environment today. The main challenges include rising costs and the fact that shoppers are looking to save cash to offset inflation. These issues have pressured most consumer-facing businesses, including P&G and Coca-Cola.

Yet these two market leaders have had no trouble passing along their higher costs. Price hikes helped deliver 11% organic sales growth for Coke and allowed P&G to boost its comparable metric by a healthy 8%.

Looking deeper into the results reveals slightly better sales trends for the beverage giant. In addition to its higher overall growth figure, Coke managed to hold sales volumes steady. P&G, meanwhile, saw volumes slip by 3%. While both companies are demonstrating impressive pricing power, Coke wins the growth matchup here.

Profits and cash

Procter & Gamble and Coke both generate profit margins that reflect their respective leadership positions in the beverage and consumer staples industries. P&G's operating margin of 22% of sales easily surpasses rival Kimberly-Clark (KMB -0.87%) and its 14% rate. The same goes for Coke, which enjoys a 28% profit margin compared to PepsiCo's (PEP -0.62%) 13% rate.

Chart showing Procter & Gamble's and Coca-Cola's operating margins higher than Kimberly-Clark's and PepsiCo's since 2019.

PG Operating Margin (TTM) data by YCharts

Both stocks will also appeal to investors who favor cash flow. P&G generated $5.3 billion of operating cash in the most recent quarter, and Coke produced $4.6 billion. These wins allowed Coke to continue investing in marketing support for popular brands like its Smartwater franchise. And they gave P&G plenty of resources to direct toward the relentless pace of innovation that keeps brands like Tide and Bounty in their top market share positions year after year.

The better price

As you might expect, both stocks are valued at a premium that reflects many of the advantages outlined above. Coca-Cola stock is priced at 6 times annual sales, or more than double PepsiCo's rate. P&G trades for 4.7 times sales, compared to Kimberly-Clark's price-to-sales ratio of 2.2.

Both stocks will likely deliver solid long-term returns for patient investors, but Coke looks like the better buy today. It is seeing faster growth through mid-2023, earns higher profits, and dominates the global on-the-go beverage niche. And it pays a more generous dividend today, yielding over 3% compared to P&G's 2.5% rate. Investors can count on that payout to rise over time, too, as Coke hasn't missed an annual increase in over 60 consecutive years.

There's no telling when Wall Street will start noticing Coke's excellent finances and its strong growth profile. But investors can patiently collect that income while they wait for the stock price to catch up to the business' sparkling performance.