ExxonMobil (XOM -1.89%) delivered one of the best quarters in its history. The oil giant's profits soared to a record in the third quarter, even though oil prices cooled off in the period. That enabled the company to boost its dividend for the 40th straight year.

Here's a closer look at the quarter and whether now's a good time to buy the Dividend Aristocrat.

Another profit gusher for the oil giant

ExxonMobil's earnings rose to $19.7 billion in the third quarter of 2022. That eclipsed the $17.9 billion it reported in the second quarter and was nearly triple the $6.8 billion it earned in the third quarter of last year. The surging profit came even though oil prices and refining margins were lower than last quarter's. 

The energy giant offset those headwinds by capitalizing on higher natural gas prices, delivering record refining volumes, and keeping a tight lid on costs. While oil prices cooled off compared to the second quarter, they were still 40% higher than in the third quarter of 2021. Meanwhile, natural gas prices soared 172% year over year.

The other big highlight of the quarter was the integrated energy giant's refinery operations. Exxon processed 4.2 million barrels of crude oil per day, up 177,000 barrels per day from the second quarter. The company achieved its best-ever quarter for refining in North America and the highest global total since 2008.

Exxon also delivered strong quarterly oil and gas production. Its output in the Permian Basin hit a record of 560,000 barrels of oil equivalent per day (BOE/D). Meanwhile, its overall production reached 3.7 million BOE/D. That was up 50,000 from the second quarter after adjusting for asset sales, including its exit from Russia.   

Surging cash flow and capital returns

Exxon's free cash flow eclipsed earnings at an eye-popping $22 billion in the quarter. That gave it an enormous windfall to allocate on behalf of investors. The oil giant returned $8.7 billion to shareholders, including by paying $3.7 billion in dividends and repurchasing $4.5 billion of its shares. It has now repurchased $10.5 billion in stock this year. That kept it on track with its plan to repurchase up to $30 billion of its shares through the end of next year.

The oil giant's gushing cash flow gave it the confidence to increase its dividend starting with its December payment. It's raising its quarterly dividend by $0.03 per share to $0.91 per share. That marks the company's 40th straight year of increasing its dividend, keeping it in the elite group of Dividend Aristocrats.

Exxon also used some of its cash to pay down additional debt. It retired another $1.2 billion in the quarter, pushing its debt-to-capital ratio to 19%, just below the low end of its target range. Meanwhile, after the $30.5 billion in cash still sitting on its balance sheet is added in, Exxon's net leverage ratio is only 7%. 

Investing for now and the future

In addition to returning more cash to shareholders, Exxon is investing in traditional and new energy projects. It spent $5.7 billion in the third quarter, putting it on track to invest $21 billion to $24 billion this year. These investments enabled Exxon to grow its oil and gas production and refining capacity to meet the current energy demand. 

The energy giant is also investing money toward its goal of a net-zero-emissions future. It signed a landmark deal for the largest-of-its-kind commercial carbon capture and storage agreement with CF Industries to reduce the emissions of its manufacturing facility in Louisiana. Meanwhile, Exxon's majority-owned Canadian affiliate, Imperial Oil, signed a long-term contract with Air Products to buy lower-carbon hydrogen that it will use to produce renewable diesel. These agreements will help Exxon achieve its goal of producing lower-carbon fuels, thereby reducing emissions.

The future looks bright for Exxon

The global energy landscape has changed dramatically this year. Oil and gas prices have soared due to higher demand and tight supplies driven by years of underinvestment and the impact of Russia's invasion of Ukraine. Because of that, energy security has moved to the forefront, which could keep prices elevated for some time.

Meanwhile, Exxon has proven it can produce record profits even if prices moderate a bit. Because of that, it's looking like a highly attractive investment these days, especially since this market environment should allow Exxon to continue generating lots of cash. That would give it the fuel to keep growing its dividend, which currently yields over 3%. These features make it good oil stock to buy for those seeking a lucrative income stream with the upside potential of oil prices and energy transition initiatives.