As an investor, it pays to follow the cash. If you figure out how a company moves its money, you might eventually find some of that cash flowing into your pockets.

In this series, we'll highlight four companies in an industry, and compare their "cash king margins" over time, trying to determine which has the greatest likelihood of putting cash back in your pocket. After all, a company can pay dividends and buy back stock only after it's actually received cash -- not just when it books those accounting figments known as "profits."

Today, let's look at Union Pacific (UNP 1.08%) and three of its peers.

The cash king margin
Looking at a company's cash flow statement can help you determine whether its free cash flow actually backs up its reported profit. Companies that can create 10% or more free cash flow from their revenue can be powerful compounding machines for your portfolio. A sustained high cash king margin can be a good predictor of long-term stock returns.

To find the cash king margin, divide the free cash flow from the cash flow statement by sales: cash king margin = free cash flow / sales

Let's take McDonald's as an example. In the four quarters ending in December, the restaurateur generated $6.97 billion in operating cash flow. It invested about $3.05 billion in property, plant, and equipment. To calculate free cash flow, subtract McDonald's investment from its operating cash flow. That leaves us with $3.92 billion in free cash flow, which the company can save for future expenditures or distribute to shareholders.

Taking McDonald's sales of $25.5 billion over the same period, we can figure that the company has a cash king margin of about 14% -- a nice high number. In other words, for every dollar of sales, McDonald's produces $0.14 in free cash.

Ideally, we'd like to see the cash king margin top 10%. The best blue chips can notch numbers greater than 20%, making them true cash dynamos. But some businesses, including many types of retailing, just can't sustain such margins.

We're also looking for companies that can consistently increase their margins over time, which indicates that their competitive position is improving. Erratic swings in margins could signal a deteriorating business, or perhaps some financial skullduggery; you'll have to dig deeper to discover the reason.

Four companies
Here are the cash king margins for four industry peers over a few periods.

Company

Cash King Margin (TTM)

1 Year Ago

3 Years Ago

5 Years Ago

Union Pacific

11.6%

13.8%

6.0%

4.8%

Canadian National Railway (CNI 0.67%)

13.4%

15.0%

11.9%

13%

CSX (CSX 0.95%)

5.1%

10.2%

6.8%

4.1%

Norfolk Southern (NSC 0.44%)

7.5%

9.6%

7.0%

10.5%

Source: S&P Capital IQ

Both Union Pacific and Canadian National Railway meet our 10% threshold for attractiveness, and both have higher cash king margins than they did five years ago. Also, Union Pacific offers a 2% dividend yield and Canadian National Railway offers a 1.7% yield. CSX's current cash king margins are also higher than they were five years ago, but they have fluctuated a great deal over that time period, and are 50% lower than they were last year. Norfolk Southern's margins have also seen some fluctuation over the past five years, and have declined by three percentage points from five years ago. However, CSX offers a reasonable dividend yield of 2.3%, and Norfolk Southern offers a healthy 2.7% yield.

While Union Pacific has suffered along with many other businesses from a struggling economy, it has benefited from the high energy prices we've seen over the last few years, as many companies realize it's cheaper to transport their goods via train. Along with Canadian National Railway, Union Pacific has also managed to profit from the fact that there is insufficient pipeline coverage in areas like North Dakota, which produces a great deal of energy from the Bakken Shale and needs a way to ship it.

Also, unlike CSX and Norfolk Southern, Union Pacific doesn't rely heavily on coal shipping. This has sheltered it from some of the revenue losses seen by these other companies due to reduced demand for coal caused by a slowdown in Chinese manufacturing and the fact that many businesses are moving from coal to lower-priced alternatives like natural gas.

The cash king margin can help you find highly profitable businesses, but it should only be the start of your search. The ratio does have its limits, especially for fast-growing small businesses. Many such companies reinvest all of their cash flow into growing the business, leaving them little or no free cash -- but that doesn't necessarily make them poor investments. Conversely, the formula works better for slower-growing blue chips. You'll need to look closer to determine exactly how a company is using its cash.

Still, if you can cut through the earnings headlines to follow the cash instead, you might be on the path toward seriously great investments.