When Berkshire Hathaway (BRK.A -0.76%) (BRK.B -0.69%) CEO Warren Buffett speaks, investors of all walks pay attention. That's because the Oracle of Omaha has been running circles around Wall Street's major indexes for more than a half-century. Since taking the reins at Berkshire, Buffett has doubled the annualized total return, including dividends, of the benchmark S&P 500 (19.8% vs. 9.9%), as of the end of 2022.

Yet what's particularly noteworthy about Buffett's success is that it's the result of prescient investments in a relatively small number of companies. Based on a combination of reported and estimated cost bases, Wall Street's most-revered investor and his team are sitting on $196.2 billion in unrealized gains (not counting dividends received) from just four well-known companies.

Warren Buffett at Berkshire Hathaway's annual shareholder meeting.

Berkshire Hathaway CEO Warren Buffett. Image source: The Motley Fool.

Apple: $140.59 billion in unrealized gains (estimated)

Perhaps this comes as no surprise, but the largest holding in Berkshire Hathaway's $364 billion investment portfolio has been one heck of an investment. Based on the $39.62-per-share cost basis estimated by WhaleWisdom.com, tech stock Apple (AAPL -0.35%) is responsible for a greater than $140 billion unrealized gain for Buffett's company. Not bad for a stock that Berkshire has been holding for less than eight years.

Apple's greatness largely derives from its innovation. It's been a leading provider of smartphones since introducing the original iPhone in 2007. In the U.S., it's consistently accounted for half or more of smartphone market share since upgrading the iPhone to handle 5G download speeds in the fourth quarter of 2020.

But what investors seem most excited about is Apple's ongoing evolution. Under CEO Tim Cook, Apple is becoming a platforms company that's emphasizing subscription services.

Make no mistake, Apple has exceptionally loyal customers and plenty of pricing power. It's also not abandoning the physical products that consumers obviously love (iPhone, Mac, and iPad). However, bolstering its portfolio to include subscription services will increase its operating margin over time, further enhance loyalty to Apple's ecosystem of products and services, and is expected to smooth out the revenue lumpiness associated with major iPhone upgrade cycles.

American Express: $24.24 billion in unrealized gains

Although it trails Apple by a wide margin, credit-services provider American Express (AXP -0.62%) has been nothing short of an incredible investment for Warren Buffett and his team, which included the late, great Charlie Munger. With Berkshire reporting a cost basis in AmEx of approximately $8.49 per share, Buffett's company is sitting on more than $24 billion in unrealized gains, not including dividends.

American Express's success as a business is a function of its ability to play both sides of the transaction aisle. In addition to being the No. 3 payment processor by credit card network purchase volume in the U.S., AmEx is a lender to businesses and consumers. This allows it to collect interest income and/or annual fees from its cardholders.

Something else working in favor of American Express is its choice to focus on high-earning consumers. Well-to-do cardholders are far less likely to alter their spending habits or fail to pay their bills than the average American. This positions AmEx to navigate economic downturns better than its peers.

Don't forget that macroeconomic factors are also AmEx's friend. Although financial stocks are cyclical and struggle during periods of contraction, recessions are short-lived. Only three of the 12 recessions since the end of World War II have lasted at least 12 months, and none have surpassed 18 months. Meanwhile, two economic expansions over the past 78 years have endured longer than a decade. Financial stocks like American Express benefit from long-winded periods of expansion.

Two people clanking their Coca-Cola bottles together while seated and chatting outside.

Image source: Coca-Cola.

Coca-Cola: $22.32 billion in unrealized gains

The third Buffett stock that's generated a veritable smorgasbord of gains for the Oracle of Omaha's company is beverage giant Coca-Cola (KO). Coke is Berkshire's longest continuous holding (since 1988) and sports a cost basis of just $3.2475 per share. With a current share price north of $59, it means Buffett and his investing aides are sitting on gains of well over $22 billion.

Also, keep in mind that Coca-Cola has raised its base annual dividend for 61 consecutive years, and is currently doling out $1.84 per share. Relative to Berkshire Hathaway's cost basis, Buffett's company is netting a nearly 57% yield on cost. Put another way, the Oracle of Omaha's company is more than doubling its initial investment in Coca-Cola every two years based solely on the dividend income it's receiving.

Geographic diversity is a big reason Coca-Cola has been such a bubbling investment for the past 35 years. Aside from North Korea, Cuba, and Russia, it has operations in every other country. This allows Coke to generate predictable operating cash flow in developed markets, while also benefiting from stronger organic growth opportunities in emerging market countries. The company has 26 brands generating at least $1 billion in worldwide sales.

Coca-Cola's other source of success is its top-tier marketing. It's been aggressively investing in digital advertising and relying on artificial intelligence to cater ads to younger audiences. Meanwhile, Coke has decades-long ties to the holidays and can lean on well-known brand ambassadors to connect with more mature consumers.

Moody's: $9.07 billion in unrealized gains

The fourth and final stock that, collectively with Apple, American Express, and Coca-Cola, is responsible for generating more than $196 billion in unrealized gains for Warren Buffett and his team is credit-rating agency Moody's (MCO 0.25%).

The theme of this list tends to be patience. Apple's large gains are a function of its outperformance since Berkshire's initial investment in the first quarter of 2016. Meanwhile, AmEx, Coca-Cola, and Moody's have been continuous holdings since 1991, 1988, and 2000, respectively. It's the epitome of allowing time and compounding to work their magic.

According to Warren Buffett's letter to shareholders that was released last year, Berkshire has a per-share cost basis of $10.05 in Moody's. With Moody's stock climbing above $377 on Dec. 11, it means Berkshire stake has increased in value by more than $9 billion, not including dividends paid.

For more than a decade, Moody's credit-rating segment has been its driving force. Historically low interest rates encouraged companies to borrow in order to hire, acquire, innovate, and expand. The need to rate new debt issuances kept Moody's analysts busy, as well as lined the company's pockets.

But things have changed as interest rates have soared over the past 21 months. With fewer corporate debt issuances, Moody's Analytics segment is now doing the heavy lifting. This division, which helps businesses stay compliant with regulations and assists with risk assessment, is perfectly positioned to thrive in the current economic climate.