Almost a billion people in the developing world have no access to toilets and defecate outdoors (such as these children in Bangladesh). But that waste shouldn’t go to waste, a new study argues: Rather than tainting the environment and transmitting disease, it could actually be harnessed to heat or power millions of homes. If all the openly defecated human waste were instead deposited in latrines—and the sludge were then collected and heated in kilns at temperatures exceeding 300°C (572°F) to produce charcoal-like briquettes—it would yield up to 8.5 million tons of charcoal, according to a report released today by the United Nations University Institute for Water, Environment and Health. (Those poop briquettes have the same energy content, pound for pound, as coal, the researchers note.) Plus, if openly defecated waste were instead deposited in latrines and then fermented with methane-producing microbes in large tanks, the gas thus produced would be worth as much as $376 million and could be used to generate enough electricity to power an estimated 18 million households. In general, the value of the gas produced by a toilet fermentation system would probably cover the costs of building and maintaining the system within just a couple of years, the researchers say. The findings come just in time for World Toilet Day on 19 November, a United Nations–recognized effort that helps boost health and safety in developing nations by reducing open defecation there.