The countdown is under way. A suited woman pops in and out of the gigantic London hotel room like a bird in a cuckoo clock. "Five minutes," she calls, then "three minutes", then just 60 seconds separate the room from the richest man on the planet. He enters. The woman from Microsoft is suddenly on her feet and the entire room follows - Microsoft's sound recording operator, a corporate PR man, the Guardian's photographer and I. Only when this slight, nimble and immaculate man has slid on to a sofa next to mine do we sit.

Bill Gates, software mogul, is a contradiction: both geeky and predatory; an arch capitalist and history's most generous philanthropist. The Bill & Melinda Gates Foundation, which he runs with his wife, is 10 times the size of Rockefeller's charitable foundation and three times that of Henry Ford's. It has surpassed the Wellcome Trust, the London charity that was once the world's largest. Global health, rather than grand libraries, are its chief cause. He has pledged to give away his $46bn (£28bn) fortune - derived largely from stock in his company - before he dies.

His skin is waxy and his lips plump. He looks shockingly healthy. At 48, Gates is younger than his philanthropic predecessors and, consequently, his making of money coincides with its giving. The synchronicity has made some question his motives: why did donations to his foundation swell when his corporate image was sullied by federal anti-trust suits? And why is Microsoft giving cash to British charities to boost access to computers at a time when it faces increasing competition for multi-million pound public sector contracts?

The link, he says, is tenuous. "Well, actually it's hard for people to say that spending $26bn is like some PR investment," he points out.

To be precise, the foundation has so far spent around $7bn (£4bn) of its $26bn endowment. Gates has donated $4bn on global health, of which $202m went on fighting malaria and a further $127m on finding an Aids vaccine within the next decade. Microsoft Community Affairs, the philanthropic arm of his company, has given some $247m in cash and software to 5,000 charities around the world, including Britain, in the past year.

Giving does not win Microsoft government contracts, Gates says. "If it does, so much the better. But I think those things get evaluated on a purely case by case basis." Neither does it generate a net profit. But, he admits, Microsoft's image has benefited, "and maybe a few more users come along. There's nothing wrong with that at all." That the foundation shuns quiet altruism in favour of maximum publicity proves the point. It has flown journalists and photographers around the world to spread the word that Microsoft's chairman cares. "It's very important to us that we're not just seen for our great financial results," he says.

Gates's charity began at home. As a freckled-faced Eagle Scout, he sold nuts on Seattle's streets to raise money for his troop. His upper-middle-class parents volunteered for civic committees and fundraised in the city. At dinner, the family would sit around the table and discuss where the money should go. He was sent to a private school, surrounded by children from wealthier backgrounds than his. "They weren't as hard working," he says. "They weren't as hungry. I was not born rich at all. The ideal is to grow up without much money and then be lucky enough to make it because all your sense of values and hardwork get established knowing that you've got to get a job and got to make your mark."

Do his three children, all under eight, understand the value of money and why their parents are giving it away? They have a sense of it, he says. "My wife is in India, and we explained to them that there are poor children who don't have blankets and food, and mum's going to India to help them out. Probably the most vivid way they understand that they are a bit lucky is that we have a trampoline room. In other kids' houses they go to, there's no trampoline room. And we say: 'We are very lucky and that's why we have to do these things [give to charitable causes].'"

When Microsoft started to make money it was his mother who encouraged him to think about charitable giving. Yet it was an über-capitalist that Gates credits with inspiring him to give away his fortune before his death. The billionaire investor Warren Buffet's protestations at corporate excess pulled him up, he says. "He spoke out some time ago and said this passing all of that societal wealth along to kids is not even good for the kids. And, as I thought about it, I agreed with him. But then I needed to say: 'Wow, that means what is the cause going to be?'"

Listening to Gates, one is struck by how his command of figures is superior to his use of words. It is fitting, therefore, that bad sums rather than rhetoric captured his philanthropic imagination. He put 48,000 computers for America's rural poor in 18,000 US libraries, he proudly says. He became aware of the "tragedy" of world health and discovered that lives could be saved for as little as a $100. "In the poor world, governments just don't make that happen," he says.

Vaccines, the search for a push-button solution for polio, malaria and other diseases, arguably appeals to the techno-scientist in Gates. Without them, life in the developing world is a thousand times less valuable, he says. "That was shocking to me and that really got me going." He was determined to begin his global health programmes straight away, rather than, as he originally envisaged, when he was in his sixties. Being a ruthless businessman and an idealistic philanthropist might confuse people - "during the day trying to make money and at night, start giving it away" - but it doesn't bother him. Gates claims not to be interested in posterity. "No, you don't live to be remembered."

Aside from global health, Gates presents his philanthropy as themeless. His opaque politics have seen him donate to the Republicans and Democrats. Allegiances, one might suppose, are a threat to business moguls. His chequebook stubs - scholarships for minority students, support for groups for gun safety, contraception and against tax cuts - suggest liberal leanings. "Well, if being worried about the digital divide makes you a liberal, then I'm a liberal," he says with a laugh. Is he interested in tackling inequality? "Inequalities won't just solve themselves fast enough by letting pure capitalism work on [them]." His money can help move things along, he says.

So does he consider his agenda to be liberal? "That would imply too much about my position on a huge range of issues," he says. But he reflects that not every wealthy capitalist chooses to give 95% of his or her money to help the world's poorest countries. Nor should they be forced to. "I'd like to set an example and show them: 'Hey, it's fun to do, and the more I'm doing philanthropically, the better I'll feel.' I'm trying to be a positive influence on that and show people that the money is used very well. That's a bit radical."

The attitude has convinced the British government, which has announced that Gates's "outstanding" contribution to enterprise, employment, education and the voluntary sector in Britain merited an honorary knighthood. One such contribution is Unlimited Potential, an initiative set to pump cash grants and software into UK charitable projects that teach computer skills to disadvantaged groups. He sings the praises of the "creativity" of non-profit organisations: "I think the world is recognising the importance of NGOs and how government's should work with them."

As one of technology's most devout missionaries, Gates is surprisingly restrained in preaching the benefits of computer literacy. The projects put people on an "equal footing" in accessing "the power of the internet". Yes, they give Microsoft "a good dialogue with non-profit organisations or governments". But access to the internet is not a solution to the world's problems, he says. "When I'm at IT conferences and people say the most important thing in the world is to get people connected to the internet, I say: 'Are you kidding me? Have you been to poor countries?'"

In a typical week, he spends up to 60 hours working on Microsoft business and 10 on the foundation. His charitable work is not just about grand gestures. He tells a story about helping his four-year-old son Rory on a small-scale volunteer project. "We were putting together these kits for homeless people - you know, where you put in the toothbrush and toothpaste- and Rory says: 'This is really nice, Dad, but if these people are homeless, why don't we give them homes?'

"It's kind of a good question." He breaks into laughter. "We told him: 'A home costs a little more, but basically you're right!'"

Credit where credit's due

Mohga Kamal-Smith, health policy adviser, Oxfam

His contribution is welcome. He put a lot of money towards vaccinations at a time when their rates were falling, and has raised the issue of global health. But it's questionable whether he's incentivised rich governments to spend more strategically. His funding is piecemeal. Poor countries need a functional health service. That can't be done by philanthropy alone.

Polly Roy, professor of molecular virology, the London School of Hygiene and Tropical Medicine

I've applied to Gates's vaccine challenge. He wants new ideas and I've submitted a proposal. He's going about things the right way because vaccines are the best way to control diseases, but its virtually impossible to get funding for them. His search for solutions is exciting; it gives people like me, who've spent their whole lives trying to understand viruses, opportunities to be imaginative and explore.

Jim Young Kim, adviser to the director-general of the World Health Organisation, and professor at Harvard Medical School

When Gates gave the Global Alliance for Vaccines and Immunisation $750m people's jaws dropped. His entry into global health led to a huge shift in notions of what was possible. The idea of HIV treatment for people in poor countries, before Gates, was a dream. Diagnosis and drug development for tuberculosis was ignored because it was a disease of the poor. He's advanced the field, and there's optimism about getting new drugs. But it wasn't just his money. His sense of outrage brought an urgency.

John Pepin, philanthropy consultant

New style philanthropists view their grant-giving as a social investment and look for measurable outcomes. Beyond feeling good about the money they give, they contribute their time, energy and expertise to build the capacity of the organisations they support. Gates appears to being doing this and is having a huge impact.