The tumbling stock market and troubling inflation levels might have those in Gen X and younger wondering if retirement can ever happen. But it can if you play your cards right and stay in the game for the long run. In this case, the game is investing.

For starters, max out on your IRAs and 401(k)s and leave them in stocks and funds with risk levels appropriate to the time you have until retirement. It's conventional wisdom that stocks reward those who buy well and stick with it, and who don't try to time the market.

The wisdom is right: From 1972 to 2021 the S&P 500 -- which represents about 80% of the total market's value -- has provided an annualized return of 9.4%.

Two people looking out a window in an empty loft-looking room.

Image source: Getty Images.

That's still an inflation-beating number, and you can replicate that retirement-accelerating performance simply by buying one of those huge index funds and adding to it over the years.

You can also enjoy long-term gains that move you ever closer to affording retirement by investing in real estate in all its many forms. Indeed, there are a lot of ways to get involved in real estate investing. Let's take a quick look at a few of them, with a longer look at my personal favorite: real estate investment trusts (REITs).

1. Directly own real estate, if you can and dare

Buying your own real estate, whether to manage the rentals or have someone else do it, or simply to hold short-term and fix and flip, can still provide a path to prosperity, as it has for generations.

However, this might be the most challenging way, since you need capital up front, management skills, and market savvy. I know plenty of folks who have all that, or enough of each to make a difference, and they've done fine. It's a lot of work but certainly has been rewarding for them.

2. Real estate crowdfunding platforms

These operations offer you the ability to invest in individual properties across asset classes, especially multifamily, retail, and smaller logistics sites, and require minimum investments typically ranging from $5,000 on up.

Some also offer REITs that pay regular income, typically quarterly, but they all pool your money with others in exchange for access to owning a chunk of this real estate while it's managed by the platform's operators. They don't have the kind of history, transparency, or liquidity that publicly traded equities do, but you certainly can grow your retirement nest egg through smart use of this still-emerging new option.

3. Real estate industry stocks

There are a fair number of companies deeply involved in providing real estate services, including commercial and residential brokerages and property and investment managers. Just a couple of prominent examples include Jones Lang LaSalle and RE/MAX Holdings. There also are data companies like Black Knight and the big homebuilders like D.R. Horton.

4. Real estate investment trusts

As I've moved into my retirement years, my sweet spot in all this is REITs. These are pools of income-producing properties whose operators are obliged by tax law to pay out at least 90% of their taxable income in the form of shareholder dividends. That means they're providing you a nice stream of passive income that -- if the REIT is well-chosen -- should continue or even grow while the stock market goes up, down, and sideways.

There are about 225 publicly traded REITs, and they can be either quite diversified or focus largely on one type of asset class. Examples include industrial, residential, office, healthcare, and retail.

Their liquidity enables you to easily move between industries -- for example, out of the troubled office space into the hot warehouse logistics market. And while most are struggling mightily right now like the rest of the market, their histories show they do tend to hold up better than a lot of sectors during down markets and against inflation.

Right now my investments include Agree Realty (ADC -0.48%), a retail REIT that is currently yielding about 4.24%; hospital owner Medical Properties Trust (MPW -1.10%) and its current yield of about 6.43%; and Innovative Industrial Properties (IIPR -0.17%), a medical marijuana specialist now yielding about 4.84%.

This chart shows how Agree Realty and Medical Properties Trust have fared in total return compared with the S&P 500 in the past 10 years.

^SPXTR Chart

^SPXTR data by YCharts

Innovative Industrial Properties has only been public for about five years, but despite its plummeting price of late, it's still smoked the S&P 500, providing a total return of about 815% as compared to 115% for the greater market index in that time. And its first-quarter report out this week was pretty positive, in my estimation as an investor in this stock.


Let the right REITs yield your retirement income, for now or later

The market has hit REITs hard, like everything else, but it has driven up yield. Yield is a function of both price and dividend, of course, and these yields have gone up while prices fell, or in the case of Innovative Industrial Properties, pretty much tanked.

But their business prospects, in my view, remain strong. And as long as their dividends keep rolling in, I'm going to stick around and let them and the other income-producing parts of my diversified portfolio keep funding the retirement that I counted on the market to allow over decades of buy-and-hold investing.