Investing in oil stocks used to be a no-brainer. A growing world population and increasingly globalized economy requires vast amounts of fossil fuels to heat homes, ship goods across the ocean, and fuel jet-setters around the world.

Business is a lot less certain for participants in the oil and gas industry these days. A global oversupply of crude oil and natural gas, combined with fluctuations in demand, have caused the energy sector to significantly underperform the broader stock market in recent years.

Caucasian woman in white hard hat stands in from of oil equipment
Source: Getty Images

Major oil price crashes in 2014 and 2020 rocked the entire industry. Meanwhile, renewable energy continues to get cheaper and more widely used while governments are increasingly pushing businesses to lower their carbon emissions.

Even so, an investment in oil can still offer value. Here's a look at how to invest in the oil market. 

1. Keep an eye on oil prices

1. Keep an eye on oil prices

One of the biggest factors governing the oil industry is, of course, the price of crude oil. When crude oil prices rise, oil stock prices tend to go up, too. When crude oil prices tumble, so will the prices of most oil and gas stocks.

The reasoning is pretty simple. The costs of getting oil out of the ground, transporting it, storing it, and refining it into fuel and other products are essentially fixed. When a barrel of crude oil can be sold for more than the sum of those costs, oil companies make money. But when oil is trading for less than the sum of those costs, at least some of those companies lose money.

It's generally better to buy oil stocks when oil prices are low and expected to rise rather than when they are already high. However, the price of oil affects different types of oil stocks in different ways. Checking out the recent price of oil is a critical first step in oil investing.

2. Know the differences among oil stocks

2. Know the differences among oil stocks

Not all oil stocks are created equal. In fact, "oil companies" may operate in entirely different parts of the industry. It's important to know what kind of oil company you're investing in before you buy.

  • Upstream oil and gas companies, also known as exploration and production (E&P) companies, explore locations around the world for oil, and, once they discover it, drill wells to extract it from below the ground or seafloor. E&Ps are the most susceptible to fluctuations in the price of oil. The largest E&P in the U.S. is ConocoPhillips (COP -0.41%).
  • Midstream companies transport, process, and store crude oil, natural gas, natural gas liquids (NGLs), and refined petroleum products such as lubricants. Midstream companies often do business using fixed-rate, long-term, or take-or-pay contracts, so their profitability is less affected by oil price fluctuations. The master limited partnership Enterprise Products Partners (EPD 0.18%) is a major midstream company. Berkshire Hathaway (BRK.A 0.64%) (BRK.B 0.54%), which has a number of investments in the energy sector, has a large midstream business.
  • Downstream companies refine crude oil into other products like fuel or petrochemicals or sell refined products to consumers. Some do both. Gas station operators and refinery operators are two types of downstream companies. The price of oil affects refineries' profitability because they make their money on the "crack spread," meaning the difference between the price of oil and the price of refined products. As such, downstream stocks often take a hit when oil prices fall since lower demand for refined products can weigh on crude prices. Phillips 66 (PSX -2.51%) is a major downstream company. 
  • Integrated companies operate in more than one of the above segments of the supply chain. The so-called "integrated majors," sometimes referred to as "Big Oil," have large upstream and downstream operations, with some midstream capability as well. ExxonMobil (XOM -0.09%) and Chevron (CVX 0.75%) are two such oil majors.
  • Oilfield services companies provide equipment, operational support, and services to upstream companies. These can include onshore or offshore drilling rigs, drill bits, subsea robots, or pressure valves. When oil prices are low, upstream companies often try to cut their services costs, which hurts oilfield services companies.
  • Oil exchanged-traded funds (oil ETFs) allow you to invest in an entire subsector of the oil industry at once, as opposed to any single oil company. ETFs are baskets of stocks that are traded much like ordinary stocks. One noteworthy oil ETF is the SPDR Oil and Gas Exploration & Production ETF (XOP), which tracks the upstream subsector as a whole.

Related topics

3. Focus on the dividend

3. Focus on the dividend

Oil company struggles don't seem likely to disappear anytime soon. Even if they go through a period of short-term calm, such as the period between 2017 and 2019, global events outside their control can quickly set them back on their heels. For long-term investors who don't want to have to constantly monitor the oil markets, dividend investing is probably the best choice here. 

Integrated oil companies ExxonMobil and Chevron have been increasing their dividends annually for decades, with management prioritizing dividend preservation. Likewise, many midstream companies -- especially those with master limited partnership (MLP) structures -- offer high dividend yields and reliable payouts. 

When you're evaluating an oil company, don't just look at the dividend yield (also known as the dividend-to-share price ratio). Compare the yield to the company's free cash flow. The best companies can pay their total dividend obligations and fund their capital expenses using free cash flow, with some money left over.

Also look for a strong investment-grade balance sheet since that provides additional financial flexibility (more and better access to capital) and increases the probability that the company can maintain its dividend during the next industry downturn.

Dividend Yield

A financial metric indicating annual dividend income relative to stock price, expressed as a percentage.

4. Know when to invest in oil stocks

4. Know when to invest in oil stocks

Any time is a good time to buy a great company.

It's important for investors to be aware of the oil sector's volatility. It's best to focus on companies built to weather the sector's inevitable downturns. That means focusing on companies with relative immunity to price fluctuations, such as E&Ps with ultra-low production costs and integrated oil giants. Midstream companies, with their contracts, should also be able to deal with adverse market conditions more easily than others in the supply chain.

Another way to invest in the oil patch is to focus on using it to generate dividend income. Many companies in the sector pay dividends with attractively high yields.

However, given the sector's overall volatility, investors need to choose their oil-fueled dividend stocks carefully, focusing on those with the balance sheet strength and cash flow durability to deliver dependable income streams.

Lou Whiteman has positions in Berkshire Hathaway. The Motley Fool has positions in and recommends Berkshire Hathaway. The Motley Fool recommends Chevron and Enterprise Products Partners. The Motley Fool has a disclosure policy.