Image source: Getty Images.

IBM (IBM -0.72%) and Alphabet (GOOG 0.52%) (GOOGL 0.46%), are among the most powerful and influential tech companies around. However, they offer different characteristics for investors in terms of quality and valuation. Which one is a better purchase right now?

IBM for dividend investors and bargain hunters

IBM is going through a transition. The company is moving away from low-margin businesses in order to better focus on areas with superior potential for growth and profitability. Segments such as transaction processing software, consulting, integration software, and hardware have been quite weak over the past several years due to evolving industry trends, and this is hurting overall financial performance. IBM has produced stagnant or even declining revenue in the last five years.

IBM Revenue (TTM) Chart

IBM Revenue (TTM) data by YCharts.

The company is investing for growth in a group of businesses that management has identified as "strategic imperatives," which includes cloud, analytics, security, social, and mobile technologies. Performance from this division is quite encouraging; revenue grew 12% year over year during the second quarter, accounting for 38% of company-level revenue on an annual basis. However, IBM still registered a 2.7% decline in total revenue during the period, so growing sales from strategic imperatives is not enough to compensate for declining revenue in other divisions. 

Falling revenue is a major reason for concern among investors in IBM, but the good news is that the company's problems are already incorporated into its valuation to a good degree. IBM stock trades at a price-to-earnings ratio of 12.2 over the last year. As a reference, the average company in the S&P 500 trades at a considerably higher price-to-earnings ratio of 19.3. 

IBM is a particularly attractive stock for dividend investors. The company is paying a respectable dividend yield of 3.5%, and it has a pristine track-record of dividend payments over the years. IBM has paid uninterrupted dividends since 1916, and it has increased dividends in the last 21 years in a row.

A great business for a reasonable price

The company formerly known as Google changed its name and corporate structure in 2015 to better reflect its current business model and strategy. Alphabet is now a group of businesses, of which Google is the most important contributor, while the "Other Bets" segment includes several different projects in areas such as home connectivity, self-driving cars, outer space exploration, high-speed internet, and healthcare technologies, among several others.

Google is the undisputed king in online advertising. The other bets segment includes multiple businesses with limited commercial viability in the short term, however, when seen as a diversified portfolio of projects in highly disruptive technologies, they offer intriguing potential over the years and even decades ahead.

Financial performance doesn't leave much to be desired, Alphabet reported $20.26 billion in revenue during the first quarter of 2016, an annual increase of 17% in U.S. dollars and jumping by 23% in constant currency terms. The business model is also remarkably profitable -- adjusted operating margin was 34% of sales during the quarter. 

All this comes for a reasonable price tag. Wall Street analysts are on average expecting Alphabet to make $39.56 in earnings per share during 2017. Based in these forecasts, the stock is trading at a forward price-to-earnings ratio of 18.6, roughly in line with the S&P 500.

Which one shoud you buy?

IBM pays an attractive dividend yield, and the company has an impressive trajectory of dividend payments over the years. Alphabet pays no dividends whatsoever, so Big Blue is clearly the best play for income-oriented investors. In addition, IBM is priced at attractively low valuation levels due to disappointing sales trends. If IBM manages to drive improving performance in the coming years, then the stock is offering substantial room for gains from currently depressed valuation levels.

However, Alphabet is far superior to IBM when it comes to business quality and financial performance. Alphabet stock is not as cheap as IBM, but valuation is fairly reasonable for such a first-class business. Buying Alphabet right now means investing in one of the best companies in the tech industry for a modest entry price, and this can lead to attractive returns in the years ahead.

IBM stock could deliver big gains if management can jump-start sales growth in the coming years. However, Alphabet looks like a sounder choice when considering both risk and potential returns going forward.