The second quarter of 2018 was the best quarter for personal-computer shipments in more than six years, IDC reported Thursday afternoon, confirming an earlier report from rival Gartner. IDC tracked 2.7% growth in PC shipments from the same quarter a year ago, blowing away its projection of 0.3% for the biggest gains since the first quarter of 2012, when the market expanded by 4.2%. Earlier Thursday, Gartner reported the first year-on-year gain since the same quarter, but IDC has tracked gains in the sector in previous quarters while looking at a slightly larger collection of form factors that includes Chromebooks. The one big difference between the two quarterly studies was at the top of the market-share rankings, where HP Inc. HPQ, -0.92% came in slightly behind Lenovo Group Ltd. 992, -1.70% in Gartner's market-share rankings but was easily on top of IDC's. According to IDC, HP had 23.9% of the market in the second quarter while Lenovo had 22.1%, though Lenovo grew at a faster rate (11.3%) than HP (7.6%). Trailing those two leaders were Dell Technologies Inc., Apple Inc. AAPL, +1.02% and Acer Group. Those five manufacturers all increased shipments year-over-year, IDC said, while PC shipments from other companies declined 7.3%. Both analysis firms said that a continuing business refresh of PCs with Microsoft Corp.'s MSFT, +1.29% Windows 10 operating system was the most important driver of the current gains for PC shipments.