Petrochemical and midstream Big Oil player Phillips 66 (PSX -0.66%) just announced earnings for the third quarter, and in short, it killed it. Earnings per share of $2.09 soundly beat Wall Street analyst expectations of $1.69. This makes for a total of $1.1 billion in earnings, and should serve as a reminder that all oil companies aren't created equally. 

Earnings breakdown 
Phillips 66 operates three business units and owns half of a joint venture with Chevron, CPChem, that makes up the entire petrochemical business for the company. Here's how the business units performed:

Refining: The largest of the company's business units delivered $558 million in earnings, up 43% from last year. This was at least partly driven by lower oil prices.

Marketing and Specialties: Earnings of $368 million was more than double last year, and this was also driven by the falling price of crude. 

Midstream: This segment of the business is involved in moving oil, gas, and distillates largely in pipelines, and isn't tied to commodity prices very much. Net income of $115 million was about 5% up from last year. However, the company is expanding this business. 

CPChem: Earnings of $230 million is actually a decline from last year's $324 million. However, this was largely the product of an outage of ethylene -- the most widely used petrochemical in the world -- that was caused by a fire at one of the company's primary plants. This outage pushed utilization to 83% -- well below the typical mid-90% level. 

The company was also able to reduce corporate expenses by $30 million in the quarter. 

What it all means 
Phillips 66 isn't an oil and gas producer, but instead operates in the downstream and midstream segments. The result is that falling oil and gas prices -- assuming that demand remains steady -- is a net positive for the company. Phillips 66 buys a lot of crude oil and natural gas that it uses to produce distillates like gasoline and diesel, as well as in its petrochemical manufacturing business. 

So far this year, Phillips 66 has been on the right side of the market dynamics:

WTI Crude Oil Spot Price Chart

WTI Crude Oil Spot Price data by YCharts

When the cost of your input -- crude oil -- falls faster than the products you make -- gas, jet fuel, and diesel -- that's good for the bottom line. 

Looking ahead: Buy, sell, or hold? 
Phillips 66 stock has run pretty hard and fast since being spun off of ConocoPhillips in 2012. However, it's about where it started this year, after getting hammered in the past couple of months' fearful market:

PSX Chart

PSX data by YCharts

If you're fearful that oil prices will stay muted for an extended period, Phillips 66 could benefit from that, and today's share price could be a real steal. Better yet, the long-term outlook is sound no matter what oil prices do in the next few months. Its midstream business isn't really affected by oil or gas prices, and the chemicals business benefits strongly from U.S. natural gas prices, which should remain cheap for years. 

Finally, a solid management team continues to return value to shareholders via a solid and sustainable dividend program, and an aggressive plan to buy back company shares. Using free cash for these two things first is a real positive for investors, as it also keeps management from making poor M&A decisions with that cash. For long-term investors who are looking for a solid income stock that should increase payouts over time, it looks like a good time to buy and hold.