It's no mystery PC sales have struggled in recent years, and 2015 should be no different. According to tech research specialist IDC, worldwide PC shipments will fall around 3% this year, extending a three year streak of declines and accelerating from a 2.1% drop in 2014.

But not all companies in the PC space are suffering right now. In fact, IDC says each of world's top five PC vendors actually saw year-over-year growth in shipments during the fourth quarter, driven by a combination of compelling products from low-cost ultrabooks to all-in-ones, convertibles, and touch systems. By contrast, vendors outside the top five saw PC shipments decline a whopping 20.7% over the same period.

The best of the best
Perhaps most compelling, however, is that only two of the top five vendors achieved double-digit percentage increases, including Apple (NASDAQ:AAPL) at 18.9% and Hewlett-Packard (NYSE:HPQ) at 15.1%.

So what caused Apple and HP to stand out from the rest?

First, it helps that Apple had a relatively small base from which to grow, increasing its fourth quarter unit shipments to just 5.75 million for a 7.1% worldwide share of the PC market. During the same year-ago period, Apple's Q4 2013 PC shipments and market share arrived at just 4.84 million and 5.8%, respectively.

Apple stock, Hewlett-Packard stock, PC Sales

Apple's personal computers continue to take market share. Credit: Apple

To explain Apple's ability to consistently outpace the broader PC market, IDC points to recent price cuts, healthy demand in mature markets, and Apple's overall "steady growth" -- the last of which is a likely reference to Apple enticing millions of new consumers who were first introduced to its ecosystem through its popular mobile devices.

But taking a look at Apple's recent history also shows its success isn't new. To the contrary, during Apple's most recent quarterly conference call this past October, it set new company records for Macs, with revenue up 18% and unit sales up 21%. What's more, Apple CFO Luca Maestri elaborated their growth was not just from mature markets, but rather geographically broad-based:

We achieved double-digit Mac growth across most markets around the world, with particularly impressive performance in emerging markets where Mac sales were up 46%. These results are truly remarkable given the contraction in the global PC market, and we now have gained market share for 33 of the last 34 quarters.

In the end, given Apple's small base, past outperformance, and incredible market penetration with its gateway mobile devices, Apple investors shouldn't be particularly surprised with its double-digit PC gains.

At the same time, this also makes Hewlett-Packard's results look that much more impressive. After all, even in the face of broader market declines, the PC titan increased its fourth-quarter shipments 15.1% from 13.8 million to nearly 15.9 million, while simultaneously boosting its worldwide market share from 16.7% to 19.7%. In particular, IDC says the primary key to HP's growth was U.S. consumers' strong reception to its innovative personal systems product line. 

Apple stock, Hewlett-Packard stock, PC sales

Convertible and touch PC systems likes this one have enticed many consumers to upgrade. Credit: Hewlett-Packard

Again, however, HP's strength isn't exactly new. Following HP's fiscal third quarter results back in August, for example, I pointed out its Personal Systems segment had effectively taken the lead in the company's long-awaited turnaround. Then in October, HP announced its historic separation into two companies: The first will be called HP and focus specifically on the personal computer and printer segments, while the second second will be dubbed Hewlett-Packard Enterprise with the aim of handling servers, storage, networking, software, and services.

Sure enough, when HP management subsequently told us that split was officially under way during the third quarter of calendar 2014, they promised a comprehensive plan was in place to ensure a seamless transition with minimal disruptions to the businesses. It would appear, then, the ongoing split is coming along nicely.

Of course, we'll know more on exactly how the respective PC offerings from Hewlett-Packard and Apple fared when both companies report earnings over the next several weeks. But if IDC's early research is any indication, it seems both companies are effectively leveraging their own strengths to continue gaining share in this difficult -- but lucrative -- market.

Steve Symington owns shares of Apple. The Motley Fool recommends Apple. The Motley Fool owns shares of Apple. 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.