Microsoft is believed to have only sold around 1m of its Surface tablets, making up about 2% of the worldwide market. Photograph: Timothy A Clary/AFP/Getty Images

Microsoft's experiment with its Surface RT tablet, launched amid great fanfare in June 2012, has turned out to be an expensive one. The company announced a $900m (£591m) charge for inventory writedowns in its quarterly results on Thursday night – a move that was only partly balanced by adding in $782m of revenues from people upgrading Microsoft Office.

Overall, the company's revenues grew by 11% to $19.9bn, while its operating income was $6.1bn – a fall of 5% compared to the same figure, excluding a $6.3bn writeoff, a year ago.

Its shares dropped 7% in after-hours trading, after months in which they had enjoyed an upturn following years of stagnation. Even ignoring the writeoff on Surface RT, Microsoft missed analyst targets.

Microsoft slashed the price of the Surface RT last week, apparently in an attempt to get sales moving ahead of a refreshed version later this summer. While it did not give sales figures, it is reckoned to have shifted just 1m tablets – 260,000 Surface RT, which cannot run older third-party Windows programs, and 750,000 Surface Pros, which can.

That would give it about 2% of the entire tablet market, which is presently dominated by longtime rival Apple and companies offering tablets running Google's Android, including Samsung and Acer.

"It doesn't inspire a lot of confidence," Nomura Securities analyst Rick Sherlund told AP. "[Microsoft is] in the hardware business now, and pretty shortly after entering it you have a pretty big writedown. That's embarrassing."

The software giant had a torrid quarter in which its consumer-facing businesses – its Online Search division and Entertainment & Devices division – both lost money, while its Windows division saw revenues decline by $281m, or 6%, after adjusting for deferred revenue from Windows upgrades the year before. That reflected the shrinking PC market, where worldwide PC sales have fallen for the past five quarters.

But the Office division, which provides the widely used suite of programs, and the Server & Tools division, saw strong growth in profits and revenues.

The company underwent a dramatic reorganisation after the fiscal quarter in which chief executive Steve Ballmer aimed to focus it on both hardware and software, and set out the company along "functional" rather than product-based lines.

Ballmer said: "We are working hard to deliver compelling new devices and high-value experiences from Microsoft and our partners in the coming months, including new Windows 8.1 tablets and PCs."

But it was the PC business, on which Microsoft's success was initially built, which was weakest. Although Microsoft is shielded from the continuing decline in the PC business by customers who buy Windows upgrades when they are needed, around half of the PC market goes to consumers.

Windows division profits more than halved, from $2.4bn a year ago to $1.1bn. Microsoft said it thought the business market had returned to "modest growth" but that the consumer PC business "remains challenged and declined again this quarter".

Windows 8, released last October, has not been well-received among consumers, and businesses have largely preferred to buy its predecessor, Windows 7, which does not offer the "tiled" appearance of its newer sibling. Ballmer said that Windows 8.1, which restores some of the appearance of Windows 7 to Windows 8, will be released to PC makers in August.

Microsoft's newly promoted chief financial officer Amy Hood said in a conference call that "this journey will take time", adding "We know we have to do better. We are confident we are moving in the right direction."