The oil and gas sector is putting up its best performance in years, compared to the broader market, and many investors are now looking at picking up stocks in this sector. ExxonMobil (XOM -0.21%) is probably the first company to come to mind because of its name recognition.

Is it the best investment among its peers, though? Let's compare ExxonMobil with one of its largest peers, TotalEnergies (TTE 0.32%), to see which is the better oil stock to buy now. 

Much in common

To parse out the differences between the two integrated oil and gas companies can be pretty challenging. Aside from the obvious similarities of owning assets across the entire oil and gas value chain, the two also present some similar operating statistics and strategic goals.

One thing both ExxonMobil and TotalEnergies have done an exceptional job of recently is finding and developing top-shelf oil-producing assets. Both companies say that their respective breakeven price -- the oil price at which they can cover operating expenses, capital expenditures to maintain current operations, and pay dividends -- is about $40 per barrel.

Also, both companies' investment plans have a "better, not bigger" approach. Neither company is projecting large increases in oil and gas production over the next several years and will mostly replace declining production elsewhere. To green light a new development, though, the project needs to be breakeven at lower prices than that.

TotalEnergies, for example, says that an investment criterion for new developments is to be profitable at less than $30 per barrel after taxes. Similarly, ExxonMobil says that 90% of its capital investments should generate 10% returns at less than $35 per barrel.

Both companies are betting big on liquefied natural gas (LNG) as part of their medium- to longer-term futures. ExxonMobil has plans to develop LNG liquefaction and export terminals totaling 40 million tons per year (Mta) (it has about 20 Mta of liquefaction capacity today). TotalEnergies has about 10.5 Mta of export capacity coming online, but it has the largest LNG import business in Europe.

The devil is in the details

The largest differing factors for these two are on the chemical and refining side and their respective plans for a lower-carbon future. ExxonMobil's refining and petrochemical business is head-and-shoulders above the rest of its integrated oil and gas peers. Its immense presence in the Gulf of Mexico means it benefits from cheaper feedstocks than much of the rest of the world

The company is putting those assets to work manufacturing higher-margin products like lubricants and performance chemicals such as polyethylene. Its investments in refining and chemicals represent the most significant opportunity to grow earnings and cash flow that's less impacted by the price of commodities.  

Beyond oil and gas is another differentiating factor between the two companies. TotalEnergies is making big investments in electricity generation, especially with wind and solar.

It sees electric power as the third pillar of its business and expects to double its power generation capacity by 2025. TotalEnergies has been building expertise in renewable power and batteries for over a decade, and skills like offshore construction should lend itself well to offshore wind.

ExxonMobil's strategy leans more into biofuels, hydrogen, and carbon capture. Management thinks that these options will generate better returns in the long run because it can produce them using its existing petrochemical manufacturing facilities with upgrades and conversions, rather than decommissioning existing assets and building anew. 

It's hard to say which of these two strategies will emerge as the better one in the years to come, but both seem viable ways to generate returns. Both companies expect a vast majority of their capital spending to be going toward these low-carbon options, so how efficiently they can develop these strategies will be worth watching in the coming years.

What's it worth?

With several factors in common and seemingly realistic capital plans for the next couple of decades, both of these companies appear well-positioned to succeed in today's oil and gas markets and potentially beyond. In that vein, it's hard to say that one is demonstrably better than the other.

However, TotalEnergies appears to be the better value because of their respective stocks. Its shares are cheaper on a price-to-earnings and price-to-tangible-book-value basis. Also, it has a much higher dividend yield today.

XOM PE Ratio Chart

XOM PE Ratio data by YCharts.

There are some concerns that TotalEnergies could be subject to windfall taxes. Both the European Uniion and the French government have proposed the idea lately. The risk of lower earnings should that happen could be a mitigating factor.

Overall, both companies appear to be decent investments right now. Personally, I'm partial to TotalEnergies at this moment. It has the cheaper valuation and its growth projections aren't that much worse than ExxonMobil's to justify such a wide disparity in valuations. The one thing that gives me pause is Exxon's petrochemical business and its ability to generate strong returns in lower commodity-price environments.