In a corner office on Microsoft's leafy, low-rise campus in suburban Seattle, a bespectacled, slightly portly middle-aged man has been packing up his belongings. Bill Gates logs off today after 33 years in day-to-day control of the world's biggest software company.

Gates, 52, is retiring in order to spend more time giving away his $58bn (£29bn) fortune. In a glossy video produced by Microsoft to mark the occasion, he expressed quiet satisfaction: "We've really achieved the ideal of what I wanted Microsoft to become."

Later today, Gates will deliver a valedictory address to the software company's 90,000 employees with his right-hand man, Microsoft's chief executive Steve Ballmer, by his side. Staff around the world will watch via a webcast.

Gates will remain part-time chairman of the board. But the reign of the one-time boy wonder of the computer world is officially over.

In a rare period of inactivity, Gates plans a trip to the Beijing Olympics and will be enjoying a spell of leisure over the summer. Then, he plans to set up an office in Seattle's Eastside area to delve deeper into the world's medical, biological and environmental challenges for his Bill and Melinda Gates Foundation.

"I'll miss doing the work here," Gates told reporters this week. "This is a big milestone."

He has been gradually "transitioning" out of Microsoft for two years and to many in the technology industry, the company itself has been fading from prominence - it hasn't released a blockbuster product for a decade and its mantle as a leading-edge innovator has been inherited by Google.

Yet Rob Helm, research director for an independent consultancy, Directions on Microsoft, says Gates kept a close eye on events at the company until relatively recently through internal sessions known as "Bill G reviews" for which staff prepared frenetically.

"A team would go into his office with other interested parties and Gates would grill them about the project they were working on - both from a business and a technical standpoint," says Helm.

These sessions, says Helm, could be sorely missed: "The Bill G review was Microsoft's compass to keep all its groups pointing in the same direction - and only he could really do that, only he had that depth of knowledge."

Gates's encyclopaedic mind has almost mythical status at Microsoft. Bookish from an early age, he used to take a book when his family took him to watch the Washington Huskies college football team as a child. Aged 11, he won a bet with a local pastor that he could memorise all three Biblical chapters of the "sermon on the mount", word for word.

He established Microsoft with a schoolfriend, Paul Allen, in Albuquerque in 1975 to write basic programs for early incarnations of computers. They won their big break five years later by landing a deal to provide operating systems to IBM.

But Microsoft's history has been peppered with controversy over its robust attitude to competition. In the 1990s, its practice of embedding internet browsers in operating systems caused a particular furore, making it tough for rivals such as Netscape to lure customers with rival software. The company has repeatedly been accused of making it hard for rival developers to make applications compatible with its operating systems.

"He's a man who could be calculating, devious and brutal," says Marc Aronson, author of a soon-to-be-released book, Bill Gates: Up Close. "On the other hand, he's created something - he is a builder."

When Microsoft was threatened with a break-up by the US competition authorities and subsequently fined by the European commission, Gates' reputation reached a nadir. A US judge described the company in 2000 as "untrustworthy", although the case was settled when the newly elected Bush administration adopted a more laissez-faire approach.

Since then, Gates has reinvented himself as a philanthropist. With the help of $30bn from Warren Buffett, his foundation funds healthcare, agricultural development and education in developing countries.

"Gates always likes to be at a knife-edge point between absolute success and absolute disaster," says Aronson. "Being the richest, or third richest, guy in the world is not a challenge anymore. But fighting malaria is a challenge because there's a high chance of failing."

Some believe Gates is getting out of Microsoft at the right time. The company remains enormously profitable - it is forecast to make earnings of $17bn from revenues of $60bn for the 12 months to June. But its two key products which command near monopolies in their fields, Word and Office, are facing challenges - most notably from free-of-charge word processing and spreadsheet applications hosted on the internet by Google.

Certain analysts suggest that Google is throwing down the gauntlet in the same way that Netscape posed a threat to Microsoft's Internet Explorer during the "browser wars" of the late 1990s.

Michael Gartenberg, a technology analyst at Jupiter Research, says: "Bill basically started and then redefined an entire industry, then went on from there to redefine philanthropy. But the real challenge is going to be where Microsoft goes from here."

Critics say that Microsoft has struggled to grasp the trends shaping the latest generation of the internet, dubbed "Web 2.0". The company has resorted to trying to buy its way in by snapping up a stake in Facebook last year and through its recent aborted attempt to buy Yahoo.

"People who are discounting Microsoft's relevance are making a mistake," says Gartenberg, who argues that the company remains a formidable competitor. "People who underestimated Microsoft in the past have discovered their mistake to their cost."

Gates is likely to spend more time with his three young children at his 40,000sq ft mansion overlooking Lake Washington, which boasts a private library and an art deco theatre and where guests have included the Chinese president Hu Jintao.

But the business world hasn't quite seen the last of Gates. He has put money into in a start-up called Intellectual Ventures which is developing a "clean" type of nuclear reactor which would use fuels other than enriched uranium.

For future investments, he says he is only interested in "dramatic" scientific breakthroughs which would tie in with his broader philanthropic approach of "improving the state of mankind".

"If somebody says to me 'OK, we can do new cookie stores and we can make zillions', I have no interest in spending a minute on that," he told his home town newspaper, the Seattle Post-Intelligencer. "I hope somebody goes and does that, but that's not for me."