Microsoft on Thursday reported a profit in the past quarter of $4.5 billion, as the tech giant rebounded from its first-ever loss.

Microsoft Corp.'s net income fell 22 percent in the latest quarter as it deferred revenue from the sale of its upcoming Windows 8 operating system to PC makers—and as PC sales in general took a dive.

The economic troubles in Europe also weighed on results, which missed Wall Street expectations.

The software company said Thursday that net income was $4.47 billion, or 53 cents per share, in the fiscal first quarter, which ended Sept. 30. That was down from $5.7 billion, or 68 cents per share, a year ago.

Analysts were on average expecting 56 cents per share, according to FactSet.

Revenue fell 8 percent to $16 billion, missing the average analyst estimate of $16.5 billion.

Microsoft's stock initially fell more than 3 percent in extended trading after the release of the results but recovered to $29.04, which was 46 cents, or 1.5 percent, below its price at the close of regular trading.

Analyst Collin Gillis at BGC Financial said executives reassured investors on a conference call, noting that trends in Microsoft's Server and Tools business, which has been the fastest-growing division, were better than they appeared at first glance.

That division makes software for servers and software developers, and is moving from licensing it out program by program to striking multi-year licensing deals. That's curbing the growth rate for now but sets the company up for better performance in the future, Gillis said.

Analysis of the Windows results were complicated by the deferral of $783 million in license fees for PCs pre-loaded with Windows 8. Microsoft, which is based in Redmond, Washington, can't recognize the revenue until the units go on sale on Oct. 26.

It also deferred $384 million in license fees from PCs that shipped with Windows 7 but are eligible for a $15 upgrade to Windows 8, and $189 million for the PCs that shipped with the new version of Office or are eligible for an upgrade.

Excluding those deferrals and other adjustments, net income was $6.66 billion, or 65 cents per share, down 7 percent from last year. Revenue was flat with last year's figure at $17.3 billion.

Excluding the deferrals, revenue for the Windows division fell 9 percent from a year ago, roughly in line with the decline in global PC shipments in the third quarter reported by research firms Gartner and IDC. Consumers held off buying PCs ahead of Windows 8 and probably steered some of their electronics dollars toward tablets and smartphones.

Windows 8 is the most significant revamp since Windows 95 and sports a completely new look that's intended to be consistent across PCs, tablets and smartphones. It's designed from the ground up for touch-sensitive screens, and Microsoft has high hopes that it will keep Windows relevant in a world where tablets are starting to eat into PC sales. It's also making its own tablets for the first time, and is set to launch them along with Windows 8.

In the Business Division, Microsoft's largest, posted a 1 percent increase in revenue, excluding the deferrals for Office.