ExxonMobil (XOM -0.09%) is a titan. As recently as 2007, it sat atop the Fortune 500 with a market cap of $426 million. Today, it sits outside the top 10 -- surpassed over the last 15 years by Apple (AAPL -0.57%)Microsoft (MSFT -1.84%), and Amazon (AMZN -1.14%), to name just a few. 

However, ExxonMobil is flipping the script this year. After years of underperforming technology-sector megacaps, Exxon is making up ground. Its 42% year-to-date gain is well ahead of Apple, Microsoft, and Amazon -- all of whom have seen their share prices retreat in 2022.

So is now the time to buy ExxonMobil? Here are two reasons to pull the trigger now and one reason to hesitate.

tiny oil barrels sitting on top of stacks of coins in front of a stock chart.

Image source: Getty Images.

The first reason to buy: ExxonMobil is awash in a sea of cash

With oil and gas prices soaring, ExxonMobil is generating cash hand over fist. The company recorded $36.1 billion of free cash flow (FCF) in 2021 -- its highest total since 2009. Even though its debt load ballooned during the pandemic, ExxonMobil prioritized shoring up its balance sheet last year by paying down $19.7 billion in debt, a reduction of 29%. This gives the company some breathing room, and it's likely to return more of its FCF to investors in the future.

The second reason to buy: A rock-solid dividend

There's one thing that ExxonMobil has done every year without fail, dating back 39 years: It raised its annual dividend. The company managed to extend the streak even during the pandemic. 

Cash dividends per common share of ExxonMobil from 2001 to 2020.

With revenues soaring and FCF approaching record highs, everyone expects ExxonMobil to continue the tradition. The only question is by how much. Furthermore, with the cash accumulating, a special dividend or an increase to the existing $10 billion share buyback program isn't unreasonable.

One reason to hesitate

If there's one thing to remember about energy stocks, it's that they're cyclical. Energy prices rise, and they fall, too. It's impossible to predict when this will happen, but it surely will, and it's a risk for ExxonMobil, just like any other energy company. Whether it is due to additional supply coming online from a country like Iran or Venezuela, changes to U.S. domestic energy policy that might incentivize more production, or something else entirely, oil prices will likely eventually move lower. And when they do, ExxonMobil's share price is likely to fall.

XOM Chart

XOM data by YCharts.

The above 20-year chart shows how the two move in tandem. During some stretches, the correlation approached 1.0, meaning that ExxonMobil's stock price moved in perfect harmony with oil prices. The company can somewhat insulate itself by keeping costs low, but ultimately, the stock price will suffer if oil prices take a nosedive.