International Business Machines (IBM 0.06%) fell by 6% last Thursday after the company reported revenue that fell short of analyst estimates by more than $1 billion. IBM is now down nearly 20% from its 52-week high, and there aren't many who are defending the company after multiple disappointing quarters. Hardware sales fell off a cliff as the shift to the cloud threatens the proprietary servers offered by IBM, and performance in the so-called growth markets was particularly bad. Is this a warning sign that IBM's best days are behind it, or does the collapse offer a buying opportunity?

First, the bad
IBM's total revenue fell by 4% year over year, falling short of expectations by more than $1 billion. This was caused mainly by a 17% drop in hardware sales. Sales of Power Systems, which run on IBM's own Power architecture, plummeted by 38% year over year. Sales of System X servers, which run on the standard x86 architecture, fell by a more modest 18%. System storage sales dropped 11%. The hardware division swung to a loss of $167 million in the quarter, down from a gain of $124 million in the same period last year.

While mature markets like the U.S. and Europe performed reasonably well, performance in growth markets were abysmal. Markets in the Asia Pacific region saw total revenue fall 15%, with the BRIC countries collectively matching that decline. China was downright awful, with sales falling 22%.

Now, the good
There were, however, bright spots in IBM's earnings report. On a constant-currency basis, services revenue was up 1% and software revenue was up 2%. The service backlog totaled $141 billion, up 6% year over year. Parts of the service division showed impressive growth, with business analytics revenue up 8% year to date, and revenue from the Smarter Planet initiative, which includes things like smart grids and water-management systems, up 20% year to date. Revenue from the cloud is up 70% so far this year, as IBM is positioning itself to capitalize on the fast-growing cloud market.

Even with a dramatic decline in revenue, net income still rose by 6%. This was due to both a slight increase in the gross margin and a lower effective tax rate. Full-year guidance was unchanged, and the previously stated goal of $20 EPS by 2015 was reiterated.

Hardware barely matters
IBM has been historically aggressive in transitioning out of low-margin commodity products. Software and services provide far higher profitability, and the path to $20 EPS by 2015 relies on an increased dependence on these high-margin businesses.

In the third quarter, only 13.5% of total revenue came from hardware sales. All of the profit came from software and services, and ultimately profit is what matters. The revenue miss, because it was solely the result of weak hardware sales, is essentially irrelevant. If the hardware business disappeared tomorrow, earnings would be unaffected.

Software and services are relatively strong, although growth in the quarter was fairly slow. The huge backlog is encouraging, and there's no reason to believe that IBM's vast moat is in danger. Hardware is becoming a commodity at the exact same time that it's becoming a negligible part of IBM's business.

After the decline, shares of IBM trade at just 10.3 times the full-year guidance for adjusted non-GAAP earnings and 12 times last year's GAAP earnings. For a company with the dominance of IBM, these multiples are extremely pessimistic. If the 2015 target of $20 EPS is reached, a P/E of 15 would lead to a stock price of $300 -- nearly 75% higher than today. This is certainly not a guarantee, but with enormous share buybacks and continued growth of the software and services businesses, it's also certainly not far-fetched.

IBM is not the next Hewlett-Packard
Hewlett-Packard
(HPQ 0.69%) has seen its revenue, profits, and stock price decline significantly over the past few years. After IBM released its earnings, a Seeking Alpha article suggested that IBM may be following in HP's footsteps, and that the two businesses are extremely similar.

This argument, however, misses some key points. IBM derives all of its profits from software and services, with hardware barely a blip on the radar. IBM has a defensible moat in these high-margin businesses, and the backlog suggests that business is good. HP, on the other hand, generates a vast majority of its profits from two areas: printing and servers. Printing is in perpetual decline, and proprietary servers are quickly losing out to cloud-based solutions. Both of these profit sources are drying up, and HP's software and services businesses are small and struggling.

IBM is not following the path of HP. If anything, HP tried to follow the path of IBM and failed. HP should be avoided, as it's unclear when revenue and earnings will return to growth. HP is in serious trouble. IBM is not.

Competition in the cloud
One area which IBM is counting on for future growth is the cloud, but the company may have more difficulty than anticipated. IBM recently lost a $600 million contract with the CIA to build a private cloud for the agency. This alone is not a big reason for concern, but the details bring up some serious questions. The contract ultimately went to Amazon (AMZN -2.56%), which bid $54 million higher than IBM but was deemed to have the superior technology. IBM challenged the decision in court, but the U.S. Court of Federal Claims recently sided with Amazon.

When the preeminent IT company loses a bid like this to what was once simply an online retailer, red flags go up. The cloud is not a huge part of IBM's business yet, but if the CIA trusts Amazon with national security, then businesses likely will as well. This could prove to be the beginning of a stream of private cloud contracts for Amazon, all of which should be IBMs to lose. This legitimizes Amazon's web services and creates a serious competitor for IBM.

The bottom line
IBM's massive revenue miss was strictly due to weakness in hardware, a business which is becoming decreasingly important for the company. Software and services are the key, and these areas were much stronger. The decline in IBMs share price offers an opportunity to buy the stock of a great company at a great price, and this opportunity may not show up again.