Dividend stocks can make for some of the best investments. Not only are they a great source of recurring income, but the best dividend-paying companies also often have wonderful growth prospects. That means not only do you get paid, but also the growing value of your investment can pay off with immense wealth over the long term.

However, dividend stocks can also be hazardous to your wealth. It can be easy to fall for a yield trap while passing up a smaller payout that's far more secure and likely to grow, leaving you with a smaller nest egg when that high dividend gets cut and investors sell out in their race for the exits.

To help investors make the most of your hard-earned capital, both in reducing your risk and maximizing gains, here is most important -- yet relatively simple -- thing anyone can do to set their dividend portfolio up for success: Measure a company's ability to keep paying you.

The words margin of safety written on a chalkboard.

Image source: Getty Images.

The three most important words in dividend investing

When it comes to investing in a stock based on its dividend, it's hard to undersell the value of these three words: margin of safety. So what exactly does that mean? Depending on the company and what it does, it's measuring how well cash flows support the dividend, and how strong its balance sheet is to further support the unexpected and fund future growth.

While taking the time to make sure the dividend stocks you buy hold up well to scrutiny on these characteristics won't guarantee perfect results, they should go a long way toward improving your returns, by improving the probabilities that your dividend stock choices will be winners, not losers.

Can cash flows support the payout?

One common metric to measure this is the payout ratio.

But since earnings aren't a measure of cash flow -- a number of GAAP items are non-cash, accounting for prior expenditures -- the cash payout ratio is handy, too. This is particularly true for specific types of businesses, such as REITs -- real estate investment trusts -- that must take depreciation expenses for their real estate, even though real estate appreciates in value over time. Since depreciation and amortization are non-cash expenses, the cash payout ratio a better measure of dividend safety for REITs. Here's a good example of how the cash payout ratio can help measure REITs:

O Payout Ratio (TTM) Chart

O Payout Ratio (TTM) data by YCharts

As the first chart shows, both Realty Income (O -0.71%) and Caretrust REIT (CTRE -0.42%) payout more than 100% of their GAAP earnings in dividends. Yet on a cash flow basis, the math looks much better, at 81% and 63% respectively, a respectable amount for a REIT to spend on its dividend.

For other industries, the cash payout ratio is generally best used, along with the earnings payout ratio. Furthermore, most companies should also pay out a much smaller portion of cash and earnings than REITs, because Caretrust and Realty Income's tenants are responsible for upkeep, while other companies must steadily invest back into their businesses to keep them competitive.

For instance, steelmaker Nucor (NUE -0.27%) must constantly spend capital to stay competitive, as well as navigate highly cyclical steel demand. It must regularly make capital expenditures to maintain and improve its steel plants, make big capital investments to expand a facility or to shutter it, and undertake a litany of other expenditures to remain competitive. For these reasons, Nucor, on average, pays out a much smaller portion of its cash flows and earnings in dividends:

NUE Payout Ratio (TTM) Chart

NUE Payout Ratio (TTM) data by YCharts.

How strong is the balance sheet?

There are other things to measure that demonstrate how secure a company's dividend is, including its balance sheet (that is, the assets it holds including cash, inventory, and so on, versus liabilities such as debt and payments to vendors) within the context of its industry.

Let's use Caretrust and Nucor as examples again, starting with Caretrust:

CTRE Cash and Short Term Investments (Quarterly) Chart

CTRE Cash and Short Term Investments (Quarterly) data by YCharts

Caretrust carries a very small cash balance and has a fairly large debt load in terms of its size. This balance sheet and leverage is relatively typical for a REIT, however, because REITs are built to pay dividends from their cash flows, which are a product of very long-term, very predictable agreements with the tenants that lease its properties. Caretrust's clients are healthcare providers and operators of skilled nursing facilities. These businesses are necessary and important in any economic environment, and the predictable cash flows they pay to Caretrust mean its payout is quite secure.

Nucor, on the other hand, operates in one of the most viciously cyclical industries out there and doesn't have the security of decade-long contracts across every economic environment. So Nucor's management has made sure to maintain a significant amount of cash, while also using far less debt leverage:

NUE Cash and Short Term Investments (Quarterly) Chart

NUE Cash and Short Term Investments (Quarterly) data by YCharts

One only has to look at how much Nucor's cash flows have varied from year to year, while Caretrust's have held steady and grown, to see why this difference in balance sheet strategy across industries is very important:

CTRE Cash Dividend Payout Ratio (TTM) Chart

CTRE Cash Dividend Payout Ratio (TTM) data by YCharts

Check out the latest earnings call transcripts for Realty Income and Caretrust REIT.

Know what you're buying

Before you add a dividend stock to your portfolio just because the yield looks good, take some time to understand its cash flows, and the strength of its balance sheet, and how both relate to the security of its payout based on the industry it operates in.

Trying to determine the margin of safety of a company's dividend may not sound like much fun, but it will make a big difference in your returns. One of the best ways to maximize your dividend stock returns is to know which stocks to avoid and which are worth owning based on their ability to keep paying you.