When Arvind Krishna took over the CEO role at IBM (IBM -0.12%) in 2020, he began a reinvention of the storied tech giant, transitioning its focus to cloud computing and artificial intelligence (AI). With the transition completed, this new IBM saw its share price jump on Sept. 20 after it garnered an outperform rating from investment bank RBC Capital analyst Matthew Swanson.

Given the company's shift to the red-hot cloud computing and AI sectors, and the recent outperform rating, does it make sense to invest in Big Blue? Some compelling reasons justify buying shares. On the other hand, IBM's stock price has increased over recent months, and currently hovers near its 52-week high.

As Wall Street legend Warren Buffett has written, "For the investor, a too-high purchase price for the stock of an excellent company can undo the effects of a subsequent decade of favorable business developments." So keeping this investing guru's advice in mind, let's dig into the company to determine if IBM is a worthwhile long-term investment.

IBM's technology offerings

One of the main factors making IBM a good investment is its focus on cloud computing and AI. The company specializes in the hybrid cloud market, where customers use a mix of dedicated IT infrastructure for increased privacy and shared infrastructure to reduce costs.

IBM is among the six largest cloud computing companies in terms of market share. It benefits from the rapidly expanding hybrid cloud market, which was valued at $85 billion in 2021, and is forecast to increase to $262 billion by 2027.

IBM also possesses deep expertise in the AI field thanks to decades of experience. Its AI technology made history when it beat the reigning world chess champion in 1997, and IBM's latest AI solution, called Watsonx, launched in July. This technology was quickly adopted by over 150 businesses, including NASA. At Wimbledon, Watsonx was used to generate tennis commentary.

Big Blue is also developing quantum computers, which are key to creating more potent forms of AI. Quantum computers can process enormous amounts of data quickly and IBM is considered the leader in the quantum computing space.

IBM's financial performance

The company's technologies have allowed IBM to grow revenue over the last three years. In Q2, which ended at the end of June, revenue rose 11% in its Red Hat division, which forms the heart of its cloud computing business, and 10% in its data and AI segment. Both fall under IBM's software business unit, which generated $6.6 billion in Q2 revenue.

Customer adoption of IBM technology also drives revenue growth in its consulting division, which helps clients incorporate the company's technical solutions. This segment increased Q2 sales by 4% to $5 billion. Together, IBM's software and consulting divisions contributed 75% of Q2's $15.5 billion in revenue.

The company also generates reliable free cash flow (FCF), which measures the cash available for IBM to use for things like investing in its business, paying debt, and funding dividends. The company exited Q2 with $2.1 billion in FCF, and expects to reach $10.5 billion for the year, which would be more than a $1 billion increase from 2022.

Its free cash flow allows IBM to offer a robust dividend, currently yielding over 4%. Big Blue's dividend streak is impressive, having paid dividends since 1916 with 28 consecutive years of increases.

To buy or not to buy IBM?

Despite growth in its software and consulting divisions, IBM's $15.5 billion in Q2 revenue was down 0.4% compared to the prior-year quarter. This was due to a sales decline in its infrastructure segment, which sells hardware such as computer servers.

Even so, IBM estimates 2023 year-over-year revenue growth of at least 3% on a constant-currency basis. In fact, Q2 year-over-year revenue was up 0.4% when adjusting for currency fluctuations.

However, keeping in mind Buffett's advice mentioned above, one area that may give investors pause is IBM's share price, which is near a 52-week high.  However, RBC Capital analyst Matthew Swanson set a price target of $188, up 30% from the current price.

So let's look at IBM's forward price-to-earnings ratio, which factors in a consensus price estimate from all analysts, and compare it to those of cloud competitors Microsoft and Oracle.

Microsoft is a much larger cloud computing rival, with a 22% share of the market versus IBM's 3%. Oracle is a smaller player with a 2% market share. Yet IBM's forward P/E is the lowest, suggesting the stock may be undervalued compared to those of its competitors.

IBM PE Ratio (Forward) Chart

Data by YCharts.

That said, analyst price targets average $147 for IBM shares, which is about where the stock is at as of this writing. So at its current price, IBM stock seems unlikely to appreciate substantially.

Still, its high-yield dividend provides the potential for years of passive income. And given its success in the cloud computing and AI markets and solid FCF generation, IBM looks like a good income stock over the long term.