Microsoft (Nasdaq: MSFT), the world's biggest software company, said it would take a $6.2 billion onetime charge to write off its 2007 acquisition of aQuantive, an online advertising agency.

The Redmond, Wash., company paid nearly $6.3 billion for the ad company, so the writeoff indicates the acquisition has been a disaster.

The charge will be for goodwill in Microsoft's Online Services division, which also includes Bing, the No. 2 search engine. The company said Bing's revenue and share has been growing.

Bing handles many of the search and mechanical functions of Yahoo (Nasdaq: YHOO), the No. 3 search engine, in Sunnyvale, Calif.

The company announced the writeoff just after it closed fiscal 2012 on Saturday. It announced the charge as part of an annual goodwill impairment review of its operations.

In accounting practices, goodwill usually means the value of a company over the value of its assets. Acquirers frequently overpay for companies for fear they will be outbid and lose an opportunity.

Shares of Microsoft fell 13 cents after the close Monday to $30.43, valuing Microsoft around $256.7 billion. The company is expected to announce fourth-quarter results on July 19.