“I have to say, a decade ago I never imagined that I’d know so much about poop,” Mr Gates joked at the conference. “And I definitely never thought that Melinda would have to tell me to stop talking about toilets and faecal sludge at the dinner table.”

The entrepreneur was helping to launch the three-day event in China – where leader Xi Jinping has made a so-called “toilet revolution” across the country a policy priority.

“It’s no longer a question of if we can reinvent the toilet and other sanitation systems,” he said. “It’s a question of how quickly this new category of off-grid solutions will scale.”

The entrepreneur described the inventions on display as the “most significant advances in sanitation in nearly 200 years”.

Deadly disease

The technology giant pointed out the jar of faeces beside him could contain as many as 200 trillion rotavirus cells, 20 billion Shigella bacteria, and 100,000 parasitic worm eggs.

According to the World Health Organisation, 2.3 billion people around the world still don’t have access to basic sanitation facilities.

This can cause diseases like cholera, diarrhoea and dysentery which kill hundreds of thousands of people every year.

Speaking to the BBC, Mr Gates discussed the inequalities in sanitation access.

“In rich countries we have sewers that take clean water in, flush some of the dirty water out, in almost all cases there’s a treatment plant,” he said.

“As we have these newer cities with lots of less wealthy people in them, those sewers have not been built and in fact, it’s not likely they ever will be, so the question is, could you do it? Could you process human waste without that sewer system?”

The foundation has said they hope the reinvented toilet will first roll out in buildings like schools and apartment buildings, before costs gradually decline and they become affordable in households.

“You’re only going to pay hundreds of dollars for a toilet – if it’s really fantastic maybe $500,” Mr Gates told the BBC.

“You’re saving all the costs of the waters, the processing products, but we have to bring it down by almost a factor of 10 from what the models are like – but that’s not atypical for new product markets.”

On his trip, Mr Gates also appeared at the First China International Import Expo in Shanghai, at a time of tension between the US and China.

The world’s two largest economies have been engaged in a tit-for-tat trade war over tariffs for much of the year.