Bill Gates, the world's richest man, said he would give up the daily running of Microsoft by July, 2008 to concentrate on his foundation's work tackling health and education problems.

Gates "will transition out of a day-to-day role in the company to spend more time on his global health and education work at the Bill and Melinda Gates Foundation," Microsoft said in a statement.

The Microsoft co-founder wanted a two-year transition "to ensure that there is a smooth and orderly transfer of Gates' daily responsibilities." It added that Gates, 50, would continue as the company's chairman and an "advisor on key development projects" after July 2008.

"Obviously, this decision was a tough one for me to make," Gates said in a webcast. "I have one of the best jobs in the world. I love software and I love working with the creative, talented, passionate people at Microsoft."

"The change we announced today is not a retirement, it is a re-ordering of my priorities," Gates said as he spoke warmly of how Microsoft went from the drawing board to become an international computer software colossus.

"It's been amazing to see so much of that dream become a reality and touch so many lives."

Gates had already given up some responsibilities at Microsoft. He handed the chief executive's post to Steve Ballmer while retaining the title of chairman and "chief software architect."

Gates said he was applying the successful strategies from Microsoft to the foundation founded by him and his wife.

"With the success of Microsoft, I have also been given the gift of great wealth," said Gates, whose personal wealth was estimated at 50 billion dollars this year by Forbes magazine.

"I believe that with the gift of great wealth, comes great responsibility."

"A responsibility to give back to society. We have focused on global health and education; two issues that are at the crux of global needs."

The company announced that chief technical officer Ray Ozzie "will immediately assume the title of chief software architect and begin working side by side with Gates . . . to ensure a smooth transition."

Another chief technical officer, Craig Mundie, will take the new title of chief research and strategy officer.

"We have a great team of people and I believe we can make this transition without skipping a beat," Gates said.

The Gates foundation has a net worth of 29.1 billion dollars -- putting it on a par with the gross domestic product of Luxembourg and ahead of many of the African nations it helps.

It says it has given out 10.5 billion dollars since it was set up and last year made grants of 1.36 billion dollars.

Gates dropped out of Harvard University to set up Microsoft with childhood friend Paul Allen some 30 years ago.

The company grew from a garage start-up into a global giant whose software operates more than 90 percent of the world's personal computers.

"I don't know what it is going to feel like not to come into work every day and not work for ten hours," Gates quipped.

"I see myself always being the largest share holder of Microsoft. I'm proud of that. That is something I want to maintain."

Gates reminisced briefly about setting up the firm in Redmond, Washington.

"In the early days, I like to review every line of code and interview every applicant," Gates said. "I've had to lighten up in both those areas."

Ballmer promised to stick with principles instilled by Gates, such as nurturing innovation and research and providing "brilliant" people a supportive place to work.

"Bill may reduce his time here, but his imprint on the company will never diminish," said Ballmer said. "We will remain patient and relentless, and never give up on good ideas."

Microsoft's future would hinge on fostering breakthroughs in fields such as robotics, communications, and voice and image recognition, said Gates.