What happened

Shares of oil stock bellwether ExxonMobil (XOM 0.02%) hit a gusher on Friday, rising 4.3% through noon ET after reporting a mixed quarter in which sales greatly underperformed expectations, but profits exceeded them just as greatly.

Heading into its fiscal second-quarter 2022 report, analysts had predicted Exxon would earn $3.74 per share on sales of $132.7 billion. It missed that latter projection, reporting just $115.7 billion in sales, but it crushed the former projection, earning $4.14 per share.  

So what

Increased production, near-record high oil prices and margins, and aggressive cost controls all helped ExxonMobil deliver its most profitable quarter ever, according to data from S&P Global Market Intelligence. Earnings for the second quarter of 2022 grew more than 280% year over year. At $17.85 billion in net income, Exxon eclipsed its previous record ($15.91 billion in the second quarter of 2012) by 12%.  

And while sales missed analyst expectations, they still increased 71% year over year.

Free cash flow for the quarter -- while not quite as robust as earnings calculated according to generally accepted accounting principles (GAAP) -- was nonetheless quite good. Subtracting $3.8 billion in capital spending from $20 billion in operating cash flow, Exxon generated nearly $16.2 billion in cash profit during the quarter.

Now what

This means that, so far this year, Exxon has generated positive free cash flow of $27.1 billion, which is actually ahead of the company's reported net income of $23.1 billion for the first half.

It's hard to overemphasize how remarkable it is for an oil company to be generating more cash profit than it reports as accounting profit. The situation is almost always the reverse with oil companies, one of the reasons I pretty much never buy oil stocks.

And yes, in this particular case it's probably just a fluke, and a function of oil prices shooting up past $100 a barrel in response to economies reviving after the depths of the pandemic and Russian oil being boycotted over the war in Ukraine. There's no guarantee the situation will last.

That being said, even I have to admit: With analysts forecasting that ExxonMobil will generate nearly $52 billion in positive free cash flow this year, and its stock at 7.8x free cash flow and paying a 3.8% dividend yield, it looks pretty darn enticing.