If you are looking for dividend stocks that can keep paying you well for decades, don't shy away from the energy sector. Yes, the world is shifting toward cleaner alternatives. But oil and natural gas are not expected to go away anytime soon.

That means investors can keep collecting dividend checks from this vital part of the global energy landscape. Two attractive, though very different, options are ExxonMobil (XOM -0.60%) and Devon Energy (DVN -0.95%).

Big and boring

When it comes to the energy sector, you won't find many companies larger than Exxon and its huge $440 billion market value. Its business spans the entire energy landscape, from drilling for oil and natural gas all the way to refining it. That provides an inherent balance within the highly cyclical industry as downstream operations (refining) tend to benefit from the low oil prices that hurt the upstream (drilling) business. But there's more to the story here.

Exxon has long focused on supporting its business with a rock-solid balance sheet. This allows management to take on debt during the inevitable industry downturns so it can continue to invest in the business and support the dividend. To highlight this, the company's debt-to-equity ratio was around 0.2 in 2019, a reasonable level for any company.

When energy prices plunged in 2020, thanks to the economic closures used to slow the spread of the coronavirus, the debt-to-equity ratio roughly doubled. As energy markets recovered in 2022 the company paid down debt, bringing the debt-to-equity ratio back into the 0.2 range. The dividend survived what can only be described as a very difficult time for the world, let alone oil companies.

XOM Debt to Equity Ratio Chart

XOM Debt to Equity Ratio data by YCharts

This is basically the playbook that's allowed Exxon to increase its dividend annually for four decades and counting. Moreover, given its size and scale, when the time is right it will likely move more aggressively toward clean energy. Until that point, however, it will happily be serving the world's still huge demand for oil and natural gas and shareholders will keep collecting the checks it pays along the way.

Another approach

Exxon has specifically built its business to provide regular dividend checks. But there's another approach that some investors might find interesting -- and that's Devon Energy's variable dividend. The company, which is focused on onshore U.S. drilling, pays investors a modest regular dividend that is, in good periods, augmented by a dividend tied to the company's financial performance. So the dividend has a floor under it, but will go up and down along with energy prices.

Why might an investor want this? Basically, the dividends you collect will rise at the same time that the price of a vital energy commodity is rising. This can help to offset the hit from increasing gasoline prices and heating oil prices, among other things. You will have to be willing to accept that the dividend will be reduced at times, but if that's something you can wrap your head around, Devon Energy's variable dividend policy could actually be a powerful budgeting tool.

XOM Dividend Chart

XOM Dividend data by YCharts

The quarterly dividend started 2020 at $0.11 per share, rose to a peak of $1.55 per share in the third quarter of 2022, and, as of the first quarter of 2023, is at $0.89 per share. That's a wild ride over a very short period of time, which highlights that this is not a dividend stock for everyone. However, it is important to remember that inflation spiked during this period and that the fast-rising dividend payment would have offered a notable offset.

The variable policy is also worth considering from a different perspective. While it will go up and down over time, that should also make the payment more resilient as it will be lower when the energy sector is in the dumps. While that's not exactly a win for dividend investors, per se, it does suggest that you can count on the dividend being there over the long term.

Two ways to play

For investors who need dividend consistency, Exxon is the clear winner of this pair. And given its size and scale, there's no reason to believe that the company will fail to pivot toward cleaner alternatives at some point when it makes financial sense to do so.

Devon Energy is more of a direct play on energy and energy prices, but for investors who want to hedge their exposure to real-world energy costs (gasoline and heating oil, for example), its variable dividend policy could be a great fit.

Exxon's dividend yield is 3.3% today while Devon's chimes in at 10%, though that needs to be taken with a grain of variable dividend salt.