Most investors are no doubt familiar with Bill Gates, billionaire philanthropist and co-founder of Microsoft (MSFT 0.21%). After helming the technology company for a quarter of a century, the chief executive stepped down to spend more time on his charitable endeavors. Since then, Gates has grown his wealth and is now worth an estimated $127.7 billion, according to Forbes, making him the seventh-richest person in the world.

Gates' charitable efforts are mostly focused on the Bill & Melinda Gates Foundation Trust. The mission of the trust is "to create a world where every person has the opportunity to live a healthy, productive life." The foundation has spent nearly $54 billion since 2000, "taking on the toughest, most important problems." As a result, the trust's holdings are in a constant state of flux. While it holds stakes in dozens of companies, four well-known stocks dominate the list.

Person reviewing charts and graphs on a computer and printouts.

Image source: Getty Images.

1. Microsoft: 34%

It isn't a bit surprising that Microsoft would lead the pack, given Gates' inexorable ties to the company. Furthermore, he seeded the foundation by donating a chunk of his Microsoft shares. The Gates Foundation owns more than 38 million shares of Microsoft stock valued at $14.3 billion.

Yet this isn't your grandfather's Microsoft. Under the watchful eye of CEO Satya Nadella, the company has shifted its focus from on-premises software to the cloud -- a strategy that's been wildly successful.

In the calendar fourth quarter of 2023, Microsoft Azure was the world's second-largest cloud infrastructure provider, controlling 26% of the market, according to technology analyst firm Canalys. Perhaps more importantly, it was the fastest-growing of the "Big Three" cloud providers, growing 30% year over year, beating out both Amazon Web Services and Alphabet's Google Cloud, which grew 13% and 26%, respectively. Moreover, cloud revenue now represents 54% of Microsoft's total revenue and is the fastest-growing of the company's major endeavors.

Perhaps Microsoft's biggest opportunity is artificial intelligence (AI). The company moved quickly to capitalize on the rise of generative AI, and its position as a cloud leader gives Microsoft the inside track to sell AI to its cloud customers. In fact, in the most recent quarter, Microsoft noted Azure's growth included "six points of growth from AI services."

Finally, Microsoft has been paying its dividend consistently since 2004, with 14 consecutive annual increases. The yield is a seemingly tepid 0.7%, but that is largely due to the strong stock price appreciation over the past two years. The stock has generated dividend gains of 265% over the past five years, despite the worst economic downturn in years. Furthermore, as Microsoft's profits have risen, its payout ratio has fallen to 25% -- near its lowest level in a decade. That gives Microsoft plenty of resources to boost its dividend for the foreseeable future.

2. Berkshire Hathaway: 17%

Warren Buffett has made no secret of his goal to eventually donate all his Berkshire Hathaway (BRK.A 0.12%) (BRK.B -0.01%) stock to charity. He joined Gates in 2006 and has since donated $36 billion through 2022 to the Gates Foundation -- and has encouraged other wealthy individuals to become benefactors. As a result, the Gates Foundation owns nearly 20 million Berkshire shares valued at $7.1 billion.

While the shares were donated, there are plenty of reasons the foundation still holds much of the stock. Until the cash is needed for charitable causes, Berkshire Hathaway's vast collection of businesses and stock holdings provides instant diversification while also providing a steady stream of cash flow.

One example of the company's cash-gushing capability is its insurance businesses -- which include National Indemnity, GEICO, General Re, Berkshire Hathaway Reinsurance, and Alleghany. These businesses "performed exceptionally well last year, setting records in sales, float, and underwriting profits," according to Berkshire's recently released shareholder letter. In fact, these insurance businesses and the associated investment income accounted for 40% of Berkshire's operating income of $37.35 billion.

Given the company's long-term track record of success, significant cash flow generation, and large cash pile, it isn't surprising that it still represents a large portion of Gates' holdings.

3. Canadian National Railway: 16%

Speaking of Warren Buffett, railroads are a subject near and dear to his heart. When Berkshire Hathaway snapped up ownership of Burlington Northern Santa Fe in 2009, Buffett noted that railroads were a very "cost-effective way" to move goods, while releasing "far fewer pollutants into the atmosphere." After spending so much time with Buffett, the appreciation of trains must have rubbed off. The Gates Foundation owns nearly 55 million shares of Canadian National Railway (CNI -2.15%), valued at $6.9 billion.

It's easy to see the allure. Railroads are viewed as a linchpin of economic prosperity and are much more efficient for moving goods than competing methods, including trucking. Add to that a long operating history, wide economic moat, and steep barriers to entry, and you have the recipe for the perfect Buffett stock -- and, by extension, a perfect Gates stock as well.

Finally, Canadian National has consistently increased its dividend for 18 consecutive years and currently yields 1.9%. Its relatively low payout ratio of 37% suggests there's likely plenty more where that came from.

4. Waste Management: 15%

One person's trash is another person's treasure, so the saying goes. In some cases, however, there's a treasure to be found in the trash. Such is the case with Waste Management (WM -0.50%). That likely explains the Gates Foundation's stake of more than 35 million shares of Waste Management stock valued at $6.3 billion.

Collection services for trash and recycling may not be the most exciting business, but the need is consistent and it isn't going away anytime soon. Furthermore, the company is harvesting gas from its landfills, which can be used to generate electricity or fuel vehicles.

Another attraction is the company's dividend. Waste Management has increased its dividend for 15 years running and currently yields 1.4%. And with a payout ratio of 49%, there's plenty of opportunity for future increases.

A common thread

One common thread investors will note throughout the Gates Foundation Trust holdings is that many are dividend payers, which makes a lot of sense when you think about it. Money generated by dividend-paying stocks can be used to fund charitable giving without having to sell the underlying stocks. In fact, in 2023, the portfolio generated nearly $500 million in dividend income.

For investors looking to add some income to their portfolio, three of these four stocks aren't a bad place to start.