When Berkshire Hathaway (BRK.A -0.59%) (BRK.B -0.74%) CEO Warren Buffett buys or sells a stock, the investing community wisely pays close attention. That's because the Oracle of Omaha's investing track record speaks for itself. Since taking the reins in 1965, Buffett has led his company's Class A shares (BRK.A) to an aggregate gain of 3,641,613%, through Dec. 31, 2021.

While there are a lot of factors that have played a role in Warren Buffett's success, including his love of cyclical companies and dividend stocks, it's his patience that's proven most important. By allowing his winners to run, he's racked up jaw-dropping unrealized gains for Berkshire Hathaway's $334.7 billion investment portfolio.

As of this past weekend, Warren Buffett was sitting on $168 billion in (combined) unrealized gains from four core holdings. Take note, none of these gains factor in the dividend income Berkshire Hathaway is receiving from these four stocks.

A jovial Warren Buffett at his company's annual shareholder meeting.

Berkshire Hathaway CEO Warren Buffett is all smiles thanks to hefty unrealized investment gains. Image source: The Motley Fool.

Apple: $103.04 billion in unrealized gains (author estimate)

In terms of nominal-dollar gains, tech stock Apple (AAPL -2.19%) appears set to go down as Warren Buffett's greatest investment. With 13F aggregator WhaleWisdom.com estimating a $37.17 average price paid per share of Apple, I'd estimate Berkshire Hathaway to be sitting on an unrealized gain of about $103 billion, as of the closing bell on Sept. 16, 2022.

Don't look for Buffett or his investing lieutenants, Todd Combs and Ted Weschler, to take profits on Apple anytime soon. That's because it's considered one of Berkshire's "four giants," and it checks all the appropriate boxes for an investor like Buffett who prefers to hold great businesses for years, if not decades.

To start with, Apple is the most valuable brand in the world and has an exceptionally loyal customer base. This loyalty stems from the company being on the leading edge of innovation. For instance, since introducing a 5G-capable iPhone during the fourth quarter of 2020, Apple has controlled between 47% and 65% of U.S. smartphone market share. 

However, Buffett has to be happy with the job CEO Tim Cook is doing in overseeing the company's transition to subscription services. Although Apple isn't abandoning the physical products that made it wildly profitable and popular, it's evolving to further improve customer loyalty, boost long-term operating margins, and minimize any revenue dips associated with physical product replacement cycles.

Also, don't overlook Apple's stellar capital return program. The company has repurchased approximately $520 billion of its common stock since the beginning of 2013, and it doles out one of the largest nominal-dollar dividends on the planet. 

Coca-Cola: $22.52 billion in unrealized gains

As for tenure, no stock has been a longer continuous holding in Berkshire Hathaway's portfolio than beverage giant Coca-Cola (KO -0.24%). Coke has steadily gained from Berkshire's cost basis of about $3.25/share and delivered roughly $22.5 billion in unrealized gains over the past 34 years. Thanks to this low basis, Buffett's company is enjoying a 54% annual yield on cost.

One of the factors that makes Coca-Cola so great is that it sells nondiscretionary goods (food and snacks). No matter how well or poorly the U.S. and global economy are performing, people still need to eat and drink. This makes it unlikely that they'll trade down from Coca-Cola products to something else, which in turn allows Coke to generate highly predictable cash flow year in and year out.

Coca-Cola also benefits from its geographic diversity. With the exception of North Korea, Cuba, and Russia (the latter is due to Russia's invasion of Ukraine), Coke has operations ongoing in every country worldwide. This means it's able to bring in a hearty amount of cash flow from developed countries, and take advantage of juicier organic growth prospects in emerging markets.

Incredible marketing has played a key role, too. Few companies have the ability to transcend generational gaps quite like Coca-Cola. Whether it's using social media and well-recognized brand ambassadors to reach a younger generation of consumers, or leaning on its holiday tie-ins to connect with a more mature audience, Coke's marketing team has a virtually foolproof formula for moving the needle higher.

Hand holding an American Express gold business credit card.

Image source: American Express.

American Express: $21.92 billion in unrealized gains

The next longest-held Buffett stock after Coca-Cola is payment processor American Express (AXP 0.09%). This continuous holding since 1993 has led Berkshire Hathaway to $21.9 billion in unrealized gains. What's more, Berkshire's cost basis of $8.49/share is translating into a yield on cost of almost 25%!

AmEx is the epitome of a Warren Buffett stock in that time is its greatest ally. Even though recessions are an inevitable part of the economic cycle, history shows that downturns don't last very long. By comparison, periods of economic expansion are almost always measured in years. American Express is a company that, when held over long periods, allows investors to take advantage of the natural expansion of the U.S. and global economy over time.

To build on this point, AmEx is a company that benefits greatly from "double-dipping" during periods of expansion. In addition to charging merchants to process payments, American Express also acts as a lender. The latter allows it to generate fees and interest income from consumers and businesses. Since periods of expansion are disproportionately longer than recessions, double-dipping has made AmEx quite profitable.

Another reason for AmEx's long-term success has been its ability to court affluent clientele. Higher-earning cardholders are less likely to alter their buying habits or be delinquent on their payments during relatively minor economic downturns.

Bank of America: $20.61 billion in unrealized gains

The fourth stock that's generated a mountain of unrealized profit for Warren Buffett is Bank of America (BAC 0.45%). Berkshire Hathaway's second-largest holding by market value has delivered approximately $20.6 billion in unrealized gains, not including dividends paid.

Similar to payment processors like AmEx, bank stocks benefit immensely from the long-term expansion of the U.S. economy. Although banks have to roll with the punches dished out by recessions, rock-solid performers like Bank of America tend to grow their loan portfolio and deposits over time, which is what ultimately boosts their profitability.

What makes Bank of America a particularly intriguing stock to own right now is its interest rate sensitivity. With the Federal Reserve aggressively raising interest rates to combat historically high inflation, BofA's outstanding variable-rate loans are set to generate more interest income for the company without any extra work on BofA's part. According to Bank of America, a 100-basis-point parallel shift in the interest rate yield curve over the next 12 months (as of mid-July 2022) would generate an estimated $5 billion in added net interest income. 

Bank of America has wisely invested in digitization as well. Over the past three years, BofA has grown its active digital user count by 6 million to 43 million, and has importantly seen the percentage of loan sales completed online or via mobile app catapult from 29% to 48%. Since digital transactions are considerably cheaper for BofA than in-person or phone-based interactions, it's allowed the company to consolidate some of its physical branches and reduce its noninterest expenses.