Talk about gold stocks, and Barrick Gold (NYSE:ABX) and Royal Gold (NASDAQ:RGLD) are among the two top names that come to mind. And why not? Both of these companies are leaders in their respective rights: Barrick is one of the world's largest gold miners, while Royal Gold is among the leading precious metals streaming companies in the world. In the past year, gold prices have been flattish, but shares of Royal Gold and Barrick have soared more than 35% each as of this writing.

Compare that with the lackluster one-year performances of peers Franco-Nevada (NYSE:FNV) and Goldcorp (NYSE:GG) -- up 8% and down 8%, respectively -- and it appears Royal Gold and Barrick must be doing something right to have the caught the market's attention. Both stocks look compelling today, but one looks especially poised to fetch you handsome returns if things go as planned for the company. 

Gold nuggets

Image source: Getty Images.

Before I tell you which stock is that, let's quickly check how Barrick and Royal Gold make money and how they compare in terms of margins.

Barrick is catching up

Barrick is a traditional miner that extracts precious metals from owned mines to sell in the market or to third parties. Royal Gold, on the other hand, lives off the hard work of miners -- It simply buys gold from them to later sell in the market. Of course, the luxury comes at a cost -- Royal Gold pays lump-sum, upfront money to the miners to support their operations and growth aside from the prices for the metal streams.

Overall, Royal Gold's streaming business comes with two huge advantages: No mining risks and low purchase cost of metals. Not surprisingly, Royal Gold has historically earned better margins than Barrick.

Or wait, that doesn't appear to be the case anymore. 

ABX Operating Margin (TTM) Chart

ABX Operating Margin (TTM) data by YCharts.

See how Barrick's margin has not just closed in but surpassed Royal Gold's in the past year? That's incredible, and the credit goes to Barrick's aggressive cost-cutting efforts: It slashed its all-in-sustaining costs by nearly 12% to $730 per ounce in 2016, driving its adjusted earnings up almost 140%.

Make no mistake: Royal Gold also ended its financial year 2016 with record production and revenue. However, it suffered net losses thanks to large impairment charges compared to Barrick, which turned a pretty decent net profit for 2016, breaking its recent streak of losses.

Why Barrick loses on the dividend front

Aside from cutting costs, Barrick also reduced its net debt by $2 billion and generated a record $1.5 billion in free cash flow last year. That makes Barrick a much stronger contender than Royal Gold, which is barely FCF-positive, although income investors have been better off with Royal Gold so far.

ABX Free Cash Flow (TTM) Chart

ABX Free Cash Flow (TTM) data by YCharts.

The thing is, Royal Gold's cash flows have been more stable thanks to its business model, which is why it has been able to increase its dividends for 16 consecutive years – a track record hard to match in a commoditized industry. What's more, its dividends have grown at a solid compounded annual average of 20% since 2001. Gold prices might have lost momentum since 2012, but Royal Gold hasn't denied investors higher dividends. That can't be said of Barrick, whose dividends have slumped since 2012. It was only in February this year that Barrick announced a 50% dividend hike after a long hiatus.

Which company has stronger growth potential?

2017 has also been a busy year for Barrick so far, with two major announcements coming in. First, Barrick has joined hands with Goldcorp to jointly operate its Cerro Casale mine at Chile as a 50/50 joint venture. Having another leading miner on board should help Barrick advance the mine faster. Second, Barrick has partnered with China's largest gold mining company, Shandong Gold Group, to tap resources in the high-potential El Indio Gold Belt on the Argentina-Chile border.

Clearly, Barrick isn't sidelining growth even as it focuses on deleveraging, with a target of reducing debt by $1.5 billion this year and a total of $5 billion by the end of next year. Meanwhile, it expects to keep its AISC below $770 per ounce through 2019. This cost visibility is particularly encouraging since cost is a significant determinant of profits in the gold industry.

Royal Gold, on the other hand, has pretty much locked in growth thanks to major investments during the weak business cycle of 2015. It has a stake in 22 development-stage mines, including Barrick's Pascua-Lama mine in Chile, which could reach permitting stage as early as next year if ongoing pre-feasibility studies deliver positive results. When these mines come online, Royal Gold's revenues should rise.
 
Chart showing Royal Gold's bought streams in recent years.

Image source: Royal Gold's presentation at the BMO 26th Global Metals & Mining Conference.

For now, Royal Gold is already on its way to a solid 2017 financial year, ending in June, having reported record operating cash flows during its last quarter.

Which stock should you buy today?

Depends on your risk appetite. If you're risk-averse, Royal Gold remains the safer bet in terms of growth in cash flows and dividends. But for those who can stomach the volatility that might come along Barrick's transformation, the stock could be a winner in the long run. Here's another reason to consider Barrick:

ABX Price to CFO Per Share (TTM) Chart

ABX Price to CFO Per Share (TTM) data by YCharts.

As one of the cheapest stocks today, Barrick sure looks very attractive given its growth catalysts.

Neha Chamaria has no position in any stocks mentioned. The Motley Fool has no position in any of the stocks mentioned. The Motley Fool has a disclosure policy.