Oil prices can be excruciatingly volatile. In 2020, oil prices cratered as the pandemic ground the global economy to a halt. Today, crude oil is approaching triple digits as the economy rebounds.

This volatility can make it hard for investors to decide what type of oil stock is better, an oil producer like ExxonMobil (XOM 1.26%) or an oil infrastructure company like Enbridge (ENB 1.10%). Here's a closer look at which type of investors might be suited for each stock.

A person working near an oil pump with the sun setting in the background.

Image source: Getty Images.

ExxonMobil: Riding on strong oil prices

Rekha Khandelwal (ExxonMobil): If you want to invest in oil stocks, ExxonMobil is probably one of the best options. ExxonMobil stock gives you exposure to oil, but it isn't as vulnerable as some of the smaller upstream operators. So, you get to enjoy the upside, and can still sit relaxed when oil prices fall because you know that you've invested in a solid company with huge and globally diversified operations and a long operating history.

Enbridge stock offers you a solid dividend yield that's also backed by strong fee-based cash flows. The company's earnings aren't vulnerable to oil prices. On the flip side, however, it doesn't offer your portfolio the exposure to oil prices that you could be looking for.

Fundamental Chart Chart

Fundamental Chart data by YCharts

In the last five years, the average correlation between ExxonMobil's stock price and the WTI crude oil price was around 0.56. By comparison, the average correlation between Enbridge stock and crude oil was 0.43. The correlation coefficient shows the strength of the relationship between two variables. A larger value shows a stronger relationship. In simple words, ExxonMobil stock will likely rise or fall more with oil prices, as compared to Enbridge. That's because ExxonMobil's earnings are more tied to oil prices than that of Enbridge.

In the fourth quarter, ExxonMobil reported adjusted earnings of $2.05 per share, up from $0.03 per share in the fourth quarter of 2020. The earnings growth was primarily driven by stronger oil prices. The WTI crude oil prices averaged $77.3 per barrel in Q4 2021 compared to $42.5 per barrel in the fourth quarter of 2020. 

Further, ExxonMobil is focused on reducing its debt and keeping capital expenditures under control. In 2021, the company paid down $20 billion of debt. It has also started a $10 billion share repurchase program, which it expects to complete in one to two years. 

In the last year, ExxonMobil stock is up 56% compared to nearly 20% rise of Enbridge stock. Overall, ExxonMobil stock is a better option to gain exposure to oil. Bear in mind, though, that for the same reason, it will also likely be more volatile than Enbridge.

Steady growth no matter the price of oil

Matt DiLallo (Enbridge): Enbridge offers a lower risk way to invest in the oil market. The company operates the world's largest crude oil transportation system, moving about 30% of all the oil produced in North America through its network of pipelines and terminals. It makes money by charging oil companies fees to utilize its infrastructure. Because of that, Enbridge generates relatively steady cash flow in almost any oil market environment. 

That gives Enbridge the funds to pay a hefty dividend -- it currently yields more than 6.6% -- and invest in expanding its energy infrastructure. The company has a multi-billion-dollar backlog of expansion projects that should fuel 5% to 7% annual cash flow per share growth through at least 2024. That should give Enbridge the fuel to continue growing its dividend, something it has done for the last 27 years.

Enbridge also boasts of having a rock-solid balance sheet. That gives it the financial flexibility to take advantage of opportunities to expand its infrastructure portfolio. For example, Enbridge paid $3 billion last year to buy an oil export terminal along the U.S. Gulf Coast. Enbridge is also investing in projects to reduce oil-related emissions, including adding solar panels at its recently acquired export terminal.   

While Enbridge's lower-risk business model might limit its upside in a strong oil market, its steady growth has enabled it to outperform Exxon over the last three-, five-, and 10-year periods. 

The better oil stock depends on your view of oil prices

If you want direct exposure to the upside (and downside) of oil prices, Exxon is the better oil stock. It should outperform Enbridge in a rising oil price environment. However, if you're seeking an oil stock that can deliver steady growth over the long-term no matter the market condition, Enbridge is the way to go.