Investing in a stock that pays a high yield can result in some great dividend income for your portfolio, but it can also be risky if the payout isn't safe. Before investing in a high-yielding stock, investors should assess whether the dividend is safe and sustainable.

Two attractive dividend stocks for investors to consider today include Walgreens Boots Alliance (WBA 1.79%) and Medical Properties Trust (MPW -4.03%). Both yield more than 5% on their dividends, but which is the better option?

The case for Walgreens

At 5.2%, Walgreens pays investors a dividend yield that is three times the S&P 500 average of 1.7%. It's a high payout, but it isn't dangerously high.

One of the most attractive features of the dividend is that the pharmacy retailer consistently increases it. In July 2022, the company announced a modest 0.5% increase in the quarterly dividend to $0.48. It was the 47th consecutive year that Walgreens raised its dividend payment. It's just three more annual increases away from becoming a Dividend King. In 10 years, Walgreens has increased its dividend by 75%, generating a compounded annual growth rate (CAGR) of 5.7%.

Investors may be concerned about the company's $3 billion reported loss over the trailing 12 months. However, a big reason for that is that the pharmacy retail giant incurred a $5.2 billion after-tax expense related to opioid litigation, which is nonrecurring. Plus, the company is expanding into healthcare by launching primary care clinics at its locations, which should offer it some more growth opportunities (the company estimates annual sales could top $16 billion by 2025) and potentially stronger profitability down the road.

The case for Medical Properties

Medical Properties Trust is a real estate investment trust (REIT) that focuses on investing in hospitals and medical facilities, and its dividend yield now exceeds 8.5%. While that appears high, it may not be as unsustainable as investors might expect. 

In its most recent quarter (the period ending Sept. 30), Medical Properties reported funds from operations (FFO) per share of $0.42. Over the past three quarters, its per-share FFO totaled $1.34. And over the same time frame, the company declared per-share dividends totaling $0.87, which would put its payout ratio as a percentage of FFO at 65%. FFO is a key number for REITs; it is a better measure than net income when evaluating dividends, as it excludes depreciation and amortization and gains and losses related to the sale of assets.

Unlike Walgreens, which may need to pursue aggressive growth strategies (like expanding into healthcare) to win over investors, Medical Properties can simply acquire more healthcare properties to add to its portfolio when it sees fit to bolster its business. There can be less risk in that approach, as it's simply adding more tenants to collect money from; Walgreens, on the other hand, may need to acquire new businesses and integrate them into its existing operations while carefully ensuring that it can do so while balancing its dividend payments and not hurting overall profitability.

And although Medical Properties may not have the impressive dividend streak that Walgreens has, it has increased its payouts by 45% over the past 10 years, for a CAGR of 3.8%.

Go with Medical Properties in this matchup

Both of these stocks offer high payouts, but Medical Properties' less complicated business model and strong FFO numbers make me feel more comfortable with its dividend than the one from Walgreens.

The pharmacy retailer is undergoing a transition in its business aimed at shedding costs while also growing, and it's not certain how that will turn out. The company's quite modest 0.5% increase in its dividend last year suggests that its streak of increasing dividends is barely alive, and future increases could be similarly light, especially as Walgreens spends more money on its new healthcare division. That's why despite having a higher yield, Medical Properties may be the safer and better dividend stock to own right now.