Marathon Oil (MRO 0.61%) has transformed itself into a cash flow-generating machine over the past few years. That was evident in the company's recent earnings report for the fourth quarter and full year of 2019. Not only did it produce a boatload of excess cash in those periods, but it also expects to continue churning out more money than it needs to run its operations over the next two years, even if oil remains in its current weak state.

Drilling down into 2019's gusher

Marathon Oil produced about $110 million of organic free cash flow during the fourth quarter, which pushed its full-year total to $410 million, after paying its dividend. The company returned nearly all that money to investors by repurchasing $350 million in shares. It was able to do that because it has a strong balance sheet, including ending the year with $900 million in cash. 

A silhouette of an oil pump in an oil field at sunset.

Image source: Getty Images.

Two factors fueled Marathon's ability to produce cash in what was another challenging year for the oil patch. First, it boasts a portfolio of low-cost oil assets that earn high margins even at lower oil prices. Second, it kept a tight lid on spending. Not only did it stick to its $2.4 billion capital budget, -- which was still enough money to grow its low-cost oil output by 9% year over year -- but it also reduced its well costs by 10% and its production expenses by 15%. These factors enabled the company to produce a lot of excess cash, even though oil and gas prices remained volatile.

Another gusher anticipated

Marathon Oil expects to continue producing free cash over the next two years under a range of oil price scenarios. The company set its capital budget at $2.2 billion for 2020, which is 9% lower than last year. That's enough money to grow its production by about 6%. It can fund that plan on the cash flows produced at $47-per-barrel oil. The company expects spending and growth to be comparable in 2021, though it should have an even lower oil breakeven level.

Given that baseline plan, Marathon estimates that it can produce $600 million of free cash flow after paying its dividend over the next two years if oil averages $50 a barrel. That's slightly below its recent level of around $51.50 a barrel after selling off this year. 

Meanwhile, Marathon would produce even more free cash if oil prices improve. At $55 oil, it could generate $1.3 billion in post-dividend free cash during that two-year timeframe, with that number rising to $2.1 billion if oil averages $60. To put those pricing levels into perspective, crude averaged $61 a barrel during the 2018 to 2019 timeframe, implying that Marathon's numbers aren't too aggressive, especially since it has hedging contracts in place locking in an oil price floor of $55 a barrel for 40% of its production this year.

The company plans to continue returning virtually all its free cash flow to shareholders through its stock repurchase program, since it already has a cash-rich balance sheet. That will enable it to continue reducing its outstanding share count, which has already fallen about 7% since it started repurchasing stock in the third quarter of 2018. It has $1.4 billion remaining on its current repurchase authorization, which is enough money to retire another 16% of its outstanding shares at the current stock price.

A plan to withstand the continual turbulence in the oil market

Marathon Oil's efforts a few years ago to reshape its portfolio around low-cost oil assets are paying dividends. That was evident last year as the company produced a lot of free cash in a turbulent oil and gas market. It expects more of the same over the next two years, which is great news for investors since it intends to return all the excess it produces through continued share repurchases. The energy company's focus on returning value to shareholders could help bolster its stock, which has tumbled nearly 30% over the past year even though it continues to generate and return boatloads of cash.