Real estate investment trusts (REITs) can be excellent investments for those looking to generate passive income from their portfolios. A significant benefit of REITs is that they allow you to invest in income-producing real estate without shelling out significant capital up front.

REITs are also attractive thanks to their market-beating ability. Over the past 25 years, REITs have delivered an 11.4% annual return, crushing the S&P 500's 7.6% total return over the same period.

Hand using a piece of chalk to draw an upward curve on a chart, with dollar signs of staggered sizes beneath.

Image source: Getty Images.

One reason for REITs' outperformance is their dividend payments. IRS rules require REITs to distribute 90% of their net income to investors through dividends, so these stocks can be quite appealing to income-focused investors. According to research from Ned Davis Research and Hartford Funds, companies that pay a dividend outperform the S&P 500, with less volatility, than those that don't.

Overall, REITs have underperformed the S&P 500 in the last decade. However, some subgroups continue to shine and deliver for investors. Here are three excellent REIT stocks that have crushed the S&P 500 over the last 10 years.

1. Digital Realty Trust

Digital Realty Trust (DLR 2.68%) owns 309 data centers in 28 countries and provides colocation, interconnection, cloud services, and other solutions for its customers. It invests in gateway data centers that serve as hubs for internet and data communications in major metropolitan areas.

Data center properties have been a hot commodity for years, thanks to the growing digitization of the economy. This has created an explosion of data, requiring more cloud solutions and other information technology. Because of the high costs of building and maintaining facilities, many companies -- including IBM, Oracle, Meta Platforms, JPMorgan Chase, and Verizon -- turn to Digital Realty for its data centers.

Over the past decade, Digital Realty's funds from operations (FFO) have grown by 278%, or 14.2% compounded annually, showing the strong demand for its data centers. The stock's total return (including reinvested dividends) was 332%, outperforming the S&P 500's 240% return.

Positive trends should continue. According to projections by McKinsey & Company, demand for data centers is expected to grow by 10% annually through 2030, and Digital Realty is in an excellent position to capitalize on this long-term momentum.

2. Extra Space Storage

Extra Space Storage (EXR 2.20%) provides storage properties and is the largest self-storage management company in the U.S. It aims to have highly visible storage facilities in areas with large populations. At the end of last year, it had 2,377 stores. Over 87% of Extra Space Storage's revenue is derived from rent; the rest comes from tenant reinsurance and management fees.

Self-storage properties have enjoyed high demand from residential consumers who need a place to keep their extra items and businesses that use the space to store excess inventory, documents, or other supplies.

Because these properties are relatively inexpensive to build and operate, they can generate excellent returns. In the last decade, Extra Space Storage's FFO grew 374%, or 16.4% compounded annually, while its dividend payout increased by 305%. Its total return of nearly 400% crushed the S&P 500's return over the same period.

According to CBRE Group, the U.S.' largest commercial real estate company, demand for self-storage facilities will remain robust. Additionally, supply chain issues, elevated construction costs, and high interest rates have prevented overdevelopment in the sector, which should bode well for operators like Extra Space Storage.

3. Prologis

With over 1.2 billion square feet of properties, Prologis (PLD 1.31%) specializes in facilities serving businesses-to-business enterprises and online retail fulfillment centers, with customers including Amazon, Home Depot, FedEx, and UPS.

It has benefited from the shift to e-commerce and online shopping. In addition, online retailers are concerned about building more resilient supply chains following the pandemic, and demand for warehouse, storage, and distribution space has risen.

Over the last decade, Prologis's FFO has grown 495%, or 19.5% compounded annually, and its dividend payout has increased by 93%. Its total return of 366% has crushed the S&P 500 over the same period. Elevated demand and the ability to raise rents have been a tailwind for Prologis more recently. Over the past few years, its occupancy rate has been over 97%. Meanwhile, from 2019 through 2023, rents have risen by 85%.

One thing to watch is the new supply of logistics facilities hitting the market. A few years back, strong demand and low interest rates drove developers to build more facilities and add to the market supply. Building peaked in 2022 and many of these developments will start coming on line in 2024, which could result in slower rent growth for the REIT.

Prologis' management believes demand will outpace supply and that it can boost rents by 4% to 6% in the coming years, helping to increase core FFO by 9% to 11%. Finally, ongoing e-commerce trends should remain robust for the next several years, with the warehousing and storage services market projected to grow by 7.7% annually through 2030.