Hewlett-Packard (NYSE:HPQ) stock soared beyond $40 late last year after the company announced it would split in two in 2015. But since then, it's been tough sledding for the tech behemoth. For the past month and a half or so, Hewlett-Packard stock has been stuck near the $30 mark.

HPQ Chart

Hewlett-Packard Stock Chart, data by YCharts

This leaves HP shares trading for just a little more than eight times earnings on both a backward- and forward-looking basis. That certainly seems cheap. But HP, which has faced big threats to its business for five years or so, now also has to contend with the disruption of its impending split into two companies. So, is HP a great value stock at this point -- or a value trap to be avoided?

Approaching the split
On Nov. 1, Hewlett-Packard plans to split into two companies. The company's enterprise hardware, services, and software businesses will be spun off as a new company called Hewlett-Packard Enterprise. The rest of the company -- consisting of the PC and printer businesses -- will be renamed HP Inc.

The two post-split companies would be roughly equal in size, with each having more than $50 billion in annual revenue based on their 2014 results. But HP's revenue has been under pressure for several years now, falling from $127.2 billion in 2011 to $111.5 billion in 2014. Revenue is on pace to decline another 6% this year, largely due to the strong dollar.

Despite HP's falling revenue, it has been able to keep earnings relatively stable through an ever-widening cost-cutting program. It has also been buying back some stock to bolster EPS.

Why the split could be good for investors
In his classic investment book You Can Be a Stock Market Genius, Joel Greenblatt claims that corporate spinoffs offer great prospects for stellar stock returns. This would seem to bode well for Hewlett-Packard stock.

There are a number of reasons why spinoffs (and their parent companies) tend to do well. Two of them seem particularly relevant to HP.

First, the new Hewlett-Packard Enterprise and HP will each be more focused companies. That may allow for more effective management of each half. Most importantly, it will make it easier to "pay for performance" by tying executive pay to stock performance. As a large conglomerate, HP can't do that as well today, as the stock's value depends on the performance of many business segments that are quite different from one another.

Images

Most of the cash flow from HP's lucrative printing business will be returned to shareholders. Photo: The Motley Fool

Second, the split will create two businesses with very different investment characteristics. HP will be positioned as an income play. It will keep most of the combined company's debt and cash, and it probably will return most of the cash generated by its printing and PC businesses to shareholders in the form of dividends and buybacks.

By contrast, Hewlett-Packard Enterprise will be almost debt-free, in an attempt to give it the flexibility to pursue big M&A deals. (As a separate company, it could even be a potential target although it will still be quite large.) Hewlett-Packard Enterprise will also spend a lot on R&D in order to improve its positioning in growth segments of the IT market.

Does the split make Hewlett-Packard stock a buy?
While spinoff stocks often perform well, the biggest gains usually come when the spinoff is significantly smaller than the parent company, according to Greenblatt. In this case, it's closer to a 50-50 split, which removes some of the factors that tend to help spinoff stocks.

Furthermore, even if the spinoff unlocks value, one or both of the stocks could face significant selling pressure in the immediate aftermath of the split. That's because some investors who own Hewlett-Packard stock today may only be interested in one part of the company and will sell shares of the other half as soon as the split occurs.

HP shares are cheap enough that it could still be worthwhile to build a small position before the November split. While revenue pressure is likely to continue for the foreseeable future, HP should be able to keep its profit and cash flow relatively stable through its cost-cutting initiatives.

But the biggest opportunities may come later this year after the split is completed. Considering Hewlett-Packard stock is already quite cheap, if either half of the company faces significant selling pressure following the split, it could become a great bargain purchase.

Adam Levine-Weinberg has no position in any stocks mentioned. The Motley Fool has no position in any of the stocks mentioned. Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.