Oil prices are at their highest levels in three years, and that means that oil companies -- both producers like ConocoPhillips (COP -0.93%) and integrated majors like BP (BP -0.67%) -- are rolling in the dough right now, in part because of cost-cutting during the price downturn.

And if energy prices stay at these levels, investors should be rewarded handsomely.

But even though a proverbial rising tide may lift all boats (not to mention offshore oil rigs), some companies within a hot sector are going to outperform others. Let's look at ConocoPhillips and BP to see which one is likely to benefit most from the current energy industry climate -- and why.

An offshore oil rig at sunset

Top oil companies ConocoPhillips and BP are cashing in on high energy prices. Image source: Getty Images.

Cost-cutting pays off

After the oil price downturn in 2014, companies like Conoco and BP scrambled to cut their costs so they weren't losing money on the oil (and gas) they pumped. With oil and gas prices rising again, and cost-cutting measures already established, the companies' margins have fattened considerably. This is particularly true for driller ConocoPhillips, which -- unlike integrated BP -- doesn't have profitable refining and marketing operations to fall back on when energy prices go south. These charts show how much impact the oil price collapse had on Conoco's margins, and how BP skated by comparatively unscathed:

BP Profit Margin (TTM) Chart

BP Profit Margin (TTM) data by YCharts.

You'll notice that on a trailing-12-month basis (top chart), Conoco's profit margin is negative, because oil prices were still too low for it to turn a profit a year ago. On a quarterly basis, though (bottom chart), Conoco's profit margin has soared; this is thanks in part to the company jettisoning some low-margin operations last year, but mostly due to higher energy prices.  

BP does have an issue, though, that Conoco doesn't: It's still paying for the Gulf of Mexico oil spill of 2010. In fact, even after a $1.7 billion charge in Q4 2017, management still expects to be on the hook for another $3 billion in 2018 alone. That would be more than 10% of BP's 2017 earnings, which means less cash to build the company and benefit investors. The bottom line is that ConocoPhillips seems to be besting BP in this category.

Many happy returns

One way to do an apples-to-apples comparison of how these companies are doing is to look at their return metrics, including return on capital employed, return on invested capital, and return on equity. These figures show how well -- or poorly -- management is deploying the company's resources:

BP Return on Capital Employed (TTM) Chart

BP Return on Capital Employed (TTM) data by YCharts.

Really, these charts say it all: BP is handily besting ConocoPhillips on all three metrics.

Of course, it isn't really surprising that BP's returns are superior: Most integrated majors' returns are higher than most independent exploration and production companies. So even though BP's management team might not outperform Conoco's if the tables were turned, BP is still generating superior returns for its investors.

A question of value

ConocoPhillips looks like a better buy from a margin standpoint, while BP looks like a better buy from a returns standpoint. BP's dividend yield far outpaces Conoco's, 5.2% to 1.6% -- but that may not automatically mean that BP is the better value.

We could look at the companies' growth prospects, but with oil prices high and cash rolling in, each company has ample opportunity to boost production growth. Sure enough, BP has outlined a plan to boost production over the next three to four years while pushing down its cost of production, which should allow it to return plenty of cash to shareholders. Conoco is already executing a similar plan that calls for improving well performance and increasing share buybacks.

We could look instead at the companies' valuations to see which stock seems cheaper. Unfortunately, depending on which metric you pick, each company could lay claim to being the better value:

Company Price to Earnings (TTM) Price to Earnings (Forward) EV to EBITDA (TTM) EV to EBITDA (Forward) Dividend Yield
BP 34.6 14.8 7.4 5.5 5.2% (mid-high)
ConocoPhillips 21.7 17.3 13.5 6.1 1.6% (low)

Data source: YCharts. EV = enterprise value; EBITDA = earnings before interest, taxes, depreciation, and amortization.

Dividend yield can sometimes be a proxy for valuation: A higher-than-average yield can indicate a stock is undervalued, and vice versa. Well, Conoco's yield is currently sitting near the bottom of its historical range, while BP's is in the mid-to-high range. That could indicate that BP is undervalued. BP also has the lower ratio in three of the four other metrics (only scoring higher on trailing-12-month P/E).

It's possible, of course, that the market is simply expecting higher growth out of Conoco's shares. But of course, the companies don't exactly make it easy to compare their growth forecasts. Conoco is projecting double-digit production growth per debt-adjusted share, thanks mostly to all the debt it's paid off over the past year. Meanwhile, BP expects production growth of about 5% per year through 2021, and sees its cost of production falling to $35/barrel to $40/barrel, about even with Conoco's. But BP also has its downstream segment, from which it expects 33% margin growth by 2021. And, of course, any number of unforeseen circumstances might upend these projections. 

And the winner is...

While both ConocoPhillips and BP are likely to outperform as long as energy prices remain high, BP's superior dividend yield, better returns, and lower valuation make it the better buy today. Not to mention, if oil prices drop again, BP is better-positioned to weather the downturn thanks to its lower debt metrics and status as an integrated oil major.

Investors interested in buying an independent oil and gas exploration and production company, as well as an integrated oil major, can find a compelling reason to include both companies in their portfolios right now. But if you have to pick just one, BP looks like the better buy.