Beating earnings estimates is one thing, but beating them by 35% this past quarter was a truly remarkable achievement for oil refiner Marathon Petroleum (MPC 0.19%). Even though oil prices have been on the rise, the company is benefiting from other factors in the oil market that are working clearly in U.S. refiners' favor.

Let's take a look at Marathon's market-crushing results this past quarter, and determine whether this might be the peak of a notoriously cyclical industry.

Marathon's Garryville refinery

Image source: Marathon Petroleum.

By the numbers

Metric Q2 2018 Q1 2018 Q2 2017
Revenue $22.44 billion $18.98 billion $18.35 billion
EBITDA $2.31 billion $1.04 billion $1.63 billion
Net income $1.05 billion $37 million $483 million
EPS $2.27 $0.08 $0.93

DATA SOURCE: MARATHON PETROLEUM EARNINGS RELEASE. EBITDA = EARNINGS BEFORE INTEREST, TAXES, DEPRECIATION, AND AMORTIZATION. EPS = EARNINGS PER SHARE.

It's strange. Typically, an oil refiner's margins get squeezed as oil prices increase, but this wasn't the case this past quarter, as Marathon's per-barrel refining margins were an impressive $15.40.

The reason for such an incredible performance in its refining segment has to do with the pricing of different types of crude oil. Because of a myriad of factors such as crude quality, transportation bottlenecks, and refinery capacity for various crude types, the price for domestic crude, West Texas Intermediate, is about $5.50 per barrel less than the international benchmark, Brent. On top of that, the price of heavy Canadian crude (the stuff from oil sands) is $25.25 per barrel less than WTI. So, when refiners have the ability to source and refine these harder-to-process crudes from Canada, they can generate incredible refining margins today.

Marathon just happens to have the ability to process a lot of these discounted crudes. In its press release, the company said that 55% of the crude it processed was sour crude, and that only 28% of its crude purchased was bought at WTI prices. Combine this favorable price environment for crude with Marathon running its facilities at 99.9% of nameplate production capacity, and you might as well consider its refineries ATMs these days.

Marathon's operating income by business segment for Q2 2017, Q1 2018, and Q2 2018. Shows large gain in refining and midstream.

Data source: Marathon Petroleum earnings release. Chart by author.

Keep in mind, too, that the company transferred a lot of its refining and marketing income to its midstream segment as part of a drop-down asset sale to its subsidiary MPLX (MPLX 1.26%) earlier in the year. According to management, $232 million in earnings was transferred to midstream as a result of this transaction.

Management continues to take all of that cash generated and plow it back into dividends and share repurchases. In the second quarter alone, management repurchased $885 million worth of shares on top of the $1.1 billion it spent in the prior quarter.

What management had to say

CEO Gary Heminger commented in his press-release statement on how the company has been able to manipulate these discrepancies in crude oil prices in its favor recently, and why he thinks these market conditions should continue:

Our ability to execute and capture opportunities in a volatile commodity environment demonstrated the power of our integrated business model and drove extraordinary results. Looking forward, we remain very optimistic about the prospects for our business given strong global demand, wider crude differentials, and the changing dynamics of the low-sulfur fuel market.

While he couldn't give too much detail until the deal is closed, he also mentioned some of the benefits his team sees from the pending merger with Andeavor (ANDV):

Our team has made significant progress toward completing the combination between MPC and Andeavor. There are tremendous benefits from merging these two businesses and we remain confident in our ability to generate incremental cash flow and create substantial long-term value for our shareholders.

MPC Chart

MPC data by YCharts.

As good as it gets?

From an earnings perspective, this was pretty much a perfect quarter for Marathon. It would take an idiot to not make money when refining margins are this wide, and Marathon has proven to be an efficient, low-cost refiner that is well-positioned to take advantage of these price discrepancies.

Thanks to the capacity constraints of moving crude oil around North America these days, it's likely that refining margins will remain favorable for at least a few more quarters, as Heminger said in the press release. As long as crude oil production is constrained by a lack of pipeline capacity (especially crude coming out of Canada), then these market conditions should hold for a while. Having favorable market conditions will certainly make it easier to fold Andeavor into the mix.

The 40% increase in share price over the past year is certainly something that might make investors balk, especially when you consider that it's going to be hard to achieve much better refining numbers than this. But Marathon can churn out a lot of cash; there's some upside potential from its Speedway and Midstream segments; the Andeavor acquisition looks incredibly likely; and the company can manufacture EPS growth through share repurchases. Considering all these factors, an investment in Marathon Petroleum today still looks like a decent value proposition.