Apple delivered record numbers for iPhone and iPad sales in the fourth calendar quarter of 2013, though iPhone sales in particular fell well short of analyst expectations. The firm recorded a whopping net profit of $13.1 billion on record revenues of $57.6 billion.

"We are really happy with our record iPhone and iPad sales, the strong performance of our Mac products, and the continued growth of iTunes, software and services," Apple CEO Tim Cook is credited with saying in a prepared statement. "We are continuing to invest heavily in our future to make experiences with our products and services even better."

Apple sold 51 million iPhones in the quarter, up from 47.8 million in the same quarter a year ago but well below the expected 55 million to 57.5 million. Apple blamed the shortfall on supply issues in the United States—although the iPhone 5S was available normally within a month here, compared with a several-months-long supply issue for its predecessor—and on lower-than-expected iPhone 5C sales.

Related: "Apple Announces iPhone 5C, iPhone 5S"

The bigger problem for iPhone, of course, is that its biggest competitor is selling even more handsets. Samsung sold 81 million smartphones in Q4 2013, and that firm ended the year with 47 percent of the market. Apple's iPhone saw its market share fall from 19 percent at the end of 2012 to 15 percent at the end of 2013.

But here's a sobering reality: in the fourth quarter, the iPhone was responsible for $32.5 billion in revenues, compared with $24.52 billion for all of Microsoft. That's right: In Q4 2013, just the iPhone was bigger than all of Microsoft.

Apple sold 26 million iPads in the quarter, after launching two new models—the iPad Air and iPad mini with Retina Display—up from the 22.9 million it had sold in the same quarter a year earlier. The big surprise, perhaps, was the Mac, which recorded stronger-than-expected sales of 4.8 million, up from 4.1 million last year. The Mac now controls 5.8 percent of the worldwide market for PCs.

As has been the trend in recent years, iPod sales continued their drop-off, with Apple selling 6 million units, down 50 percent from the year ago quarter. The firm did not release new iPod models in 2013.

Apple generated a stunning $22.7 billion in cash from operations in the quarter and returned $7.7 billion to shareholders through dividends and stock buybacks. Looking forward, Apple expects revenues in the current quarter to be flat with the year-ago quarter, with revenues of $42 billion to $44 billion.

Related: "Apple's iPhone Strategy Raises Concerns"