Medical Properties Trust (MPW -1.72%) has really gone through the wringer over the last year or so. Several of its top hospital-operator tenants faced serious financial difficulties. One of them even reorganized via a Chapter 11 bankruptcy.

Meanwhile, the Federal Reserve jacked up interest rates to levels not seen in decades. This put a damper on MPT's expansion plans.

Unsurprisingly, shares of the healthcare real estate investment trust (REIT) have plunged. But the story wasn't always so bleak: The stock delivered impressive total returns throughout much of the last decade. Were the good times positive enough to outweigh the bad times? If you invested $10,000 in Medical Properties Trust 10 years ago, here's how much you'd have now.

A REIT roller coaster ride

Your timing wouldn't have been great buying shares of Medical Properties Trust 10 years ago; the stock tanked shortly afterward. Nearly six years would pass before the share price clawed its way back:

MPW Chart

MPW data by YCharts.

The REIT's stock went on a nice run between early 2018 and early 2020. Then COVID-19 struck, and Medical Properties Trust shares plummeted during the pandemic-fueled market meltdown. Just as the stock was close to regaining its previous high, the aforementioned tenant difficulties caused it to fall once again, beginning early last year.

Does the fact that the share price is nearly 58% below where it was 10 years ago mean that you'd have lost more than half of your initial $10,000 investment? Nope. The story isn't nearly that bad because of one important factor: Medical Properties Trust's dividend.

The healthcare REIT paid an attractive dividend quarter after quarter throughout the entire period, and its dividend yield rarely dropped below 4%. Medical Properties Trust even increased its dividend payout by 45% over the last 10 years. Thanks to this great dividend, its total return looks much better than its stock performance:

MPW Total Return Price Chart

MPW Total Return Price data by YCharts.

Granted, the huge plunge since early 2022 wiped out any gains you'd have made over the previous years, and then some. Your initial $10,000 investment would be worth only around $8,161 today with dividends reinvested. Still, the dividends would have helped cushion what would have otherwise been a much worse loss.

Going back further

There's better news if we go back further. What if you invested that same $10,000 when the REIT first listed its shares in July 2005?

MPW Chart

MPW data by YCharts.

As the above chart shows, the stock by itself would have lost money. With dividends included, though, your $10,000 would have grown to around $15,070. Although that's better than taking a loss, you would still have been better off putting your money in an S&P 500 fund than buying shares of Medical Properties Trust.

Looking ahead

The more important question for investors right now is: How much money could investing in Medical Properties Trust make over the next 10 years? Unfortunately, there's no way to be sure about the answer to that question. However, a pretty good case could be made that its shares could beat the market.

For one thing, the stock is dirt cheap after the huge sell-off that began last year. Medical Properties Trust's share price is lower than its initial price back in 2005. And that's the case even though the REIT is generating significantly greater earnings and free cash flow.

The demand for hospital services is likely to increase over the next decade as well, with populations aging in the markets that MPT's properties serve. Sure, it's possible that hospital operators in the U.S. could continue to face some financial challenges. But it almost certainly won't be because of a lack of patients.

Interest rates probably won't remain as high as they are now, either. Any rate decreases should boost this stock.

Don't forget the impact of the REIT's dividend -- we've already seen what a big difference that made over the last 10 years. If its shares deliver even modest gains (which seems possible), its total return could be especially attractive thanks to the company's dividend.

There's no guarantee what the future holds. However, the chances that investing $10,000 in Medical Properties Trust today will generate solid total returns over the next 10 years appear to be pretty good.