IDC Senior Analyst Jay Chou said the Apple has been showing steady momentum as consumers grow more comfortable with Apple's products. Price cuts on the MacBook Pro and MacBook Air laptops also helped spur sales.
As recently as the 2012 holiday quarter, Apple's share of the PC market was below 10 percent, he said.
Apple still trails domestic-market leader Hewlett-Packard, with a 28 percent share of the PC market in the U.S., and second-place Dell, with a 24 percent share.
Read More Amazon surprises with new device called Echo
Apple Chief Executive Tim Cook trumpeted the performance of the Mac during the company's September quarter earnings call. He told Wall Street that Mac desktops and laptops set a quarterly sales record, and saw 18 percent revenue growth from a year earlier.
"We're especially proud of our Mac results considering the overall contraction of the global PC market this year," Cook said during the investor call. "And we achieved our highest quarterly market share since 1995."
The company reported it sold 5.5 million Macs, an increase of almost a million over last year, thanks to a strong back-to-school season for the MacBook Pro and MacBook Air. The Mac saw a double-digit increase across most markets around the world, with sales especially strong in the emerging markets.
Apple has been gaining market share for 33 of the last 34 quarters.
Read MoreNew malware affecting Apple devices found
IDC's Chou said Apple has managed to carve out a premium niche at a time when the U.S. PC market has seen modest growth thanks to the popularity of inexpensive computing devices like the Google Chromebook, several of which retail for less than $300.
—By Dawn Chmielewski, Re/code.net.
CNBC's parent NBC Universal is an investor in Re/code's parent Revere Digital, and the companies have a content-sharing arrangement.