One of the most successful stocks over the past year, 10 years, and 40 years is Apple (AAPL -0.91%). Apple is the rare, beloved brand in the technology industry, and it's been equally pleasing to investors. That's especially true of the Tim Cook era, when the company began returning cash to shareholders in the form of dividends and share repurchases.

In 2016, Apple's outstanding business attracted Warren Buffett to invest in its stock. Soon, Apple became the largest position in the Berkshire Hathaway (BRK.A 0.96%) (BRK.B 1.01%) portfolio, and Berkshire's mere 5.6% stake in Apple is now the conglomerate's third largest business overall.

Buffett isn't known for picking technology stocks; his circle of competence lies in financial companies and consumer goods. However, in many ways, Apple most resembles Buffett's legendary Coca-Cola (KO 0.29%) investment from 1988. Berkshire still holds that investment, which has gone up a stunning 17 times his cost, not including dividends that have been paid out over 32 years.

Though Buffett has already more than doubled his money in Apple, Coca-Cola's long-term success portends more good things for Apple shareholders over the long run. Here's why these seemingly different business are really two sides of the same coin.

Apple's lneup of iPhone 11 colors.

Apple is like Coca-Cola in several ways. Image source: Apple.

Elite profitability and returns on equity

Leaving alone each company's businesses, both Apple's and Coke's profitability numbers as similar as they are rare:

Company

Operating Margin

Return on Equity

Coca-Cola

28.5%

44.8%

Apple

24.7%

55.5%

Data source: Yahoo! Finance. 

These numbers are truly amazing when compared with the typical consumer goods or technology hardware company. That's especially true of their returns on equity, which calculates how much net profit a company earns for each equity dollar invested.

An average company's return on equity is usually in the low to mid-teens, but as you can see, Coca-Cola and Apple beat that average by three to four times. Such high returns on equity mean both Coca-Cola and Apple generate massive profits without very much in way of relative incremental investment.

Return on equity is a favorite metric of Buffett's in assessing what constitutes a "wonderful" business, since they produce so much extra cash for shareholders.

various flavors of diet coke lined up next to each other.

Image source: Coca-Cola.

Why they're so profitable

How have Coca-Cola and Apple become such profitable businesses? After all, Coca-Cola is just syrup and carbonated water, while Apple devices are made up of the same memory and processor components found in most other electronic devices. So why is each business taking in an outsize portion of industry profits? Why can't competitors eat into these huge profits?

Part of each company's strength lies in its terrific brand marketing. Coca-Cola traces its roots back to 1886, but the reason it's been able to thrive for so long is its excellent and consistent brand message.

Coca-Cola's main logo and packaging haven't really changed much over the past 50 years, and management has consistently sought to associate Coca-Cola with happiness and happy occasions throughout time, with the brand showing up often during large sporting events and other family-friendly occasions.

For Apple, it's really only the consumer electronics company to elevate its brand above mere technical excellence (though it has that, too). Apple's marketing is legendary, most notably with its 1984 ad for the Macintosh computer, and its iconic "Think Different" ad campaign from 1997, when founder Steve Jobs returned to the company.

Both Coca-Cola's and Apple's unbeatable brands give each company pricing power over their rivals, meaning consumers will pay a little more for each company's product relative to others. That allows each company to take in very high operating profits.

In addition to marketing, as early leaders in the field of soft drinks and electronics, both Coca-Cola and Apple have huge, international distribution networks. Coca-Cola has bottlers all over the globe, while Apple has relationships with all large global telecom companies that want to sell its product. Having such wide and efficient distribution allows each company to sell many, many units worldwide, which lowers overhead costs relative to their massive reach.

Big brands allow each to change with the times

Besides the profit potential, a marquee brand also allows a company to adapt to the times. For instance, Coca-Cola doesn't just sell its original recipe but has expanded the Coke brand to Diet Coke, Coke Zero Sugar, Cherry Coke, and a caffeine-free Coke. More recently, new CEO James Quincey is continuing the expansion of the Coca-Cola brand, introducing Coca-Cola Orange Vanilla, while Diet Coke was given brand extensions into Ginger Lime, Feisty Cherry, Zesty Blood Orange, and Twisted Mango flavors in reaction to the popularity of exotic sparkling water flavors. Even more radical, Quincey has expanded the Coke brand into both the rising energy drink and coffee categories, with Coke Energy and Coca-Cola Plus Coffee products.

In a similar way, Apple's brand has carried the company through numerous eras of electronic devices. Apple began as a designer of personal computers but has adapted and expanded its product lineup over the years with the iPod in the early 2000s and then the massive hit of the iPhone in 2007. More recently, Apple brought the Apple brand to tablets, with the iPad in 2010 and the Apple Watch in 2015. Its most recent hit is its wireless earbuds, which reportedly doubled their sales to $6 billion in 2019.

No wonder Buffett bought Apple

Thus, having a beloved brand means more than just premium prices and big margins; it also means longevity in rapidly changing industries. While these characteristics might not lead to the biggest gains in any one year, they are the characteristics that pave the way for market-beating returns over the long term. That's why Buffett branched out into tech with Apple, the Coca-Cola of consumer electronics.