The Republic of Chad, a landlocked desert dictatorship once described by FORBES as the planet’s most corrupt, is a strange place to find Bill Gates. Yet there he was in September, beside Chad’s Qaddafi-trained president, General Idriss Deby. “He and I walked around giving polio drops to a bunch of kids,” recalls Gates. “I shared in confidence with him some views of how he might be even more effective in the way he manages his campaign.”

Yes, a far cry from hunkering down with Paul Allen in an Albuquerque motel to reimagine how the world conveys information, or with Warren Buffett in Sun Valley to brainstorm the future of philanthropy. But to Gates diplomacy with thugs is now just as important, a dispassionate component of what he views as his final legacy. “The metric of success is lives saved, kids who aren’t crippled,” says Gates. “Which is slightly different than units sold, profits achieved. But it’s all very measurable, and you can set ambitious goals and see how you do.”

Notice the words: metric, measurable, goals. While Gates’ vaccine-based giving—closing in on $6 billion to fight measles, hepatitis B, rotavirus and AIDS, among others—is part of the largest, most human-driven philanthropy in the history of mankind, what’s missing in his language are the individual humans.

In many ways that’s the point. Gates’ clipped manner in discussing the children he and his wife met in India and Africa (“Melinda and I spend time with these kids, and we see that they’re suffering; they’re dying”) disappears when the underlying numbers come up, his speech getting more rapid, his voice ever higher. “A 23-cent vaccine,” he says, “and you’ll never get measles,” a disease that “at its peak was killing about a million and a half a year; it’s down below 300,000.” Gates rattles off milestones in the history of global health and the prices of vaccines down to the penny, but blanks on the name of one of his favorite vaccine heroes, John Enders, the late Nobel laureate, or Joe Cohen, a key inventor of the new malaria vaccine Gates helped bankroll.

It’s heady, historic stuff: America’s richest man—he’d be the world’s richest had he not already given away so much money—still in his prime (he just turned 56), with the reputation, resources and determination to stamp out infectious disease. “I’d be deeply disappointed,” says Gates, if in the next 25 years he can’t lower the death toll by 80%. Otherwise, “we’re just not doing our job very well.”

Sitting with Gates, overlooking the Bill and Melinda Gates Foundation’s gleaming new $500 million campus, full of glimmering reflecting pools and glass edifices, it’s possible to see a future with exponentially less pain and suffering. It’s also a remarkably incisive exercise in getting inside the brain of one of history’s greatest business visionaries. By dissecting with him and his wife, Melinda, how he tackles this grand human problem, you can also learn intuitively how he built Microsoft. How a mechanical genius methodically tackles an abstract problem. And perhaps most of all, how power and capital—both literal and political—can be spent to maximize positive impact on the world.

Bill Gates’ plan to eradicate disease stems from a bold concept: The demographic theories of Thomas Malthus, generally accepted for the past two centuries, are wrong. Specifically, that subsistence eventually translates into population growth, and population growth eventually translates into misery.

Bill and Melinda Gates grappled with this concept years before forming their foundation, and months before even getting married, on a prewedding 1993 African safari. Their vacation had been planned around watching predators and prey—Darwin in action. “You go to see the animals, and you go to see the savanna, and it’s gorgeous,” says Melinda. But they instead found themselves pondering that classic Malthusian riddle: “Why is that woman walking along the road with sticks on her head, a baby in the belly and a baby on the back?” Gates had no immediate reason to challenge 200 years of dogma: “We know how to get agricultural productivity up, but not that much,” he says. “Jobs, unrest, education—a high population density makes solving all those problems harder.”

So in 1997, when he and Melinda first ventured into public health—their eponymous foundation would come into being in two years—they focused on birth control, funding a Johns Hopkins effort to use computers to help women in the developing world learn about contraception. The logic was crisp and Bill Gates-friendly. Health = resources ÷ people. And since resources, as Gates noted, are relatively fixed, the answer lay in population control. Thus, vaccines made no sense to him: Why save kids only to consign them to life in overcrowded countries where they risked starving to death or being killed in civil war?

It wasn’t dissimilar from the formula that he was developing behind a multibillion-dollar push into education reform. In that case, he based his giving on this formula: Success = teachers ÷ students. Smaller class sizes would result in more attention per student and smarter kids.

But much as Gates loves elegant solutions, his greatest achievements have resulted from perseverance and adaptability. It took three versions to get Windows right, and the Xbox originally lost billions. He’s not afraid to challenge assumptions when they don’t work. And in education he’s had a clear reversal: Class size, it turns out, is not the best determinant of student outcome. Teacher quality is. So after spending a fortune, Gates shifted course.

That same epiphany for his public health philanthropy came even earlier. Bill’s dad had set up a dinner at Seattle’s posh Columbia Tower Club with the Program for Appropriate Technology in Health (PATH). While the meeting started with birth control—among other efforts, PATH taught Chinese condom makers to test their products before shipping them—Gates began consuming data that startled him. In society after society, he saw, when the mortality rate falls—specifically, below 10 deaths per 1,000 people—the birth rate follows, and population growth stabilizes. “It goes against common sense,” Gates says. Most parents don’t choose to have eight children because they want to have big families, it turns out, but because they know many of their children will die.

“If a mother and father know their child is going to live to adulthood, they start to naturally reduce their population size,” says Melinda.

In terms of giving, Gates did a 180-degree turn. Rather than prevent births, he would aim his billions at saving the kids already born. “We moved pretty heavily into vaccines once we understood that,” says Gates.

He could have focused on clinics and doctors, but that doesn’t scale. “The magic tool of health intervention is the vaccine, because they can be made very inexpensively,” he says. “We had to choose what the most impactful thing to give would be—not just money, but our time, energy, voice.” Melinda, his partner in all things philanthropic, echoes that thought: “Where’s the place you can have the biggest impact with the money? Where can you save the very most lives with those resources?”

More heavily than anyone ever had—even John D. Rockefeller, whose Rockefeller Institute for Medical Research pushed many key discoveries in 20th-century virology—he changed the global dialogue when it came to vaccines, which a decade ago had become controversial because of now-disproved autism fears. The first Gates vaccine donation, $100 million, directed at the United Nations and administered by PATH, focused on getting existing vaccines to kids. To celebrate the gift, Bill and Melinda hosted a dinner for vaccine experts at their 66,000-square-foot home on Lake Washington. After Gates asked his guests, “What could you do if you had even more money?” the room exploded with new ideas. That’s when he decided to blow up his original foundation and, in 1999, reconstitute it as the Bill & Melinda Gates Foundation, endowed with $21 billion, instantly making it one of the largest charities in the world. The endowment is now $36 billion, with $25 billion given away.

But the vaccine epiphany just unlocked an entirely new set of problems. Yes, he could use his money to save lives through original research. Gates’ munificence has resulted in vaccines for meningitis and malaria. And yes, he could keep increasing the efficacy of those vaccines by creating a so-called cold chain—a storage and distribution system within host countries. He’s done that, too.

But again he ran into the scale problem, one inherently market-based. How do you encourage Merck, Pfizer, GlaxoSmithKline and other pharma giants to produce enough expensive vaccines for children who need them most but can afford them least? The answer, Gates increasingly believed, lay in making Adam Smith’s invisible hand more visible, giving the newly formed market a benevolent shove in the direction of free enterprise.

Here’s the truest definition of power: When you have the ability to not just solve a problem but also to create a sustainable market that addresses it. “There was nobody you could a write a check to,” remembers Gates, who stood ready a decade ago to buy billions of vaccine doses. In the 1980s Unicef had tripled the percentage of children who got basic vaccines for polio, diphtheria, tetanus and other diseases by corralling public funds, negotiating on price with other aid agencies and deploying thousands of aid workers to deliver them. But those efforts still fell woefully short of the need, and new medicines hitting the U.S. market faced an intolerable 15-to-20-year lag before reaching the kids of Tanzania or Nicaragua. “The chance of death from those diseases is 50 times greater in poor kids than in rich kids!” says Gates, his voice rising.

The first critical step, he realized, was forging a lasting public-private partnership. The public half of that equation was solved quickly with his checkbook: Previous attempts had faltered due to lack of funds and infighting among aid organizations over scarce dollars. But the private component was trickier. Compared with manufacturing pills, making vaccines is difficult and expensive. Drug companies wanted to immunize kids in, say, Afghanistan, but couldn’t count on demand that would be large and predictable enough to cover their costs. They faced the unappetizing choice of being humane or profitable.

So back in 1999 Gates traveled to Bellagio, Italy to hammer out a solution, along with Unicef, the World Bank, the UN, various pharmas and aid groups. The result was the Global Alliance for Vaccines & Immunisation, now called the GAVI Alliance, which Gates ultimately backed with a $2.5 billion pledge and personal will, exhibiting the tough-guy tactics, when necessary, that earned Microsoft the fear of its rivals and enmity of U.S. antitrust regulators. “Bill was a little like a poker player who put a lot of chips on the table and scared everyone else off,” says Seth Berkley, who ran a Gates-funded AIDs vaccine effort and is now GAVI’s chief executive.

GAVI set out to do things differently in two ways. First, buy-in: It forced developing countries to cofinance vaccination programs, even at the nominal amount of 20 cents a dose. And second, accountability: It required clear record-keeping to ensure the vaccines were getting to children and to establish a sustainable delivery system. This clarity—a well-financed effort with partners on the ground—created a lasting market for big pharma that wouldn’t cost them their shirts. To further goose competition, increase supply and bring down prices, GAVI encouraged drugmakers from developing nations like China and India to bid on contracts.

The payback has been dramatic. Over the past seven years the price for the standard five-germ inoculation (including diphtheria, tetanus and whooping cough) has dropped 40%. The cost of a hepatitis B shot to prevent liver cancer has plunged 68% over a similar period, allowing millions of kids to be vaccinated. GlaxoSmithKline’s Rotarix, to prevent rotavirus, a leading cause of diarrhea and death, has gone from $102 a dose to $2.50, and Indian upstarts like Bharat Biotech are bidding to drive that cost down to as low as $1.

With newer, more-expensive offerings, like Pfizer’s Prevnar for pneumonia, the biggest-grossing vaccine in the world, GAVI has gone a step further. By promising to buy a certain number of doses, it guarantees the pharma company massively efficient volume. In exchange GAVI sets a ceiling for what it will pay long term—Prevnar, for example, goes for $114 in the U.S. but will cost no more than $3.50. Gates and his peers subsidize losses during the ramp-up. The math can be staggering: To deliver pneumococcal and rotavirus vaccines to 250 million children, GAVI raised more than $3 billion from various governments, including the U.K., Norway and the U.S., and Gates kicked in the final $1 billion to make it all work. The results have been equally massive: 3.4 million lives saved from hepatitis B, which causes liver cancer, 1.2 million lives from measles, 560,000 from the Hib bacteria, 474,000 from whooping cough, 140,000 from yellow fever and 30,000 from polio. In the past year the new initiatives have prevented another 8,000 deaths from pneumonia and 1,000 from diarrhea.

“I’ve met mothers who walked eight hours to get their child a vaccine and hoped that it’s there on that day,” Melinda says. On a trip in January to a rural clinic in Kenya she saw four children with pneumonia sharing a single oxygen tube. “They were just sucking breath,” she recalls. But across the clinic the Gates Foundation work showcased a different future: Children lined up to get the new vaccine that would dramatically reduce the risk they would ever get pneumonia.

Gates currently has two of history’s greatest scourges in his sights: malaria, the mosquito-borne disease that infects 250 million a year, killing 800,000 of them; and polio. For the former he spent $200 million to rescue a vaccine that was in development at Glaxo but had no chance of ever being profitable—a recent study indicated that it will cut the infection rate in half. He’s dedicated to stamping out polio entirely, which would make it only the second disease ever to be extinguished from the face of the Earth, after smallpox.

Now that this model has been established, Gates’ role has evolved. To make this system work, he needs to play global health care ambassador. Given his throw weight, heads of state have to take his call, as evidenced by his quick trip to Chad—a photo op vaccinating kids puts a leader on public notice and enforces some accountability for delivering medical care in the future. “I wouldn’t say I’m convincing [them]—I’m reminding them,” says Gates. He then imagines how the leaders are anticipating his visit, in what sounds like a parody of his own voice. “Aw, this guy, he’s going to come talk about vaccination, vaccination, vaccination and how are you doing on polio. And, by the way, you’re one of the few countries left that still has polio, and you’ve got low vaccination rates!”

The blogosphere still expels dark plumes of “I Hate Bill Gates” posts and websites, accusing him of bilking taxpayers because Seattle granted him free land to build the new campus or spreading autism through vaccines (now a widely discredited theory) or of playing God through his foundation. Some clinicians criticize him, wistfully, for fixating on vaccines to the exclusion of other medical causes. But for someone once pilloried as the Antichrist of technology, a brutal monopolist who strangled innovation, this generosity—less of the heart than the head—has made him a saint among those most familiar with his efforts. “A powerful voice to protect millions of children in developing countries from dying,” says Andrin Oswald, head of vaccines at Novartis. Adds William Foege, a Gates ally best known for his role in eradicating smallpox: “What has happened in the last decade is something we could never have dreamed of. It will change forever what society looks like.”

The billionaire, for his part, waves off most of the adulation. When I told Gates that Foege compared him to Maurice Hilleman, the researcher who developed vaccines for measles, mumps and a half-dozen other diseases, Gates faintly blushed. “He actually did it, though. I mean, his lab at Merck, they really did it.”

But Gates did something, too. It had nothing to do with lab work, and everything to do with the problem-solving skills unique to someone who has created an entire industry.

When I asked Gates to grade himself on which of his accomplishments—computer software or inoculations— was more important, his calculating mind whirled straight into action. “I’d say, it’s pretty hard to make that comparison,” he says. “In terms of lives saved, vaccines would just totally win out.” Then he ponders some more. Both vaccines and personal computers, he says, rank “right up there with the printing press and fire.” On its face, an astoundingly hubristic statement. But Gates says it without even a hint of braggadocio. It’s just cold, hard, ­reasoned fact.