ExxonMobil (XOM 0.18%) and Kinder Morgan (KMI 1.26%) are among the largest oil and gas companies in the U.S. Yet both companies operate in different parts of the industry, and that makes a huge difference in how they make money. While one is directly exposed to commodity prices, the other is insulated from oil and gas price fluctuations to a large extent. So which stock is a better buy today -- ExxonMobil or Kinder Morgan? Let's find out.

Well-poised to deal with a downturn 

Lee Samaha (ExxonMobil): While Kinder Morgan is an attractive buy in its own right, I think ExxonMobil is a better buy. It gives you more exposure to energy prices, and that's no bad thing right now. 

Energy-infrastructure company Kinder Morgan has most of its contracts on a "take or pay" basis, meaning that customers have pre-agreed to take a certain amount of supply from Kinder Morgan or pay a penalty fee. As such, you could argue that it has relatively less exposure to oil & gas prices and more to the long-term volume demand for gas in North America. 

Meanwhile, there's no getting around the fact that ExxonMobil is a company whose overall earnings are oil-price led; more than 65% of its earnings after taxes came from upstream oil & gas activity in 2022.

XOM EBITDA (Quarterly) Chart

Data by YCharts.

First, it makes sense to have some exposure to energy prices in your portfolio since commodity-price inflation has been a major issue over the last couple of years. Second, the global economy is slowing, but the price of oil is still above $75 a barrel, in part because oil majors like ExxonMobil are much more disciplined in their capital-spending plans. In addition, OPEC members, including Saudi Arabia, Iraq, and Kuwait, have already demonstrated they are willing to cut production to support prices.

XOM Net Financial Debt (Quarterly) Chart

Data by YCharts.

Third, Wall Street analysts expect ExxonMobil to have just $3.8 billion in net debt at the end of 2023 compared to over $63 billion at the end of 2020 since it used its cash flows to pay down debt. Therefore, the oil major stands well placed to deal with any downturn and can use its cash-flow generation to invest into any downturn, including acquisitions of low-carbon solutions. All told, Exxon stands well placed to benefit from current conditions while investing in long-term growth.

The oil stock for all times

Neha Chamaria (Kinder Morgan): Kinder Morgan has the largest natural gas pipeline in the U.S. It spans almost 70,000 miles and moves nearly 40% of the total natural gas produced in the nation. The energy-infrastructure giant is also the largest independent transporter of refined products like diesel, gasoline, and jet fuel. Here's what that means: Kinder Morgan is a crucial link between the producers and consumers of energy, and it primarily provides contracted services. In fact, the bulk of its contracts is take-or-pay, or hedged, which means both volumes and prices are contractually fixed. That's a huge advantage to have in a commodity market as it minimizes volatility in cash flows. That also means Kinder Morgan can consistently use cash to reward shareholders in the form of dividends and share repurchases.

To be sure, Kinder Morgan cut its dividend in 2016, but it was a smart move in hindsight as it saved the company money to shore up its balance sheet and invest in growth. Kinder Morgan resumed annual dividend raises from 2018 onwards and is a much stronger company today. It ended the first quarter with a net debt-to-adjusted earnings before interest, taxes, depreciation, amortization (EBITDA) ratio of 4.1, below its target ratio of 4.5.

Meanwhile, Kinder Morgan's backlog also grew sequentially in the first quarter. Notably, while the bulk of its backlog is in natural gas, it also includes other low-carbon investments like renewable natural gas.

Kinder Morgan is currently generating boatloads of cash and yielding a solid 6.6% versus ExxonMobil's 3.2% yield. That also makes Kinder Morgan a compelling stock to buy, especially given the recent volatility in oil and gas prices.

The better oil stock to buy

For investors in oil and gas, there's never really a bad time to buy top-notch stocks like ExxonMobil and Kinder Morgan. The latter, though, hasn't found much love from the market in recent years especially after its dividend cut, but that seems unfair given Kinder Morgan's transformation. The stock, therefore, deserves better and could fare better going forward. Exxon stock, on the other hand, has run up over the past year as its cash flows zoomed, and while it remains an oil stalwart, any dip in oil prices could hurt investors in Exxon.