Founded in 1993 by brothers Tom and David Gardner, The Motley Fool helps millions of people attain financial freedom through our website, podcasts, books, newspaper column, radio show, and premium investing services.

Lower operational costs and no major income charges helped make earnings look good for a minute. Then it had to take a charge for the Gulf of Mexico spill.

The last thing BP (NYSE:BP) and its peers needed this quarter was for oil and gas prices to decline even more than they did last quarter. But they did, and to make matters worse, the operating environment for refiners wasn't as strong, either. Considering this and the big loss that BP saw last quarter, it woudn't have been surprising to see an even weaker earnings report this past quarter.

Surprisingly, though, the company showed better-than-expected results from its operations. Let's take a quick look at BP's results from last quarter to see what went right from operations, and why it was all for naught as charges related to the Gulf of Mexico ate up any operational gains.

By the numbersAmid a low oil and gas price environment, BP was able to eke out a better-than-expected profit. BP's normalized first-quarter earnings on its American depository shares was $0.17 per share, a welcome surprise to Wall Street, which was expecting a loss. These normalized earnings don't include large charges that the company took related to its Gulf of Mexico settlement, though. When we add those back into the equation, the company's earnings fell to a loss of $0.19 per share

A big reason BP was able to generate a modest profit on a normalized basis is that it didn't take large impairments or writedowns as it has in prior quarters, and refining and chemical earnings were surprisingly strong, considering refining margins for the quarter were noticeably weaker. Here's a quick breakdown of BP's earnings by business segment.

Image source: BP earnings report. Author's chart.

The highlightsThere weren't exactly a lot of things to jump and down about in BPs earnings this time around, but there were two things of note that could be promising over the next several quarters. One of them is the company's stronger refining results. The refining margins in the quarter were simply not as strong as this time last year, but BP was able to make up for this drop with stronger operational performance and growth in petrochemicals and lubricants. These are typically very small parts of the company's overall business, but this quarter the two combined to generate $490 million in operational profits. Getting some additional help from these normally unloved segments could be immensely helpful in keeping the company somewhat profitable over the coming quarters.

The other item of note is the company's cost-cutting efforts. When we strip out the non-cash charges and writedowns from upstream earnings, both this quarter and the prior quarter come in pretty much the same. This may not sound like much, but over that same time period BP's price realizations for oil and gas dropped from $44 a barrel to $34, and natural gas prices have notably declined as well. The company was able to keep profits flat in part because it has significantly reduced its cost structure. BP's management estimates that its operational costs are now $4.6 billion less than 2014 levels, and it expects to get those costs down such that they will be $7 billion lower than 2014 levels by 2017. If it can really get costs down that much, it will have a much easier time finding profits.

The outlookAs costs continue to come down, so, too, does the per-barrel breakeven price. With the cost savings target and reduced capital spending, BP estimates that it can lower its breakeven price from $60 per barrel to a range of $50 to $55. That would certainly help today, but that could be even more critical in the coming years as the industry starts to recover. Even with this low oil price breakeven cost, the company estimates that it will be able to deliver 800,000 barrels of oil equivalent per day in new production by 2020.

What a Fool believesBP still has some issues to work out before the company really starts to be a solidly profitable business again, but this quarter did show hints that it could get there in the coming years. There's a plan in place that looks like it will work, and now BP needs to execute on that plan. The payments associated with the Gulf of Mexico spill may be more clear, but they will be a constant drag on earnings for a very long time and should give investors some pause.

BP does look slightly more promising than it did a year ago, but it's still got some work to do before it's generating strong returns for shareholders.

The Motley Fool has no position in any of the stocks mentioned. Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.