Anadarko Petroleum Corporation (NYSE:APC) posted a GAAP loss of $6.45 per share in the first quarter of 2015. That's a nasty number, even for an oil and gas company, but it isn't nearly as bad as it looks. Here's why.

A sky-high legal bill
Earlier this year, Anadarko's settlement agreement over the Tronox pollution case was completed. Tronox was a company spun off from Kerr-McGee in early 2006. Later that same year, Anadarko completed its acquisition of Kerr-McGee. The case that's been settled basically accused Kerr-McGee of spinning off Tronox so it could avoid dealing with the chemical company's pollution issues -- like litigation. That didn't fly in court, and now Anadarko owns Kerr-McGee, so it has to deal with the bill.

And what a bill it was. In late January, Anadarko paid $5.2 billion to put the Tronox litigation behind it. That and a few other items decreased earnings in the quarter by $5.73 a share. Pull that out of the bottom-line loss, and Anadarko's first-quarter loss was $0.72 a share. Still higher then Wall Street estimates of a $0.65 per share loss, but much better than the GAAP number.

WTI Crude Oil Spot Price Chart

WTI Crude Oil Spot Price data by YCharts

The top line, meanwhile, came in at $2.3 billion, lower than analyst expectations by $200 million and less than half the year-ago figure of $5.8 billion. The biggest culprits were lower natural gas and oil revenues, which is no surprise given the difficult pricing environment in energy. Putting some numbers to that, in last year's first quarter Anadarko was paid roughly $5 per Mcf for natural gas and just over $99 per barrel of oil. Those numbers were $2.60 per Mcf and roughly $47 per barrel of oil in the just ended quarter.

A look underneath
But those are the headlines, and with Anadarko you need to dig a little deeper. For example, the energy company "delivered record sales volumes," increasing sales by over 130,000 barrels of oil equivalent, or BOE, per day to an average of 920,000 BOE in the quarter, taking into account divestitures. (BOE compresses oil and gas together into one figure.)

And that's not all the good news. The company was also able to reduce costs by roughly 17% per BOE year over year. An example of its success is the 15% sequential drop in drilling and completion costs at its Wattenberg field compared with the fourth quarter and the 14% decline in its Eagleford Shale operations. The company is clearly retrenching, as are most in the industry, but it's been able to keep production increasing despite its cost-cutting efforts.

The oil is still flowing at Anadarko. Source: Chappell, Oil City, Pennsylvania, via Wikimedia Commons.

Then there's the longer-term production outlook to appreciate. In the company's Wolfcamp Shale operation, it has identified over 5,000 potential drill sites. It believes this play has around 1 billion BOE in it. In the Gulf of Mexico, Anadarko continues to increased production at its Lucius spar operation and is expecting the Heidelberg project to start pumping oil in the middle of next year. In other words, there's more production growth ahead.

Is this duck a swan?
There's no way to avoid the impact of low oil and gas prices, and Anadarko is suffering along with the rest of its industry. However, the headline earnings number makes the pain look far worse than it really is because of the Tronox settlement. And once you look at the operations underneath the earnings, Anadarko continues to perform well. When energy prices recover, Anadarko and its shareholders should be in good position to benefit.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.