Bill Gates likes to tout himself as a pretty sunny guy. He regularly asserts that the world is getting better every day, in spite of the fact that the price of a loaf of bread is climbing, many people can no longer afford to buy a place to live, and free and fair elections are consistently under threat.

Gates remains undeterred. "Overall, I'm quite optimistic," he told a crowd of Harvard students in April.

He uses hard numbers to back up this persistently cheery outlook, pointing out that since the $50 billion-plus Bill and Melinda Gates Foundation began in 2000, the number of extremely poor people around the world has fallen sharply.

Since then, over one billion previously impoverished people have busted out of a so-called "extreme poverty" income bracket to live on more than $1.90 a day. In practical terms, this means there are fewer and fewer people getting around on two bare feet, cooking over a flame, and sleeping on the ground.

In 2017, the Gates Foundation launched its first annual Goalkeepers report, checking in on the UN Sustainable Development Goals to see how far we have come in the fight against infectious disease and poverty.

That first report asserted that the world is gradually getting better on those measures. Now the Gates Foundation is sounding the alarm, warning in its second Goalkeepers report that the stunning poverty progress of the past few decades could crash to a halt if more isn't done to help people stay in school and get enough to eat.

While the number of extremely poor people living in countries like China and India looks to be relatively on track to zero out by 2030, the number of people living in poverty in some of the world's poorest sub-Saharan African countries is still creeping upward — and could skyrocket if current trends continue.

Gates Foundation CEO Sue Desmond-Hellmann says that forecasted downturn into extreme poverty is not inevitable. She believes the Foundation's biggest task today is helping prevent more poverty in Africa, largely by letting women take the lead in starting and growing their own families.

"If every African woman was able to have the number of children that she wants, you could have a decrease in population growth by 30% by 2100," Desmond-Hellmann told Business Insider. "And that's just if she gets to do what she wants."

Education also plays a key role. China experienced its own dramatic poverty reduction in 1990s, arguably spurred in no small part by more educated women entering the workplace. India followed suit in the 2000s. Now is the time to foster a similar African "wave" of prosperity, the Gates Foundation argues.

"We really need to have a third wave, and it needs to happen in sub-Saharan Africa," Desmond-Hellmann said.

Why women are critical to everyone's economic success

Today, women in sub-Saharan Africa have an average of .7 more children than what they'd ideally want, according to the new report.

"The worry, the peril is that more babies are being born in the places where it's hardest to live a healthy, productive life," Desmond-Hellmann said.

Nowhere will that be more true than in the African countries sitting below the Sahara desert, she said.

"By 2050, 86% of the world's extreme poor would be in sub-Saharan Africa," she said, "And 40% would be in just two countries: the Democratic Republic of the Congo and Nigeria."

At the same time, these two countries are set to experience rapid population growth, more than doubling in size. Fixes for this kind of population boom are already working in other African countries, like Kenya.

There, nonprofit Marie Stopes International provides free contraception for teens. At first, young Kenyan girls weren't interested in the free contraception, so Marie Stopes shifted its focus to empowering teenagers. They help young girls set goals for the future, and nudge the young women to wait to have kids until they want them, while continuing to finish school and pursuing their own dreams.

Refugees from the Democratic Republic of Congo carry food distributed by the World Food Programme in the Kyangwali settlement on April 10, 2018 in Kyangwali, Uganda. Jack Taylor/Getty Images

Research shows clearly that a young woman who waits until she's finished school to have babies can have a positive, cascading effect on the health of her entire family, and country, for decades.

"Educated girls tend to work more, earn more, expand their horizons, marry and start having children later, have fewer children, and invest more in each child," the report said. "Their children, in turn, tend to follow similar patterns, so the effect of graduating one girl sustains itself for generations."

The Gates Foundation is also highlighting the importance of helping small-scale farmers move from subsistence farming to more focused crop production, zeroing in on growing one product, such as tomatoes, and selling it at market prices. That kind of sustainable business plan means families can make money and provide better nutrition for their kids, instead of simply relying on their own farms for food.

"One thing we know about small-holder farmers is that many of them are women," Desmond-Hellmann said. "We know when that kind of economic gain is available for women, she'll spend money on health and education for her children."

Even as Africa is projected to nearly double in population size by 2050, the continent could produce a wave of healthier kids, ready to solve tomorrow's problems. But that's only going to happen if more women get to lead the way, putting their own health and education first.