Phillips 66 (NYSE:PSX) has done an exceptional job enriching its investors over the years. The refining company has generated a nearly 320% total return since its formation in 2012, obliterating the S&P 500's roughly 150% total return over that time frame. The company's ability to produce market-crushing returns is one of the reasons Warren Buffett owns shares.

The company continued to increase shareholder wealth during the third quarter. Overall, it generated $1.7 billion in cash from operations, which allowed it to return $841 million to its investors via dividends and share repurchases. Here's a look at what was behind the refining company's ability to produce another gusher of cash last quarter.

Drilling down into Phillips 66's third-quarter numbers

Metric

Q3 2019

Q3 2018

Q2 2019

Adjusted pre-tax Income

$1.9 billion

$2.0 billion

$1.8 billion

Adjusted earnings

$1.4 billion

$1.5 billion

$1.4 billion

Adjusted earnings per share

$3.11

$3.10

$3.02

Cash from operations

$1.7 billion

$582 million

$1.9 billion

Data source: Phillips 66.

Phillips 66 delivered solid third-quarter results. One of the highlights was the increase in adjusted earnings per share, which came even as total adjusted earnings declined. That's due entirely to the company's share repurchase program. Overall, the company bought back another $439 million in shares during the quarter, reducing its total share count to 444 million -- a remarkable 33% less than the initial tally when the company formed in 2012.

Phillips 66 was able to generate and return cash to shareholders in the third quarter thanks in no small part to its diversified operations:

Phillips 66's adjusted pre-tax income by segment in the second and third quarters of 2019.

Data source: Phillips 66. Chart by author.

The highlight during the third quarter was the company's marketing and specialties segment, where adjusted pre-tax income surged 41%. The primary driver was higher margin thanks to favorable market conditions. That enabled the company to export 220,000 barrels of refined products per day, up 16%.

The company's midstream operations also delivered solid results in the quarter as its adjusted pre-tax income rose 4%. The main driver was its natural gas liquids (NGLs) business, where earnings rose 18% thanks to its butane and propane trading activities. That helped offset weaker results from its investment in MLP DCP Midstream.

The strength of those two businesses helped offset some weakness in both chemicals and refining. The chemicals business, which is part of a 50-50 joint venture with oil giant Chevron, reported a 2% decline in earnings because of lower margins. Higher maintenance expenses and lower gasoline margins in the central region of the country caused the profitability of Phillips 66's refining business to slump about 15%.

A close-up of a stack of $100 bills.

Image source: Getty Images.

A look at what's ahead for Phillips 66

Diversification and continued operating strength give Phillips 66 confidence that it can continue producing cash. It recently announced a new $3 billion share repurchase program. That buyback, when combined with its dividend, will send more cash investors' way. Overall, the company has returned $25 billion to its shareholders since 2012.

Growth-focused investments also helped bolster the company's results. It invested $867 million in expansion projects during the quarter, which should help expand its cash flow in the future. The company has several notable projects under construction. First, it's building three more NGL processing facilities at its Sweeny Hub, which will enable it to keep cashing in on butane and propane. It's also constructing additional export capacity at its Beaumont Terminal to enhance its ability to capture favorable market conditions. Finally, it's building two new oil pipelines, which will generate stable cash flow as they transport oil from production basins to market centers.

As these and other projects come on line, they'll provide Phillips 66 with more cash flow, giving it the means to keep buying back stock, as well as increasing its dividend.

The refining stock's future remains bright

Phillips 66 continues to turn oil and NGLs into cash, which gives it the funds to enrich its investors, including Warren Buffett. With more cash-generating expansion projects under construction, the refining company plans to return even more money to investors. That should lead to continued strong total returns for its shareholders.