Net income in the quarter through December climbed to $6.56 billion, or 78 cents per share, from $6.38 billion, or 76 cents per share, a year ago.
Revenue rose 14 percent to $24.52 billion.
Analysts polled by FactSet expected earnings of 68 cents per share on revenue of $23.67 billion.
Outgoing CEO Steve Ballmer, who announced he'd step down by August, said in a statement the Redmond, Wash.-based company's devices and consumer segment had a "great holiday quarter."
Surface revenue rose to $893 million in the quarter, up from $400 million in the three months through September, as the company benefited from a summertime price cut to its first-generation models, unveiled the Surface 2 and expanded the number of places it is sold at retail.
"There's better hardware, the software continues to improve and there's better market perception," said Chris Suh, Microsoft's general manager of investor relations, in an interview with The Associated Press. He added that there has been "good pick-up" of Surface 2. "The trajectory is a lot better than a couple of quarters ago."
However, analysts continue to question the company's focus on manufacturing hardware. Microsoft plans to complete its $7.4 billion acquisition of Nokia's phone business and patent rights early this year, but the Finnish phone maker reported earlier in the day that its smartphone sales plummeted 29 percent in the December quarter despite releasing new Lumia models.
"I would call it a Herculean challenge to turn around that mobile business," said Daniel Ives, senior technology analyst with FBR Capital Markets. "They have a lot of wood to chop ahead."
The company withstood a steep decline in personal computer sales, which research firm Gartner pegged at a 7 percent decline worldwide in the December quarter and IDC put at 6 percent.
Microsoft said revenue from its flagship operating system fell just 3 percent, reflecting a 12 percent gain from PCs that its partners sold to enterprises, although it made no distinction between which version sold better, Windows 7 or its much-criticized Windows 8.1. Windows revenue from consumer purchases fell 20 percent, dragged down by a sharp decline in China.
Overall, revenue from its devices and consumer segment grew 13 percent to $11.91 billion, while revenue from commercial products like server operating systems and cloud computing services grew 10 percent to $12.67 billion.
Shares rose $1.66, or 4.6 percent, to $37.74 in after-hours trading Thursday following the release of the results. Earlier, the stock closed the regular session up 15 cents at $36.08.
MORE HBJ HEADLINES
Our new comment system is not supported in IE 7. Please upgrade your browser here.