Pssst … hey, buddy, want to buy a software company at a hardware multiple? Have I got a deal for you! It's the genuine article. Famous worldwide. You've no doubt heard of it: IBM (NYSE: IBM).

Yes, I'm talking about the leading mainframe-computer company. It's still going strong in mainframes, with revenue in that segment up 69% year over year and 24 new mainframe customers in the second quarter on the heels of a product refresh. Yet mainframes account for well under 10% of Big Blue's revenue.

By revenue IBM's biggest business is services. Combined, its Global Technology Services and Global Business Services units account for 55% of revenue. Software makes up 24% while Systems & Technology (servers, storage, retail solutions, and semiconductors) accounts for 18%.

2010 Revenues

2010 Mix

2010 Change Year Over Year

Global Technology Services 37.0% 2.0%
Global Business Services 17.8% 2.6%
Software 23.8% 5.7%
Systems & Technology 17.6% 9.8%
Global Financing 3.8% 0.1%
     
IBM Total 100% 4.3%

Source: Capital IQ, a division of Standard & Poor's.

The softer side of IBM
So doesn't that make IBM a services company? With services accounting for more than half of revenue, many financial data providers classify it as a services company. And Wall Street analysts with services-sector expertise started to cover it in the last decade, a change from its traditional coverage by hardware analysts. But investors value companies more on profits than on revenue, and IBM's largest source of profits -- both gross profit and pre-tax profit -- is its software business.

2010 Gross Profit

Mix

Change Year-Over-Year

Gross Margin

Global Technology Services 27.9% 1.4% 33.6%
Global Business Services 10.8% 3.4% 27.1%
Software 41.1% 6.2% 76.8%
Systems & Technology 14.6% 12.9% 36.9%
Global Financing 5.5% 3.4% 63.9%
       
IBM Total 100.0% 5.2% 47.5%

Source: Capital IQ, a division of Standard & Poor's.

Profits from IBM's two services businesses added together -- 38.8% of gross profit and 39.2% of pre-tax profit -- are still less than IBM's software profits.

2010 Net Pre-Tax Profit

Mix

Change Year-Over-Year

Net Pre-Tax Margin

Global Technology Services 26.8% 0.6% 14.1%
Global Business Services 12.4% 0.5% 13.5%
Software 43.8% 12.4% 35.8%
Systems & Technology 7.6% 11.8% 8.4%
Global Financing 9.4% 13.2% 48.0%
       
IBM Total  100% 8.7% 19.7%

Source: Capital IQ, a division of Standard & Poor's.

What's more, software profit margins far exceed the margins in all of IBM's other lines of business with the exception of the financing unit, which facilitates sales of IBM's other offerings. And software is a scale business. As revenues grow, margins increase. With software revenue at IBM growing faster than overall revenue, the software businesses' share of overall profits is likely to increase.

Parting it out
There's a well-established way to value companies that span multiple sectors. It's called "sum-of-the-parts." This approach breaks the company down by revenue mix, determines an apropos valuation ratio for each sector, and then sums the parts.

Let's do a sum-of-the-parts valuation on IBM, starting with its hardware business. Looking at the stocks traditionally used as comparables, IBM trades at a modest discount to Apple, which has much higher -- albeit unsustainable over the long term -- earnings growth, lacks a dividend, and is focused on consumers instead of enterprises. Apple has also had a boom-and-bust history over the decades, and its success is closely tied to CEO Steve Jobs, who is on medical leave. That makes it much riskier than IBM over the long haul.

Stock

P/E Ratio

Dividend Yield

IBM 14.9 1.6%
Apple 16.0  0.0%
Hewlett-Packard (NYSE: HPQ) 9.2 1.3%
Dell 10.2 0.0%

Source: Capital IQ, a division of Standard & Poor's.

IBM's premium to Hewlett-Packard and Dell is more than justified, given that HP is in the early stage of attempting to turn around and that the sustainability of Dell's recent earnings improvement and attempts to transform itself is unclear. IBM also offers the most attractive dividend yield in this group. Based on that, let's call 15 a fair P/E ratio for a healthy hardware company with an above-average dividend to be applied to IBM in our sum-of-the-parts analysis.

Comparing IBM with its closest services competitors, the stock trades at a justifiable premium to challenged Computer Sciences Corporation (NYSE: CSC) but a substantial discount to a more appropriate comparable, Accenture (NYSE: ACN). It trades at an even larger discount to offshore pure-play IT services providers, even though IBM has been taking advantage of low-cost offshore talent for more than five years. Let's call 19 a fair P/E ratio for a healthy global IT services company.

Stock

P/E Ratio

Dividend Yield

IBM 14.9 1.6%
Accenture 19.5 1.5%
CSC 8.1 2.1%
Tata Consultancy Services 23.5 0.0%
Infosys 23.2 1.4%
Wipro 18.9 0.7%
Cognizant Technology Solutions 28.9 0.0%

Source: Capital IQ, a division of Standard & Poor's.

Turning to software, IBM is trading at a substantial premium to Microsoft (Nasdaq: MSFT), which is under pressure because of slow growth in the PC market -- where IBM does not participate. But IBM is trading at a substantial discount to enterprise-focused software competitors Oracle (Nasdaq: ORCL), SAP, and Check Point Software Technologies (Nasdaq: CHKP). Let's call 24 a fair P/E ratio for a healthy enterprise-software company.

Stock

P/E Ratio

Dividend Yield

IBM 14.9 1.6%
Microsoft 10.4 2.4%
Oracle 19.3 0.7%
SAP 29.1 1.0%
Check Point Software Technologies 25.1 0.0%

Source: Capital IQ, a division of Standard & Poor's.

Adding it up
Applying sector-appropriate P/E ratios to the revenue mix of IBM's core lines of business results in a sum-of-the-parts P/E ratio of 20 times for IBM (see table below). Multiplying that by IBM's EPS of $12.32 over the last year results in a fair value for IBM stock of $246. That's an impressive 35% increase from its recent price of $182.

IBM Line of Business

Share of IBM's Core Business Revenue

Sector

Sector P/E Ratio

Revenue Mix multiplied by Sector P/E Ratio

Global Services Total 57% IT Services 19 11
Software 25% Software 24 6
Systems & Technology 18% Hardware 15 3
         
Sum-of-the-Parts P/E Ratio       20

Source: The Motley Fool.

Foolish takeaway
Investors are starting to appreciate IBM, but its broad-based business makes it hard to fully understand and appropriately value. A sum-of-the-parts valuation suggests the stock has upside of about 35% to be fairly valued.

What do you think: Is IBM worth $246 instead of $182? To help you stay abreast of developments that affect stock prices, The Motley Fool recently introduced a free My Watchlist feature. You can get up-to-date news and analysis by adding these companies to your Watchlist now:

Editor's Note: A previous version of this article incorrectly summed the sum-of-parts equation. We have updated it with the correct figures. The Fool regrets the error.