If you are looking at the energy sector, both ExxonMobil (XOM 0.02%) and Royal Dutch Shell (RDS.B) will be stocks that pop up on your radar screen. They have some similarities and some very big differences. But the real question is: Which is the better buy? Here are some key points to consider that will help you make that call.

1. Size

Exxon has a market cap of $290 billion. Royal Dutch Shell's market cap is $225 billion. Exxon is larger, but when it comes to giant companies like this, $75 billion is really just mincing words. They are both huge and, equally important, globally diverse companies.

Two oil rigs with the sun setting in the background.

Image source: Getty Images.

Each company has assets in the upstream (drilling), midstream (pipelines), and downstream (refining and chemicals) spaces. And both have material exposure to oil and natural gas, with the latter being a notable focus for each in the future. Their operations, meanwhile, span the globe. Either one would provide you with broad exposure to the oil and gas sector (more on diversification below).

2. Dividends

Exxon's yield is around 4.8% today. Shell's yield is 6.6%. For those looking to maximize their current income, Shell clearly has the edge, but don't jump just yet. Exxon has increased its dividend for 37 consecutive years, including right through the deep oil downturn that took place in mid 2014. That's an important period, because many of its peers ended up either cutting dividends or holding them steady. Shell held the line.

In fact, Shell actually started paying a scrip dividend, offering shares instead of cash, during that period in an attempt to preserve cash. It has ended that program at this point, but the dividend still hasn't started to head higher; it's been stuck at the same level since the start of 2014. Although Exxon's dividend has only increased in the mid-single digits on an annualized basis over the past five years, that's enough to beat inflation and to keep shareholders' spending power growing. For investors seeking dividend growth, Exxon is a far better choice.

3. Debt

One of the key reasons Shell hasn't been raising its dividend is its balance sheet. It wouldn't be fair to characterize Shell as financially weak. It is not. However, one big difference between these two oil and gas giants is the way they use debt. Shell tends to carry a lot more long-term debt balanced by a significant amount of cash. That provides it the flexibility it needs to operate, but that clearly means that energy downturns can lead to a more cautious approach when it comes to rewarding shareholders with dividend increases.

RDS.B Financial Debt to Equity (Quarterly) Chart

RDS.B Financial Debt to Equity (Quarterly) data by YCharts.

To put some numbers on this, Exxon's debt-to-equity ratio is a very modest 0.14 (low for any company), while Shell's is 0.33. It's important to highlight that Shell's ratio isn't unreasonable, or even high for that matter, but it is higher than Exxon's. In an industry that relies on a volatile commodity to support its top and bottom lines, Exxon's approach will likely appease more conservative investors. Simply put, Exxon has more flexibility to use debt during oil downturns to maintain its capital spending plans while still supporting dividend growth. That said, Shell has around $18 billion in cash compared to Exxon's roughly $4 billion. Holding more cash balances out the risk equation to some degree, but that extra cash hasn't been enough to keep Shell's dividend growing.

4. Carbon

Focused on oil and natural gas, both Exxon and Shell are clearly in the sights of environmentalists looking to reduce global carbon emissions. And neither of these companies has shied away from the topic. But they have chosen vastly different paths when it comes to dealing with the issue.

Exxon has basically doubled down on oil and natural gas, ramping up its exploration budget. The reason is that these fuels are depleting assets -- once you pull a barrel of oil out of the ground, it is gone for good. If you want to keep drilling, you need to keep finding more oil. Management stresses that even in the most aggressive scenario of conservation out there today, the world will still need lots of new oil resources. That said, it isn't ignoring the need for cleaner energy. Exxon has focused on using algae to make an oil alternative. Algae would allow Exxon to keep using its core infrastructure.

Shell has looked at the future and embraced electricity. It is spending billions to buy and invest in solar power, wind power, electric auto charging stations, and many other things. Its hope is to eventually create an electric business that can stand toe to toe with its energy operations. If you are worried about global warming, Shell is making a more aggressive shift with its business.

5. Valuation

Energy stocks like Exxon and Shell are out of favor today, so both look relatively cheap right now. For example, both offer dividend yields toward the high end of their historical ranges. That said, Shell's price-to-tangible book value ratio of 1.35 times has been heading higher lately and is up notably from where it was at the start of the decade. Exxon's price-to-tangible book value, at 1.6 times, has been falling, now sitting at its lowest level since the 1990s. While Exxon looks more expensive here on an absolute basis, the difference in the trends is notable.

Exxon, which is considered one of the best-run oil majors, appears to be losing the premium that it was once afforded. Little has actually changed at the company, though, which remains extremely well run even if it appears out of step with the market today. There's a good chance that investors are being overly pessimistic. Shell's fortunes, meanwhile, have definitely improved since the mid-2014 downturn, when there was legitimate concern that it would be forced to cut its dividend (the yield rose to over 10% at one point). At the end of the day, both appear historically cheap, with Shell, perhaps, a little cheaper.

Which one wins?

When you look at some of the high points, there's really no clear winner here. Investors could probably pick either of these energy giants and be comfortable with the choice. Still, more conservative types will probably prefer Exxon and its slow-and-steady approach. That includes its choice to maintain a rock solid balance sheet and the ongoing commitment to returning value to shareholders via a steadily rising dividend. Those seeking to maximize current income, meanwhile, wouldn't be making a bad choice if they picked Shell. Just go in knowing that dividend growth isn't as high a priority, and that will expose you to the risk that inflation reduces your buying power over time.