Hewlett-Packard (NYSE:HPQ) Chief Executive Meg Whitman has repeatedly said that turning around the troubled firm may take years. Now, after better-than-expected earnings, investors may be willing to cut the venerable Silicon Valley firm some slack.

The Palo Alto, Calif. company on Wednesday reported net income of $1.4 billion, or 73 cents per share, which was a huge improvement over the year-ago loss of $6.85 billion, or $3.49 per share.  Revenue fell 3% to $29.1 billion, as the company's PC business continued to decline and demand from business customers remained tepid.  Fourth quarter gross margin was 23 percent, down 1.2 points year-over-year and 0.4 point sequentially.

Shares of Hewlett-Packard rose more than 9% in pre-holiday trading on Wednesday, closing at $27.36.  The shares are cheap, trading at a multiple of about 7 based on next year's earnings. That's lower than IBM's (NYSE:IBM) 10.6 valuation, Microsoft's (Nasdaq:MSFT) 14 valuation. and Oracle's (Nasdaq:ORCL) 12.  Shares of H-P have nearly doubled this year as faith in Whitman's turnaround strategy grows among investors.  Though the stock is trading above analysts average 52-week price target, of $24.97, some pundits think its got more gas left in its tank. According to Reuters,  nine firms have raised their targets on H-P.  Three think the stock could hit $30.

To her credit,  Whitman doesn't sugarcoat the company's many challenges.

"Obviously, there was real acceptance by our products and services in Q4, so we’re encouraged by that, but we’ve got macro economic headwinds," she said during the earnings conference call.  "I think, almost across the board. And we still have a lot of work to do in our go-to markets."

Take PCs, which have long been the company's bread-and-butter.  When measured by unit shipments, H-P lead its rivals with 26.9% market share in the third quarter, according to Gartner.  That was ahead of second place finisher Dell, which had 21%, and Apple's (Nasdaq:AAPL)  13.4%.  The price that H-P pays for its market prominence is steep.  H-P's Personal Systems business, which includes PCs,  reported a 3% operating margin.  Basically, H-P is giving its machines away. Even then, the business' results were subpar despite its rock-bottom prices.  Total revenue slumped 2% to $8.58 billion as a 4% gain in commercial revenue couldn't overcome a 10% drop-off in consumer revenue. Profit excluding some costs fell fell more than 16% to $259 million. 

Unfortunately, bigger problems lie ahead for H-P's PC business.  Market research firm Canalys estimates that more than half of all PCs shipped this year will be tablets such as Samsung's Galaxy and Apple's iPad.  Hewlet-Packard hasn't been able to gain traction in this fast-growing market because its products have failed to wow consumers. Engadget, for one, found the $160 HP Slate 7 to be overpriced and disappointing, noting  "For a casual user, the Slate 7 might be a good enough tablet, but at this price, good enough just doesn't cut it."  Laptop magazine reached a similar conclusion, telling consumers that the Nexus 7 and Amazon.com's (Nasdaq:AMZN) Kindle Fire HD were better values for the money.

Another major H-P business, Printing, also struggled though it is showing signs of improvement.  According to H-P, it gained 4 basis points of unit market share over the prior year.  Revenue for the quarter was fell 1% to $6.04 billion though when currencies are excluded sales rose.  Profit was little changed at $1.07 billion as gains with business customers were off-set by declines with consumers. Unit volumes were up 6%. H-P controls about 40% of the printing market and traditionally has sold printers at near or below costs, hoping to make its profit on supplies such as ink. Since printers have become increasingly commoditized, that strategy is proving increasingly tough to execute.

 “They just have to discount more and more to be competitive,” said ISI analyst Brian Marshall in an interview with Bloomberg News.  

His views were echoed by Edward Jones analyst Bill Kreher, who told the New York Times:" Most people view this as a restructuring, or a turnaround story. It’s going to be so hard for them to get away from their old hardware businesses.”

H-P, rivals such as IBM and Dell, are focusing on higher-margin business customers and it's strategy that has potential. Revenue at the company's Enterprise Group rose slightly to $7.59 billion, the only H-P business to see a gain. Profit was flat at $1.1 billion.  Business was also soft in Enterprise Services and Software. H-P, though, is making headway in hot markets such as cloud computing, big data and security, which each grew double-digits in the quarter.  Even so, business customers are calling the shots and are likely going to demand steep price cuts from H-P, which will pressure margins even further.

The Bottom Line

While H-P remains a work in progress, it is being lead by Whitman, one of the most capable CEOs in corporate America. If there is a way to bring H-P back to its former glory, Whitman is one of the few people who can do it.  Anyone who buys this stock is going to need to be patient.  H-P has been a mess for a long time and, like Whitman acknowledges, it is going to take a while to change. When Whitman joined the company in 2011, she was the third CEO in three years.  Now, the company is making its way back into the headlines for the right reasons instead of things such as inappropriate CEO relationships.

H-P's shares are ridiculously cheap and its potential upside once Whitman gets the company on the right track is huge. The time to buy the stock is now because it may not stay cheap for long.

Disclosure - At the time of writing, the author did not own shares of any company mentioned in this article.