All of a sudden, blue-chip stock International Business Machines (IBM 0.13%) is looking like a buy again.

According to the latest data from S&P Global Market Intelligence, only six out of 16 analysts polled think IBM stock is a "buy," or likely to "outperform" the S&P 500 over the next year. (Most of the rest think IBM will just pace the S&P's gains.) But after reviewing IBM's Q3 earnings release Wednesday night, it kind of looks like they're wrong about that -- and that the bulls have the better of this argument.

IBM by the numbers

Reporting earnings for fiscal Q3 2022 after close of trading Wednesday, IBM noted that revenue grew 6% year-over-year to $14.1 billion, and would have grown 15% but for unfavorable currency exchange rate fluctuations. IBM's consulting revenue grew 5%, its software sales were up 7%, and infrastructure revenue saw sales surge 15% despite currency rate headwinds. 

The company reported a GAAP loss for the quarter -- and it was a big one, $3.2 billion in total, or $3.55 per share. The number that Wall Street analysts focus on, however, IBM's pro forma profit, was a more palatable non-GAAP profit of $1.7 billion, or $1.81 per share -- bigger than the $1.77 per share non-GAAP profit that Wall Street had predicted.

And that's why, despite losing $3.2 billion for the quarter, Wall Street is considering this an "earnings beat" for IBM.

Cash is king

So which number should you, as an investor, be focusing on? The lousy GAAP number, or the better non-GAAP one? Honestly, I'd not get distracted by either of these calculations of "accounting profits," and focus instead on something that's a bit more tangible: free cash flow, which counts the actual cash profits being generated by the business.

In Q3, IBM says it generated operating cash flow of $1.9 billion -- and, after deducting capital expenditures and receivables from the financing unit, free cash flow of $0.8 billion. (So not as bad as the GAAP profits number, but not as good as the non-GAAP number.)

So far this year, IBM says its free cash flow for the first three quarters of the year has topped $4.1 billion. But here's the best part: Assuming that revenue continues to grow at faster than "mid-single-digits," says IBM -- as it would have in Q3, but for the currency rate difficulties -- IBM expects to end fiscal 2022 with total free cash flow of $10 billion.

Valuing IBM stock

So what does this number mean for investors? Simply put, it means that IBM stock is cheap.

Consider: At its current market capitalization of $110 billion and change, $10 billion in free cash flow works out to an 11-times-free cash flow valuation on IBM as a whole. That's likely to be a bargain price if IBM continues to grow revenue at double-digit rates (currency exchange rates permitting).

But even if it doesn't, and even if IBM only grows its profits at the 8.1% long-term growth rate that Wall Street is expecting, 11x FCF isn't an especially high valuation or the stock. Indeed, IBM looks especially cheap when you factor in the company's strong dividend yield of 5.4%. 

8.1% from earnings growth, plus 5.4% from dividend payments, works out to a powerful 14% total return for investors from IBM stock going forward, and divided into the stock's price-to-free cash flow ratio of 11, it gives a total return ratio of less than 0.8x for IBM stock.

When you consider that famed value investor John Neff famously targeted stocks trading for total return ratios below 1.0 when leading the Vanguard Windsor Fund, buying IBM stock today at $122 and change gives you a chance to own a world-class stock for 20% below what Neff would consider a fair price.

To me, that sounds like a bargain worth taking.