The S&P 500 index has dipped 21% so far this year. But the bigger picture is that the index has still produced 74% total returns over the past five years, with dividends reinvested. This is why I think panicking over the recent stock market crash is missing the forest for the trees.

There are many stocks that have performed even better than the S&P 500. Here are two real estate investment trusts (REITs) that have created significant wealth for shareholders in recent years. And it looks like both remain poised to do so in the future.

A businessperson prepares financial reports.

Image source: Getty Images.

1. American Tower

American Tower (AMT 1.09%) , with about 221,000 communications sites and 27 data centers around the world, is the biggest REIT in its market. And the company is the only REIT with a market capitalization that exceeds $100 billion. 

Large-cap telecoms such as T-Mobile lease space on American Tower's infrastructure. This allows telecoms to broadcast their signals to provide mobile data to customers. And these customers use that mobile data to check emails, shop online, and for many other everyday activities. The essential nature of American Tower's infrastructure helps the company to secure initial lease terms of five to 10 years that come with annual lease escalators.

Growing demand for mobile data and cell towers led American Tower's adjusted funds from operations (AFFO) per share -- a key measure of REIT performance -- to compound at a 13.8% annual rate over the past 10 years. This has resulted in 97% total returns with dividends reinvested in the past five years -- a 14.5% compound annual growth rate.

And it's not unrealistic to expect low-double-digit annual total percentage returns to continue. This is because average monthly mobile data usage will grow at double-digit annual percentage rates in key American Tower markets like the U.S., India, Brazil, and Mexico this year through 2027. This will require meaningful investment on the part of American Tower to meet that growing demand for its communications sites.

And with a dividend payout ratio just above 52% last year, the company appears to be retaining enough capital to invest in its future. Investors can buy into American Tower's market-beating 2.3% dividend yield at a forward price-to-AFFO-per-share ratio of 24.6 -- hardly an excessive valuation for the stock's quality and bright future.

2. Innovative Industrial Properties

Since its initial public offering in 2016, Innovative Industrial Properties (IIPR 2.21%) has established itself as the predominant source of capital for state-licensed cannabis operators. The company has increased its real estate portfolio to 111 properties in 19 states valued at $2.3 billion. This is how an investment in IIPR five years ago has generated 650% total returns with dividends reinvested -- a staggering 49.6% annual total rate.

Obviously, IIPR's total returns in the future won't be anywhere near what they have been in recent years. That's because of the law of large numbers, which states that a company's growth rate decelerates as it becomes bigger.

But with the company's AFFO per share surging 32.9% year over year to $6.66 in 2021, IIPR shouldn't have any difficulty outpacing the broader market in the years ahead. This is especially the case considering that the regulated cannabis market will nearly double from $24 billion in 2021 to $46 billion by 2026. 

Even with potential federal marijuana legalization on the horizon, the budding market will serve as a tremendous growth runway for IIPR. That's because the company has spent years developing relationships with its tenants, which won't simply go away when banks are able to provide loans to cannabis companies. As these tenants expand in the years to come, so will IIPR.

And income investors will appreciate the stock's secure, market-obliterating 6.5% dividend yield. Best of all, IIPR can be purchased at the bargain valuation of just 15.2 times trailing-12-month AFFO per share.