Some of the biggest companies in the world are oil and gas companies, including ExxonMobil (NYSE:XOM) and Royal Dutch Shell (NYSE:RDS.A) (NYSE:RDS.B). But just because you've heard of a stock or a company doesn't necessarily mean it's a good investment.

The oil and gas industry has experienced significant volatility over the past several years, leaving energy investors wondering whether oil companies -- even top oil companies -- are smart investments. Let's dig in to better understand whether oil and gas stocks are good long-term investments that deserve a place in your portfolio.

A frowning man holds an oil droplet in one hand and a stack of paper currency in the other.

Image source: Getty Images.

Is it safe to invest in oil and gas?

Petroleum-based fuels and natural gas remain in demand in part because they usually have cost advantages over other heating and transportation fuels, and they also have a massive infrastructure advantage over emerging, clean fuel sources. But investing in the stock of any company confers risk, and the oil and gas industry has some additional negative qualities that increase the risk of investing:

  • Cyclicality: The oil and gas sector tends to be cyclical, meaning that investors are likely to experience alternating yet unpredictable booms and busts.
  • Volatility: At the same time oil and gas companies are impacted by economic cyclicality, they are also significantly affected by other factors beyond their control. The prices of oil and gas are a major factor in the valuations of oil and gas stocks. When oil prices are low, the market tends to punish these stocks. In March 2020, when Saudi Arabia and Russia began an oil price war that caused worldwide oil prices to plummet, stock prices in the oil and gas sector also collapsed, for healthy and troubled companies alike.
  • Uncertainty: Oil and gas exploration can go very right or very wrong in many unpredictable ways. A company first buys the rights to develop a piece of land or an offshore exploration block, then it conducts tests to determine the presence of oil or gas deposits. If they're found, the company drills test wells to determine the quality of the deposits and then drills production wells and connects the associated infrastructure, all before earning any money. The inherent uncertainty of exploration can result in large losses from investments that don't pan out.
  • Safety concerns: Oil and gas are both flammable and toxic, and the pipelines that transport them stretch for hundreds or thousands of miles. The machinery that extracts oil and gas from the ground or beneath the seafloor is both heavy and complex. Tragedies can occur such as the 2010 BP (NYSE:BP) Deepwater Horizon oil spill in the Gulf of Mexico -- for which the company is still paying -- and the home explosion in Colorado in 2017 that was indirectly caused by Anadarko Petroleum.

Given all these factors, oil and gas is a comparatively risky sector for investing. Within the sector, however, some companies are safer than others.

Which oil and gas stocks are the safest?

As with many other industries, the larger the company, the less risky its stock is likely to be. The so-called "oil supermajors" -- ExxonMobil, Royal Dutch Shell, BP, Chevron (NYSE:CVX), and the French Total SA (NYSE:TTE) -- each with global operations and annual revenues of more than $100 billion, aren't going bankrupt anytime soon. Neither are the large exploration and production (E&P) companies such as ConocoPhillips (NYSE:COP), big pipeline companies such as Kinder Morgan (NYSE:KMI), top refiners such as Phillips 66 (NYSE:PSX), or major oil-field services companies, including Schlumberger (NYSE:SLB).  

Market capitalization matters in this sector because cyclical price declines can drive smaller oil and gas companies into bankruptcy. After the price of crude oil crashed in 2014, many offshore rig operators ceased operating or declared bankruptcy because of low demand for their services. In March 2020, as demand for fuel sharply declined due to the coronavirus pandemic, several smaller E&P companies filed for bankruptcy, including Whiting Petroleum (NYSE:WLL) and Chesapeake Energy (OTC:CHKA.Q).

Large oil and gas companies tend to be better positioned, at least when it comes to not going out of business. But just because a company is still in business doesn't mean that its stock will perform well in the future.

Benefits of investing in oil and gas

The benefits of investing in oil and gas stocks are that they can produce significant capital gains from share price appreciation and attractive dividend income during periods of high oil and gas prices. As crude oil prices rise, oil companies tend to generate increasing cash flows. That gives them more money to drill additional wells to grow their output, repay debt, repurchase stock, and pay dividends, all of which can create value for shareholders. Of note, dividend payments in the sector tend to be higher than average because of the amount of cash oil companies can produce during good times. That often makes the sector attractive to investors seeking high dividend yields.

Because of the industry's upside potential during periods of economic growth, oil and gas stocks can be smart investments if timed right. While The Motley Fool does not advocate for attempting to time the market, oil and gas investments made just as the economy transitions from a recession to its next expansion phase can turn out to be smart investments since investors can benefit from rising share prices and dividends.

Oil barrels stacked high outside a refinery.

Image source: Getty Images.

Is crude oil a good investment?

While oil and gas stocks can be smart if timed right -- an already risky and dubious proposition -- crude oil is often a poor investment. Investors don't have any convenient means by which to invest directly in crude oil since most exchange-traded funds (ETFs) focused on crude oil only track the price of oil using oil futures contracts. These ETFs are obligated to routinely purchase new oil futures contracts as the existing ones near expiration, and the transaction fees, along with the ETF's expense ratio, eat into the funds' returns.

The chart below demonstrates the significant underperformance of the leading crude oil ETF, the United States Oil Fund (NYSEMKT:USO), versus the main U.S. oil benchmark, which is the West Texas Intermediate (WTI) crude oil price:

USO Chart

USO data by YCharts.

Given the ETF's significant underperformance relative to the price of crude oil, and that investors don't have a better option, crude oil itself is generally not a smart investment.

Should you invest in oil and gas?

Oil and gas companies play an important role in helping to fuel the global economy. While the world is slowly pivoting to cleaner, renewable energy sources, the modern economy will continue to require fossil fuels for years to come. But trying to time the market, whether for oil and gas or for any investment, is risky at best. Add that to the other sector-specific risks, and you may decide to avoid the oil and gas industry altogether.