BP's (BP 1.01%) fourth quarter results were very similar to its integrated major peers: A slight downturn from the third quarter, but much stronger than the year before. When it comes to BP, though, there are lots of funky accounting things to look through to really understand what is going on at the business. Digging into these numbers, things are looking better by the day. Here's a quick look at the details of BP's quarter as well as what management has its sights on for 2017.

Offshore platform at sunset

Image source: Getty Images.

By the numbers

Results* Q4 2016Q3 2016Q4 2015
Revenue $52,121 $48,043 $49,233
Net Income $543 $1,577 ($3,324)
Earnings per ADS (U.S. GAAP) $0.16 $0.51 ($1.08)
Operational cash flow $2,428 $2,508 $5,806

*in millions, except per share data. Source: BP earnings release.

At first glance, it would seem as though BP took a step backward this past quarter in terms of profitability. In the prior quarter, the company had a $1.4 billion benefit from an asset impairment reversal that added to the bottom line, whereas the past quarter that reversal gain was $292 million. There were also some tax gains in the third quarter that bumped those profit numbers.

If we were to strip away all of these one time gains and losses and use what BP calls its underlying replacement cost profit, then this past quarter the company pulled in $400 million in net income compared to a $933 million in Q3 2016 and a $196 million loss in Q4 2016. So the step backwards was quite a bit smaller than the headline results.

The promising sign for BP was that the company posted an underlying profit from its upstream production segment for the first time in several quarters. Higher price realizations and the end of some turnaround work in the prior quarter led to a $400 million gain on the upstream side. Again, this is before all of those one time gains and charges. For downstream refining, gains at its lubricants and petrochemicals business were more than offset by weaker fuel refining margins and some turnaround work at a major refinery. The results from its lubricants and petrochemials business are some of the best results it has posted in these segments.

BP's operational profits by business segment for Q4 2015, Q3 2016, and Q4 2016

Image source: Getty Images.

From a cash flow perspective, it also looks like BP took a big step backwards compared to the year prior. This is another one of those accounting quirks as the company has a $3 billion gain from a drawdown in working captial in the fourth quarter of 2015. So all things equal, it looks as though cash generation hasn't changed much lately. BP ended the quarter with $34.8 billion in net debt-debt minus cash on hand -- and has a net debt to capital ratio of 27%, which is within management's target range of 20%-30%

What management had to say

CEO Bob Dudley, on what he foresees for the oil market in the coming year:

As we stand today, Brent oil prices have risen by around $10 per barrel since the OPEC deal was announced. We still expect oil demand growth to be strong this year at 1.3 million barrels per day, with modest growth in non-OPEC supply – which means the timing and extent of market rebalancing depends heavily on OPEC behaviour.

The physical market has begun to tighten with inventories falling a little faster than seasonal norms. However, OECD inventories at the end of 2016 were still close to 3 billion barrels, significantly higher than their recent historic average. We expect much of the historical inventory overhang to be eroded by the end of 2017 if OPEC and non-OPEC producers deliver on their promised production cuts. Any shortfall could delay this process and does still pose some downside risk to prices in the near term.

So while we remain optimistic about the market continuing to rebalance in 2017, we recognise that this could take some time. In short, the road to a more balanced position still has uncertainties

What a Fool believes

While most other integrated oil and gas companies are still being reserved with their capital expenditure budgets, BP is actually upping its spending levels for 2017 in large part because it gave the green light for Mad Dog 2 in the Gulf of Mexico and acquired a 10% stake in Eni's massive Zohr gas field in Egypt. These new projects will add a bit to the budget as well as add some significant growth for 2020 and beyond.

The company is still sorting out some issues with the Deepwater Horizon spill, but the combination of better capital allocation and prudent cost management has put the company in a much better place than it has been in a long time. These may not show up in the income statement yet, but they should in coming quarters.