When trying to identify investment ideas, one way people can keep it simple is to look at the companies they might be customers of. With this in mind, two well-known consumer stocks might be on your radar.

I'm talking about Apple (AAPL -0.35%) and Coca-Cola (KO), which readers have undoubtedly heard of. There are compelling reasons to want either of these businesses in your portfolio. But which of these top Warren Buffett stocks is the better buy right now?

Incredible customer loyalty

Apple sells some of the most in-demand products and services on the planet, and it enjoys extreme customer loyalty. However, it's the ecosystem that it built between all of its hardware and software that really makes this business special. Customers pay higher prices for its devices, and then get locked in thanks to all the services Apple offers, and how well they integrate across those devices. This gives it a huge competitive advantage.

To be fair, Apple has hit a rough patch recently. Its revenue declined 2.8% in its fiscal 2023 (which ended Sept. 30). Macro uncertainty, mainly around higher interest rates and inflationary pressures, might be discouraging shoppers from spending on discretionary items.

But this is still one of the most financially sound enterprises out there, providing a level of safety and security that not many stocks can offer investors. Apple produced $100 billion of free cash flow in fiscal 2023, the vast majority of which it used to repurchase shares. This boosts earnings per share, something that Buffett certainly appreciates.

Powerful brand recognition

Coca-Cola's defining trait is its incredible brand strength. The company sells its products in more than 200 different countries across the globe -- an unbelievably wide reach that makes it recognizable to people everywhere. Plus, Coca-Cola's consistency is something that consumers can rely on, especially for a low-cost product like soft drinks.

This brand advantage has benefited the company by allowing it to flex its pricing power. In the third quarter, Coca-Cola's sales were up 8% year over year. Management also highlighted that pricing was up 9%, a key reason for the healthy top-line gain. Due to strong momentum, executives raised their full-year guidance for both revenue and earnings.

Coca-Cola is a mature business, so it isn't going to register outsized growth like many tech stocks, but its stability and durability could be intriguing for some investors. The company boasts a stellar operating margin of 27.4%, which supports a  dividend that at current share prices yields 3.1%.

A difficult decision

There's no doubt that both Apple and Coca-Cola are outstanding businesses. The main reasons being that they possess some of the strongest consumer brands in the world and have excellent profitability, which helps explain why they are large holdings in the portfolio of Buffett's conglomerate.

There isn't much disparity between these two companies when it comes to their earnings growth outlooks. The consensus analyst estimate is that the beverage maker's earnings per share are expected to grow at an annualized clip of 10.3% in the next five years, about the same rate as is forecast for Apple.

Valuation could be more a meaningful metric to differentiate between them. Coca-Cola shares trade at a price-to-earnings ratio of under 24 right now, a sizable discount to Apple's 32. It's worth noting that Apple stock's 50% gain in 2023 is all attributable to investors deeming it worthy of a higher multiple.

Apple gets a lot of attention for good reasons. It's the world's most valuable company, sells one of the most successful tech products in history in the iPhone, and is ingrained in millions of people's day-to-day lives. But its shares are expensive enough that some investors might view buying stock in Coca-Cola as a better choice.

However, Apple has been the better investment by far over the past one-, three-, five-, and 10-year periods. Its valuation is steep, for sure, but I think it's a better stock to own than Coca-Cola.