Microsoft has said its chief executive Steve Ballmer would retire within the next 12 months once it has selected a successor, sending its shares up sharply.

In a statement, Mr Ballmer said that he would have timed his retirement in the middle of Microsoft's announced transformation to a devices and services company.

However, he said, the company needed “a CEO who will be here longer term for this new direction."

Mr Ballmer, 57, met Microsoft founder Bill Gates in 1973 while they were living down a dormitory hall from each other at Harvard University.

He joined Microsoft in 1980 to bring some business discipline and salesmanship to a company that had just landed a contract to supply an operating system for a personal computer that IBM would release in 1981.

Mr Ballmer, a zealous executive prone to arm-waving and hollering, did the job so well that he would become Mr Gates' sounding board and succeed him as CEO in 2000.

"It's a tad surprising, but every other business head has been rotated out," said BGC Financial analyst Colin Gillis. "They swapped out all their segment heads over the past few years. The only one they haven't changed is the CEO."

Nearly 2,000 people work full-time at Microsoft’s offices in Ireland, including employees and contract staff.

The software company said its board had appointed a special committee to direct the process of appointing a new CEO.

The committee is chaired by John Thompson, the board's lead independent director, and includes Microsoft founder and Chairman Bill Gates, as well as other board members Chuck Noski and Steve Luczo.

It will consider both external and internal candidates and is working with executive recruiting firm Heidrick & Struggles International Inc, according to the company.

Microsoft shares jumped by 7% in opening trade on Wall Street.