For nearly 60 years, Berkshire Hathaway (BRK.A -0.76%) (BRK.B -0.69%) CEO Warren Buffett has been running circles around Wall Street's most prominent stock indexes. Since ascending to the helm of Berkshire Hathaway in the mid-1960s, the Oracle of Omaha, as he's been dubbed, has managed an average annual return of 19.8% for his company's Class A shares (BRK.A) through the end of 2022. That's double the annualized total return, including dividends, of the S&P 500 over the same span.

While Buffett has been lauded for his investing prowess, he deserves an equal amount of credit for his charitable contributions. Between 2006 and 2021, Buffett served as a Trustee for the Bill and Melinda Gates Foundation, which is a nonprofit entity focused on fighting global poverty, disease, and inequity. Through 2022, Warren Buffett had contributed $36 billion to the trust. 

A jubilant Warren Buffett at Berkshire Hathaway's annual shareholder meeting.

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

As of the end of June 2023, the Bill and Melinda Gates Foundation Trust had just over $42 billion in invested assets spanning 24 securities. That compares to the $345 billion investment portfolio at Berkshire Hathaway that Buffett oversees, which encompasses a little over 50 securities.

Despite the close-knit charitable relationship Bill Gates and Warren Buffett share, their portfolios contain very different holdings -- with three exceptions.

Kraft Heinz

The first stock you can find in the trust that bears Bill Gates' name, as well as in Berkshire Hathaway's investment portfolio, is packaged foods and condiments company Kraft Heinz (KHC -0.55%). Whereas the Bill and Melinda Gates Foundation holds around 2.62 million shares of Kraft Heinz (worth $85.2 million, as of Oct. 9, 2023), Berkshire Hathaway has in the neighborhood of 325.6 million shares worth almost $10.6 billion.

The lure of consumer staples stocks like Kraft Heinz is simple: predictability. Though consumers and businesses will pare back their spending on discretionary items during periods of uncertainty, food and beverages are basic necessities. This means Kraft Heinz can count on predictable operating cash flow in pretty much any economic climate.

To add to the above, Kraft Heinz owns around two dozen household brands, including Oscar Mayer, Philadelphia, Jell-O, Velveeta, and, of course, Kraft and Heinz.  Possessing a portfolio of brand-name consumable goods has allowed the company to raise its prices and stay ahead of historically high inflation.

I'd be remiss if I didn't also mention that Kraft Heinz meaningfully benefited from the COVID-19 pandemic. Consumers choosing to eat at home led to a notable uptick in its organic sales of easy-to-make meals and snacks.

But it's not all peaches and cream for this shared holding. For multiple quarters now, Kraft Heinz has reported a decline in year-over-year volume/mix. In other words, the only reason the company's organic sales are pointing higher is because of double-digit price hikes.  The declines we're seeing in volume/mix indicate that consumers are pushing back against price hikes and possibly trading down to cheaper store brands, which may bode poorly for the company's operating results in the coming quarters.

United Parcel Service (UPS)

A second stock that Bill Gates and Warren Buffett both have stakes in is supply chain company United Parcel Service (UPS 0.14%), which is much better known as "UPS." The Bill and Melinda Gates Foundation held 740,689 shares of UPS as of the end of June, while the Oracle of Omaha's Berkshire Hathaway owned a 59,400-share stake.

One of the prime reasons to own shares of a logistics company like UPS is its cyclical ties. Even though downturns in the U.S. economy are inevitable, all 12 recessions after World War II have lasted just two to 18 months. By comparison, periods of expansion often last multiple years. What this suggests is that package shipments and UPS's pricing power are both going to increase over the long run as the U.S. economy grows.

Additionally, there are significant barriers to entry in the package delivery space. Although UPS is facing a handful of well-defined competitors, it doesn't have to worry about new entrants popping out of the woodwork. UPS trails only the United States Postal Service (USPS) in parcel delivery volume but ranks at the top of its peers in terms of revenue.  Once again, we're talking about incredible pricing power, which allows UPS to pass along higher costs to consumers on an annual basis.

Another advantage of owning shares of UPS is the company's robust payout. The $6.48-per-share dividend UPS is expected to dole out over the next 12 months works out to a market-topping 4.2% yield. Warren Buffett is a clear fan of businesses that regularly reward their shareholders, and apparently, Bill Gates and his investment advisors are, too.

A stopwatch with a secondhand that's stopped above the phrase, Time to Buy.

Image source: Getty Images.

Berkshire Hathaway (Class B, BRK.B)

The third and final stock two of the richest people on the planet share in their respective portfolios is none other than Berkshire Hathaway -- specifically, the Class B shares (BRK.B).

The Oracle of Omaha has been donating some of his Class B Berkshire shares annually to the Bill and Melinda Gates Foundation for more than a decade. Through the first half of 2023, the Bill and Melinda Gates Foundation owned a little over 25.1 million shares.

Meanwhile, no stock has been more regularly purchased by Berkshire Hathaway's dynamic duo -- Warren Buffett and his right-hand man, Charlie Munger -- over the past five years than Berkshire Hathaway (Class A and Class B). Buffett and Munger have authorized the repurchase of more than $71 billion combined of the company's Class A and Class B shares since July 17, 2018.

What makes Berkshire Hathaway such a special company is Warren Buffett's penchant for buying cyclical businesses, as well as his love of dividend stocks.

As I pointed out earlier, the U.S. economy spends a considerably longer amount of time expanding than it does contracting. Warren Buffett and his investing team have packed the company's portfolio and owned assets with cyclical businesses. As the U.S. economy grows over time, the bulk of the companies in Berkshire's portfolio should benefit.

Berkshire Hathaway also relies heavily on dividend stocks in its portfolio. Over the coming 12 months, Berkshire is on pace to collect more than $6 billion in dividend income. Companies that pay a regular dividend tend to be profitable on a recurring basis and time-tested. In short, they're just the type of businesses we'd expect to grow in value over time.

Cyclical, dividend-paying companies have propelled Berkshire Hathaway to outsized gains for more than a half-century.